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
ProjectedGrid
Projected grid mesh-
Field Summary
Fields inherited from class com.ardor3d.scenegraph.Mesh
_defaultColor, _isVisible, _lightState, _meshData, _modelBound, _states, RENDER_VERTEX_ONLY
Fields inherited from class com.ardor3d.scenegraph.Spatial
_controllers, _delegateMap, _dirtyMark, _frustumIntersects, _listener, _localTransform, _name, _parent, _queueDistance, _renderStateList, _sceneHints, _userData, _worldBound, _worldTransform, ON_DIRTY_ATTACHED, ON_DIRTY_BOUNDING, ON_DIRTY_RENDERSTATE, ON_DIRTY_TRANSFORM, ON_DIRTY_TRANSFORM_ONLY
-
Constructor Summary
ConstructorDescriptionProjectedGrid
(String name, Camera camera, int sizeX, int sizeY, float textureScale, HeightGenerator heightGenerator, Timer timer) -
Method Summary
Modifier and TypeMethodDescriptionint
double
getSurfaceNormal
(double x, double z, Vector3 store) getSurfaceNormal
returns the normal of an arbitrary point on the terrain.getSurfaceNormal
(Vector2 position, Vector3 store) getSurfaceNormal
returns the normal of an arbitrary point on the terrain.getSurfaceNormal
(Vector3 position, Vector3 store) getSurfaceNormal
returns the normal of an arbitrary point on the terrain.boolean
boolean
void
Render the object using the supplied renderer instance.void
setDrawDebug
(boolean drawDebug) void
setFreezeUpdate
(boolean freeze) void
setNrUpdateThreads
(int nrUpdateThreads) void
setProjectorMinHeight
(double projectorMinHeight) boolean
update()
Methods inherited from class com.ardor3d.scenegraph.Mesh
applyWorldRenderStates, draw, getClassTag, getDefaultColor, getLightState, getMeshData, getModelBound, getModelBound, getWorldNormals, getWorldRenderState, getWorldVectors, intersectsPrimitivesWhere, intersectsWorldBound, intersectsWorldBoundsWhere, isVisible, makeCopy, makeInstanced, read, render, renderArrays, renderVBO, reorderIndices, reorderVertexData, reorderVertexData, setDefaultColor, setDefaultColor, setLightState, setMeshData, setModelBound, setModelBound, setRandomColors, setSolidColor, setVisible, sortLights, supportsBoundsIntersectionRecord, supportsPrimitivesIntersectionRecord, updateModelBound, updateWorldBound, write
Methods inherited from class com.ardor3d.scenegraph.Spatial
acceptVisitor, addController, addTranslation, addTranslation, clearControllers, clearDirty, clearDirty, clearRenderState, getController, getControllerCount, getControllers, getCurrentRenderDelegate, getLastFrustumIntersection, getListener, getLocalLastFrustumIntersection, getLocalRenderState, getLocalRenderStates, getName, getParent, getParentHintable, getRenderDelegate, getRotation, getScale, getSceneHints, getTransform, getTranslation, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, isDirty, localToWorld, markDirty, markDirty, onDraw, propagateBoundToRoot, propagateDirtyDown, propagateDirtyUp, propagateStatesFromRoot, propageEventUp, removeController, removeController, removeFromParent, setLastFrustumIntersection, setListener, setName, setParent, setRenderDelegate, setRenderState, setRotation, setRotation, setScale, setScale, setScale, setTransform, setTranslation, setTranslation, setUserData, setWorldRotation, setWorldRotation, setWorldScale, setWorldScale, setWorldScale, setWorldTransform, setWorldTranslation, setWorldTranslation, toString, updateChildren, updateControllers, updateGeometricState, updateGeometricState, updateWorldRenderStates, updateWorldRenderStates, updateWorldTransform, worldToLocal
-
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
Description copied from interface:Renderable
Render the object using the supplied renderer instance.- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classMesh
- Parameters:
renderer
- the renderer
-
update
public boolean update() -
getSurfaceNormal
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
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
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)
-