org.xith3d.scenegraph
Class QuadTreeGroup
java.lang.Object
org.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.GroupNode
org.xith3d.scenegraph.Group
org.xith3d.scenegraph.QuadTreeGroup
- All Implemented Interfaces:
- org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode, SpecialCullingNode<QuadTreeGroup>
public class QuadTreeGroup
- extends Group
- implements SpecialCullingNode<QuadTreeGroup>
Insert type comment here.
|
Field Summary |
static org.openmali.spatial.PlaneIndicator |
DEFAULT_PLANE
|
|
Constructor Summary |
QuadTreeGroup(float centerX,
float centerY,
float centerZ,
org.openmali.spatial.AxisIndicator upAxis,
float size,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(float centerX,
float centerY,
float centerZ,
float size,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(float centerX,
float centerY,
float centerZ,
float width,
float depth,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(float centerX,
float centerY,
float centerZ,
org.openmali.spatial.PlaneIndicator plane,
float size,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(float centerX,
float centerY,
float centerZ,
org.openmali.spatial.PlaneIndicator plane,
float width,
float depth,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
org.openmali.spatial.AxisIndicator upAxis,
float size,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
org.openmali.spatial.AxisIndicator upAxis,
float width,
float depth,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
float size,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
float width,
float depth,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
org.openmali.spatial.PlaneIndicator plane,
float size,
float height,
boolean useExtendedCells)
|
QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
org.openmali.spatial.PlaneIndicator plane,
float width,
float depth,
float height,
boolean useExtendedCells)
|
|
Method Summary |
void |
addChild(Node child,
int index)
Insert a child at the specified index. |
void |
cullSpecialNode(QuadTreeGroup node,
boolean cullingSuppressed,
View view,
org.openmali.vecmath2.Point3f viewPosition,
org.openmali.spatial.bodies.Frustum frustum,
RenderBinProvider binProvider,
OpenGLCapabilities glCaps,
long frameId,
long nanoTime,
long nanoStep,
PickRay pickRay,
boolean isShadowPass,
FrustumCuller frustumCuller)
Thsi method is called by the FrustumCuller, if an instance of SpecialCullingNode
is detected. |
void |
dump()
Dumps this Group and it's children to stdout. |
int |
getMaxLevelForExtendedCells()
|
int |
getMaxOcTreeLevel()
|
int |
getMinNodesBeforeSplit()
|
void |
removeAllChildren()
Removes all the children of this group. |
Node |
removeChild(int index)
Remove the child at the specified index. |
void |
setMaxLevelForExtendedCells(int maxLevelForExtendedCells)
|
void |
setMinNodesBeforeSplit(int minNodesBeforeSplit)
|
void |
updateNodePosition(Node node)
This method must be called after a node's position or size has changed. |
| Methods inherited from class org.xith3d.scenegraph.GroupNode |
absorbDetails, addChild, checkChild, dump, ensureCapacity, expandBounds, findAll, findAll, findFirst, findFirst, freeOpenGLResources, getChild, getChildren, getChildren, getClipper, getPickHost, getScissorRect, getTotalNumChildren, getTotalNumShapes, indexOf, isPickHost, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, numChildren, removeChild, setBoundsDirty, setBoundsDirtyUpward, setChild, setClipper, setLive, 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, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_PLANE
public static final org.openmali.spatial.PlaneIndicator DEFAULT_PLANE
QuadTreeGroup
public QuadTreeGroup(float centerX,
float centerY,
float centerZ,
org.openmali.spatial.PlaneIndicator plane,
float width,
float depth,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
org.openmali.spatial.PlaneIndicator plane,
float width,
float depth,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(float centerX,
float centerY,
float centerZ,
org.openmali.spatial.PlaneIndicator plane,
float size,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
org.openmali.spatial.PlaneIndicator plane,
float size,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
org.openmali.spatial.AxisIndicator upAxis,
float width,
float depth,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(float centerX,
float centerY,
float centerZ,
org.openmali.spatial.AxisIndicator upAxis,
float size,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
org.openmali.spatial.AxisIndicator upAxis,
float size,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(float centerX,
float centerY,
float centerZ,
float width,
float depth,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
float width,
float depth,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(float centerX,
float centerY,
float centerZ,
float size,
float height,
boolean useExtendedCells)
QuadTreeGroup
public QuadTreeGroup(org.openmali.vecmath2.Tuple3f center,
float size,
float height,
boolean useExtendedCells)
setMinNodesBeforeSplit
public void setMinNodesBeforeSplit(int minNodesBeforeSplit)
getMinNodesBeforeSplit
public final int getMinNodesBeforeSplit()
setMaxLevelForExtendedCells
public void setMaxLevelForExtendedCells(int maxLevelForExtendedCells)
getMaxLevelForExtendedCells
public final int getMaxLevelForExtendedCells()
getMaxOcTreeLevel
public final int getMaxOcTreeLevel()
addChild
public void addChild(Node child,
int index)
- Insert a child at the specified index. The parent of the child is set to
this object. If this object is live then the child is set live.
- Overrides:
addChild in class GroupNode
removeChild
public Node removeChild(int index)
- Remove the child at the specified index. The parent of the child is set
to null. The child is made not live.
- Overrides:
removeChild in class GroupNode
removeAllChildren
public void removeAllChildren()
- Removes all the children of this group.
- Overrides:
removeAllChildren in class GroupNode
updateNodePosition
public final void updateNodePosition(Node node)
- This method must be called after a node's position or size has changed.
You don't need to call this method, if you exactly know, that the
modification won't affect the node's placement in the tree.
- Parameters:
node -
dump
public final void dump()
- Description copied from class:
GroupNode
- Dumps this Group and it's children to stdout.
- Overrides:
dump in class GroupNode
cullSpecialNode
public void cullSpecialNode(QuadTreeGroup node,
boolean cullingSuppressed,
View view,
org.openmali.vecmath2.Point3f viewPosition,
org.openmali.spatial.bodies.Frustum frustum,
RenderBinProvider binProvider,
OpenGLCapabilities glCaps,
long frameId,
long nanoTime,
long nanoStep,
PickRay pickRay,
boolean isShadowPass,
FrustumCuller frustumCuller)
- Thsi method is called by the
FrustumCuller, if an instance of SpecialCullingNode
is detected. The implementation must traverse the individual structure of this node
and call the FrustumCuller's FrustumCuller.cullNodeAtoms(Node, org.openmali.spatial.bodies.Classifier.Classification, boolean, View, Point3f, Frustum, RenderBinProvider, OpenGLCapabilities, long, long, long, PickRay, boolean)
method.
- Specified by:
cullSpecialNode in interface SpecialCullingNode<QuadTreeGroup>
- Parameters:
node - the node to be culledpickRay - if this is not null, it is a pick-cullingfrustumCuller - the FrustumCuller instance to call the FrustumCuller.cullNodeAtoms(Node, org.openmali.spatial.bodies.Classifier.Classification, boolean, View, Point3f, Frustum, RenderBinProvider, OpenGLCapabilities, long, long, long, PickRay, boolean) method on for each Node to be further traversed