Maven module :un.api : api-geometry :
Class : un.api.geometry.index.octtrees.OctTreeSDBasic
Extends/Implements : un.api.geometry.index.octtrees.OctTreeSDType
Subclasses : -


An octtree implementation based on {@link OctTreeBasic}, but extended with
the concept of static/dynamic categorization for inserted objects.



As mentioned in {@link un.api.geometry.index.quadtrees.QuadTreeBasic}, many
games/simulations populate a octtree once per frame with all of the objects
in a scene. As many of these objects are immovable, they are inserted into
the exact same place in the tree every frame, which is wasteful and
redundant.



This implementation essentially allows the programmer to insert all
immovable objects into the tree once and then simply remove and replace the
movable objects once per frame, saving much CPU time.



@param The precise type of octtree members.
@author Mark Raynsford


Variables : -
Functions : newOctTree, octTreeClear, octTreeGetPositionX, octTreeGetPositionY, octTreeGetPositionZ, octTreeGetSizeX, octTreeGetSizeY, octTreeGetSizeZ, octTreeInsert, octTreeInsertSD, octTreeIterateObjects, octTreeQueryRaycast, octTreeQueryVolumeContaining, octTreeQueryVolumeOverlapping, octTreeRemove, octTreeSDClearDynamic, octTreeTraverse, toString




Construct a new octtree with the given size and position.
param  size
The size.
param  position
The position.
return  A new octtree.
param  
The precise type of octtree members.
public OctTreeSDType newOctTree (Vector size, Vector position)

public void octTreeClear ()

public double octTreeGetPositionX ()

public double octTreeGetPositionY ()

public double octTreeGetPositionZ ()

public double octTreeGetSizeX ()

public double octTreeGetSizeY ()

public double octTreeGetSizeZ ()

public boolean octTreeInsert (T item)

public boolean octTreeInsertSD (T item, SDType type)

public void octTreeIterateObjects (Predicate f)

public void octTreeQueryRaycast (Ray ray, SortedSet> items)

public void octTreeQueryVolumeContaining (BBox volume, SortedSet items)

public void octTreeQueryVolumeOverlapping (BBox volume, SortedSet items)

public boolean octTreeRemove (T item)

public void octTreeSDClearDynamic ()

public void octTreeTraverse (OctTreeTraversalType traversal)

public String toString ()