org.xith3d.terrain
Class ChunkedTerrain
java.lang.Object
org.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.GroupNode
org.xith3d.scenegraph.Group
org.xith3d.terrain.ChunkedTerrain
- All Implemented Interfaces:
- org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode, LazyLoadable
- Direct Known Subclasses:
- L3DTerrain
public class ChunkedTerrain
- extends Group
- implements LazyLoadable
|
Constructor Summary |
protected |
ChunkedTerrain(ChunkedTerrain.Spec spec)
|
|
ChunkedTerrain(GridResourceProvider resourceProvider,
float x,
float y,
float z,
float scale,
float height)
|
protected |
ChunkedTerrain(GridResourceProvider resourceProvider,
float x,
float y,
float z,
float scale,
float height,
float s1,
float t1,
float s2,
float t2,
float parentYOffset,
int geomTreeDepth,
int maxGeomTreeDepth,
boolean lazy)
|
|
ChunkedTerrain(GridSampler gridSampler,
GridSurface gridShader,
float x,
float y,
float z,
float scale,
float height)
|
|
Method Summary |
void |
cleanUp()
This method will be called by the engine on a dedicated thread (not the rendering thread)
to allow the background destruction of a Node. |
org.openmali.vecmath2.Tuple3f |
getDimension()
|
float |
getHeight()
|
org.openmali.vecmath2.Point3f |
getLocation()
|
float |
getX()
|
float |
getY()
|
float |
getZ()
|
boolean |
isSetUp()
Returns whether this instance is already set up, so it can be used right away. |
float |
pickY(float x,
float z)
|
void |
prepare()
This method will be called by the engine on a dedicated thread (not the rendering thread)
to allow the background construction of a Node. |
void |
setUp()
This method will be called by the engine on the rendering thread to to allow thread safe attachment
of the constructed content to the scenegraph. |
void |
tearDown()
This method will be called by the engine on the rendering thread to to allow thread safe detachment
of the content from the scenegraph. |
| Methods inherited from class org.xith3d.scenegraph.GroupNode |
absorbDetails, addChild, addChild, checkChild, dump, dump, ensureCapacity, expandBounds, findAll, findAll, findFirst, findFirst, freeOpenGLResources, getChild, getChildren, getChildren, getClipper, getPickHost, getScissorRect, getTotalNumChildren, getTotalNumShapes, indexOf, isPickHost, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, numChildren, removeAllChildren, removeChild, removeChild, setBoundsDirty, setBoundsDirtyUpward, setChild, setClipper, setPickHost, setPickHost, setScissorRect, setShowBounds, sharedCopy, sharedCopy, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateBounds, updateBoundsCheap |
| Methods inherited from class org.xith3d.scenegraph.Node |
cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBounds, setBoundsAutoCompute, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setModListener, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, updateOrderedChild, updateTransformGroup, updateWorldTransform |
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ChunkedTerrain
public ChunkedTerrain(GridSampler gridSampler,
GridSurface gridShader,
float x,
float y,
float z,
float scale,
float height)
ChunkedTerrain
public ChunkedTerrain(GridResourceProvider resourceProvider,
float x,
float y,
float z,
float scale,
float height)
ChunkedTerrain
protected ChunkedTerrain(ChunkedTerrain.Spec spec)
ChunkedTerrain
protected ChunkedTerrain(GridResourceProvider resourceProvider,
float x,
float y,
float z,
float scale,
float height,
float s1,
float t1,
float s2,
float t2,
float parentYOffset,
int geomTreeDepth,
int maxGeomTreeDepth,
boolean lazy)
getHeight
public float getHeight()
getX
public float getX()
getY
public float getY()
getZ
public float getZ()
getLocation
public org.openmali.vecmath2.Point3f getLocation()
getDimension
public org.openmali.vecmath2.Tuple3f getDimension()
pickY
public float pickY(float x,
float z)
prepare
public void prepare()
- Description copied from interface:
LazyLoadable
- This method will be called by the engine on a dedicated thread (not the rendering thread)
to allow the background construction of a Node. The Node will not be displayed until this
method returns.
Prepare may be called multiple times, even if the instance is already set up and tearDown()
wasn't called, so implementation have to check, if they are already set up and return immediatly
- Specified by:
prepare in interface LazyLoadable
setUp
public void setUp()
- Description copied from interface:
LazyLoadable
- This method will be called by the engine on the rendering thread to to allow thread safe attachment
of the constructed content to the scenegraph. This method will be called after prepare().
- Specified by:
setUp in interface LazyLoadable
tearDown
public void tearDown()
- Description copied from interface:
LazyLoadable
- This method will be called by the engine on the rendering thread to to allow thread safe detachment
of the content from the scenegraph. The Node will be hidden before.
- Specified by:
tearDown in interface LazyLoadable
isSetUp
public boolean isSetUp()
- Description copied from interface:
LazyLoadable
- Returns whether this instance is already set up, so it can be used right away.
- Specified by:
isSetUp in interface LazyLoadable
- Returns:
- true, if the instance is fully set up, false otherwise
cleanUp
public void cleanUp()
- Description copied from interface:
LazyLoadable
- This method will be called by the engine on a dedicated thread (not the rendering thread)
to allow the background destruction of a Node. This method will be called after tearDown().
- Specified by:
cleanUp in interface LazyLoadable