Package com.jme3.terrain.geomipmap
Class NormalRecalcControl
java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.terrain.geomipmap.NormalRecalcControl
- All Implemented Interfaces:
Savable
,Control
,JmeCloneable
,Cloneable
Handles the normal vector updates when the terrain changes heights.
-
Field Summary
Fields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cloneFields
(Cloner cloner, Object original) Called internally by com.jme3.util.clone.Cloner.protected void
controlRender
(RenderManager rm, ViewPort vp) To be implemented in subclass.protected void
controlUpdate
(float tpf) To be implemented in subclass.jmeClone()
Called internally by com.jme3.util.clone.Cloner.void
read
(JmeImporter im) void
setSpatial
(Spatial spatial) void
setTerrain
(TerrainQuad terrain) void
write
(JmeExporter ex) Methods inherited from class com.jme3.scene.control.AbstractControl
cloneForSpatial, getSpatial, isEnabled, render, setEnabled, update
-
Constructor Details
-
NormalRecalcControl
public NormalRecalcControl() -
NormalRecalcControl
-
-
Method Details
-
controlUpdate
protected void controlUpdate(float tpf) Description copied from class:AbstractControl
To be implemented in subclass.- Specified by:
controlUpdate
in classAbstractControl
- Parameters:
tpf
- time per frame (in seconds)
-
controlRender
Description copied from class:AbstractControl
To be implemented in subclass.- Specified by:
controlRender
in classAbstractControl
- Parameters:
rm
- the RenderManager rendering the controlled Spatial (not null)vp
- the ViewPort being rendered (not null)
-
jmeClone
Called internally by com.jme3.util.clone.Cloner. Do not call directly.- Specified by:
jmeClone
in interfaceJmeCloneable
- Overrides:
jmeClone
in classAbstractControl
- Returns:
- a new instance
-
cloneFields
Called internally by com.jme3.util.clone.Cloner. Do not call directly.- Specified by:
cloneFields
in interfaceJmeCloneable
- Overrides:
cloneFields
in classAbstractControl
- Parameters:
cloner
- The cloner that is performing the cloning operation. The cloneFields method can call back into the cloner to make clones of its subordinate fields.original
- The original object from which this object was cloned. This is provided for the very rare case that this object needs to refer to its original for some reason. In general, all of the relevant values should have been transferred during the shallow clone, and this object need only clone what it wants.
-
setSpatial
- Specified by:
setSpatial
in interfaceControl
- Overrides:
setSpatial
in classAbstractControl
- Parameters:
spatial
- the spatial to be controlled. This should not be called from user code.
-
getTerrain
-
setTerrain
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classAbstractControl
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classAbstractControl
- Throws:
IOException
-