Class NormalRecalcControl

java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.terrain.geomipmap.NormalRecalcControl
All Implemented Interfaces:
Savable, Control, JmeCloneable, Cloneable

public class NormalRecalcControl extends AbstractControl
Handles the normal vector updates when the terrain changes heights.
  • Constructor Details

    • NormalRecalcControl

      public NormalRecalcControl()
    • NormalRecalcControl

      public NormalRecalcControl(TerrainQuad terrain)
  • Method Details

    • controlUpdate

      protected void controlUpdate(float tpf)
      Description copied from class: AbstractControl
      To be implemented in subclass.
      Specified by:
      controlUpdate in class AbstractControl
      Parameters:
      tpf - time per frame (in seconds)
    • controlRender

      protected void controlRender(RenderManager rm, ViewPort vp)
      Description copied from class: AbstractControl
      To be implemented in subclass.
      Specified by:
      controlRender in class AbstractControl
      Parameters:
      rm - the RenderManager rendering the controlled Spatial (not null)
      vp - the ViewPort being rendered (not null)
    • jmeClone

      public Object jmeClone()
      Called internally by com.jme3.util.clone.Cloner. Do not call directly.
      Specified by:
      jmeClone in interface JmeCloneable
      Overrides:
      jmeClone in class AbstractControl
      Returns:
      a new instance
    • cloneFields

      public void cloneFields(Cloner cloner, Object original)
      Called internally by com.jme3.util.clone.Cloner. Do not call directly.
      Specified by:
      cloneFields in interface JmeCloneable
      Overrides:
      cloneFields in class AbstractControl
      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

      public void setSpatial(Spatial spatial)
      Specified by:
      setSpatial in interface Control
      Overrides:
      setSpatial in class AbstractControl
      Parameters:
      spatial - the spatial to be controlled. This should not be called from user code.
    • getTerrain

      public TerrainQuad getTerrain()
    • setTerrain

      public void setTerrain(TerrainQuad terrain)
    • write

      public void write(JmeExporter ex) throws IOException
      Specified by:
      write in interface Savable
      Overrides:
      write in class AbstractControl
      Throws:
      IOException
    • read

      public void read(JmeImporter im) throws IOException
      Specified by:
      read in interface Savable
      Overrides:
      read in class AbstractControl
      Throws:
      IOException