|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.Leaf
org.xith3d.scenegraph.Shape3D
org.xith3d.scenegraph.LODShape3D
public abstract class LODShape3D
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.
LODSwitch| Field Summary |
|---|
| Fields inherited from class org.xith3d.scenegraph.Node |
|---|
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, parent, transformGroup, untransformedBounds |
| Fields inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
XITH3D_USERDATAKEY_OLDUSERDATA |
| Constructor Summary | |
|---|---|
LODShape3D()
Constructs a new LODShape3D object with a null geometry component and a null appearance component. |
|
LODShape3D(Geometry geometry)
Constructs a new LODShape3D object with specified geometry component and a null appearance component. |
|
LODShape3D(Geometry geometry,
Appearance appearance)
Constructs a new Shape3D object with specified geometry and appearance components. |
|
| Method Summary | |
|---|---|
void |
addLOD(float minDist,
float maxDist)
Adds a new (unnamed) LOD (level of detail). |
void |
addLOD(java.lang.String name,
float minDist,
float maxDist)
Adds a new LOD (level of detail). |
java.lang.String |
getLODName(int lod)
Returns the name of the LOD with the given index. |
float |
getMaxDist(int index)
|
float |
getMinDist(int index)
|
int |
getNumLODs()
|
protected abstract void |
onLODChanged(int oldLOD,
int newLOD,
java.lang.String name)
This eveent is fired when the LOD has changed. |
LODShape3D |
sharedCopy()
Creates a shared copy of this Node. |
LODShape3D |
sharedCopy(CopyListener listener)
Creates a shared copy of this Node. |
void |
updateLOD(org.openmali.vecmath2.Point3f viewPosition)
Called by the Renderer to make the LODSwitch select the right item for the given view position. |
| Methods inherited from class org.xith3d.scenegraph.Shape3D |
|---|
absorbDetails, freeOpenGLResources, getAppearance, getAppearance, getGeometry, isBumpMappingEnabled, isShadowReceiver, isVisible, newAppearance, setAppearance, setBounds, setBumpMappingEnabled, setBumpMappingEnabled, setGeometry, setIsShadowReceiver, setLive, setModListener, setVisible, traverse, updateBounds, updateBoundsCheap, updateWorldTransform, verifyAppChange |
| Methods inherited from class org.xith3d.scenegraph.Leaf |
|---|
dump, getPickHost, setPickHost |
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
getName, getUserData, getUserData, getUserDataMap, isLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LODShape3D(Geometry geometry,
Appearance appearance)
public LODShape3D(Geometry geometry)
public LODShape3D()
| Method Detail |
|---|
public final float getMinDist(int index)
index - the index of the LOD item of interest
public final float getMaxDist(int index)
index - the index of the LOD item of interest
public final java.lang.String getLODName(int lod)
lod - the LOD, for which the name is requested
public final int getNumLODs()
protected abstract void onLODChanged(int oldLOD,
int newLOD,
java.lang.String name)
oldLOD - the old LODnewLOD - the new LODname - the name of the new LODpublic void updateLOD(org.openmali.vecmath2.Point3f viewPosition)
public void addLOD(java.lang.String name,
float minDist,
float maxDist)
name - the name of the new LODminDist - the minimum distancemaxDist - the maximum distance
public void addLOD(float minDist,
float maxDist)
minDist - the minimum distancemaxDist - the maximum distancepublic LODShape3D sharedCopy(CopyListener listener)
sharedCopy in class Shape3DNode.absorbDetails(Node)public LODShape3D sharedCopy()
sharedCopy in class Shape3DNode.absorbDetails(Node)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||