Aviatrix3D
2.0 Dev

org.j3d.renderer.aviatrix3d.nodes
Class LODGroup

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.Node
          extended byorg.j3d.aviatrix3d.BaseNode
              extended byorg.j3d.renderer.aviatrix3d.nodes.LODGroup
All Implemented Interfaces:
Cullable

public class LODGroup
extends BaseNode
implements Cullable

Not available at this time A grouping node structure that controls which children are being rendered based on distance from the user.

Version:
1.0
Author:
Rune Aasgaard, (c) SINTEF

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.Node
bounds, implicitBounds, INVALID_BOUNDS, parent
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
LODGroup()
          Create a new LOD implementation that uses distance as the determining visual factor.
LODGroup(boolean distanceMode)
           
 
Method Summary
 void addChild(Node newChild)
          Add a new child to the group.
 void cullChildren(CullInstructions output, javax.vecmath.Matrix4f vworldTx, javax.vecmath.Matrix4f viewTransform, javax.vecmath.Vector4f[] frustumPlanes, float angularRes)
          Check this node for children to traverse.
 float getRange(int idx)
          Get the range set at the given child index.
 Node[] getRenderableChild()
          Get the list of children that are valid to be rendered according to the rules of the grouping node.
 boolean isDistanceMode()
          Find out which of the two modes are being used by this LOD.
 int numRenderableChildren()
          Returns the number of valid renderable children to process.If there are no valid renderable children return -1.
 void removeAllChildren()
          Removes all children from the group.
 void removeChild(int idx)
           
 void setRange(int idx, float value)
          Set the range at the given child index.
 
Methods inherited from class org.j3d.aviatrix3d.BaseNode
checkForCyclicChild, checkForCyclicParent, clearUpdateHandler, removeParent, setLive, setParent, setUpdateHandler
 
Methods inherited from class org.j3d.aviatrix3d.Node
boundsChanged, checkForCyclicParent, getBounds, getParent, markBoundsDirty, recomputeBounds, removeParent, setBounds, setLive, setParent, updateBounds, updateParentBounds
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, dataChanged, getUserData, isLive, setUpdateHandler, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LODGroup

public LODGroup()
Create a new LOD implementation that uses distance as the determining visual factor.


LODGroup

public LODGroup(boolean distanceMode)
Method Detail

cullChildren

public void cullChildren(CullInstructions output,
                         javax.vecmath.Matrix4f vworldTx,
                         javax.vecmath.Matrix4f viewTransform,
                         javax.vecmath.Vector4f[] frustumPlanes,
                         float angularRes)
Check this node for children to traverse. The angular resolution is defined as Field Of View (in radians) / viewport width in pixels.

Specified by:
cullChildren in interface Cullable
Parameters:
output - Fill in the child information here
vworldTx - The transformation from the root of the scene to this node according to the current traversal path
viewTransform - The transformation from the root of the scene graph to the active viewpoint
frustumPlanes - Listing of frustum planes in the order: right, left, bottom, top, far, near
angularRes - Angular resolution of the screen, or 0 if not calculable from the available data.

addChild

public void addChild(Node newChild)
Add a new child to the group.


removeChild

public void removeChild(int idx)

getRenderableChild

public Node[] getRenderableChild()
Get the list of children that are valid to be rendered according to the rules of the grouping node.

Returns:
an array of nodes

numRenderableChildren

public int numRenderableChildren()
Returns the number of valid renderable children to process.If there are no valid renderable children return -1.

Returns:
A number greater than or equal to zero

removeAllChildren

public void removeAllChildren()
                       throws InvalidWriteTimingException
Removes all children from the group.

Throws:
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener callback method

getRange

public float getRange(int idx)
Get the range set at the given child index.

Parameters:
idx - The range index to get the value from
Throws:
java.lang.IndexOutOfBoundsException - The index is negative or past the last child

setRange

public void setRange(int idx,
                     float value)
Set the range at the given child index. The value at this index is required to be monotonically increasing relative to the previous and next index.

Parameters:
idx - The range index to get the value from
Throws:
java.lang.IndexOutOfBoundsException - The index is negative or past the last child
java.lang.IllegalArgumentException - The value is not monotonically increasing

isDistanceMode

public boolean isDistanceMode()
Find out which of the two modes are being used by this LOD.


Aviatrix3D
2.0 Dev

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2005 j3d.org