Class ProjectedGrid

java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Mesh
com.ardor3d.extension.effect.water.ProjectedGrid
All Implemented Interfaces:
Pickable, Hintable, Renderable, Savable

public class ProjectedGrid extends Mesh
ProjectedGrid Projected grid mesh
  • Field Details

    • freezeProjector

      public boolean freezeProjector
  • Constructor Details

    • ProjectedGrid

      public ProjectedGrid(String name, Camera camera, int sizeX, int sizeY, float textureScale, HeightGenerator heightGenerator, Timer timer)
  • Method Details

    • setNrUpdateThreads

      public void setNrUpdateThreads(int nrUpdateThreads)
    • getNrUpdateThreads

      public int getNrUpdateThreads()
    • setFreezeUpdate

      public void setFreezeUpdate(boolean freeze)
    • isFreezeUpdate

      public boolean isFreezeUpdate()
    • render

      public void render(Renderer renderer)
      Description copied from interface: Renderable
      Render the object using the supplied renderer instance.
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Mesh
      Parameters:
      renderer - the renderer
    • update

      public boolean update()
    • getSurfaceNormal

      public Vector3 getSurfaceNormal(Vector2 position, Vector3 store)
      getSurfaceNormal returns the normal of an arbitrary point on the terrain. The normal is linearly interpreted from the normals of the 4 nearest defined points. If the point provided is not within the bounds of the height map, null is returned.
      Parameters:
      position - the vector representing the location to find a normal at.
      store - the Vector3 object to store the result in. If null, a new one is created.
      Returns:
      the normal vector at the provided location.
    • getSurfaceNormal

      public Vector3 getSurfaceNormal(Vector3 position, Vector3 store)
      getSurfaceNormal returns the normal of an arbitrary point on the terrain. The normal is linearly interpreted from the normals of the 4 nearest defined points. If the point provided is not within the bounds of the height map, null is returned.
      Parameters:
      position - the vector representing the location to find a normal at. Only the x and z values are used.
      store - the Vector3 object to store the result in. If null, a new one is created.
      Returns:
      the normal vector at the provided location.
    • getSurfaceNormal

      public Vector3 getSurfaceNormal(double x, double z, Vector3 store)
      getSurfaceNormal returns the normal of an arbitrary point on the terrain. The normal is linearly interpreted from the normals of the 4 nearest defined points. If the point provided is not within the bounds of the height map, null is returned.
      Parameters:
      x - the x coordinate to check.
      z - the z coordinate to check.
      store - the Vector3 object to store the result in. If null, a new one is created.
      Returns:
      the normal unit vector at the provided location.
    • getProjectorMinHeight

      public double getProjectorMinHeight()
    • setProjectorMinHeight

      public void setProjectorMinHeight(double projectorMinHeight)
    • isDrawDebug

      public boolean isDrawDebug()
    • setDrawDebug

      public void setDrawDebug(boolean drawDebug)