org.xith3d.scenegraph
Class LODShape3D
java.lang.Object
org.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.Leaf
org.xith3d.scenegraph.Shape3D
org.xith3d.scenegraph.AbstractLODShape3D
org.xith3d.scenegraph.LODShape3D
- All Implemented Interfaces:
- org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode
public class LODShape3D
- extends AbstractLODShape3D
The LODShape3D is a Shape3D Node extension, that handles discrete LOD.
Discrete LOD (level of detail) is a technique, that
selects an item depending on its distance to the camera.
- See Also:
LODSwitch
|
Constructor Summary |
LODShape3D()
Constructs a new Shape3D object with specified geometry and
appearance components. |
| Methods inherited from class org.xith3d.scenegraph.Shape3D |
absorbDetails, freeOpenGLResources, getAppearance, getAppearance, getCustomComparable, getGeometry, isBumpMappingEnabled, isShadowReceiver, isVisible, newAppearance, setAppearance, setBounds, setBumpMappingEnabled, setBumpMappingEnabled, setCustomComparable, setGeometry, setIsShadowReceiver, setModListener, setVisible, traverse, updateBounds, updateBoundsCheap, updateWorldTransform, verifyAppChange |
| 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, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBoundsAutoCompute, setBoundsDirty, setBoundsDirtyUpward, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateOrderedChild, updateTransformGroup |
| 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 |
LODShape3D
public LODShape3D()
- Constructs a new Shape3D object with specified geometry and
appearance components.
onLODChanged
protected void onLODChanged(int oldLOD,
int newLOD,
java.lang.String name)
- This eveent is fired when the LOD has changed.
This is always done by the redner thread.
- Specified by:
onLODChanged in class AbstractLODShape3D
- Parameters:
oldLOD - the old LODnewLOD - the new LODname - the name of the new LOD
addLOD
public int addLOD(java.lang.String name,
float minDist,
float maxDist,
Geometry geom,
Appearance app)
- Adds a new LOD (level of detail).
- Parameters:
name - the name of the new LODminDist - the minimum distancemaxDist - the maximum distancegeom - app -
addLOD
public int addLOD(float minDist,
float maxDist,
Geometry geom,
Appearance app)
- Adds a new LOD (level of detail).
- Parameters:
minDist - the minimum distancemaxDist - the maximum distancegeom - app -
newInstance
protected LODShape3D newInstance()
-
- Specified by:
newInstance in class AbstractLODShape3D
- Returns:
- a new instance of this class. This is invoked by the sharedCopy() method.
- See Also:
Shape3D.sharedCopy(CopyListener)
copy
protected void copy(Shape3D dst)
-
- Overrides:
copy in class AbstractLODShape3D
sharedCopy
public LODShape3D sharedCopy(CopyListener listener)
- Creates a shared copy of this Node. A shared copy is one where the
geometry and appearance is shared, but everything else is copied. This
is a replacement for shared groups because of performance considerations.
If you are loading the same model many times then this can save on memory
and load times. The only allowable within the subtree are groups and
shapes. This also copies a shapes bounds and turns autocomute off so that
it is fast to insert the model into the scene.
- Overrides:
sharedCopy in class AbstractLODShape3D
- Returns:
- a shared copy of this Node
- See Also:
Node.absorbDetails(Node)