Drag[en]gine Script Module DragonScript Script API
1.0

Classes  
enum  eOctants 
Public Member Functions  
bool  containsBox (Vector boxCenter, Vector boxHalfSize) 
bool  containsPoint (Vector point) 
Octree  createOctree (int octant) 
void  dispose () 
Octree  findNodeAtBox (Vector boxCenter, Vector boxHalfSize) 
Octree  findNodeAtPoint (Vector point) 
int  findOctantAtBox (Vector boxCenter, Vector boxHalfSize) 
int  findOctantAtPoint (Vector point) 
Vector  getCenter () 
Vector  getHalfSize () 
Octree  getNodeAt (int index) 
Octree  getNodeAtBox (Vector boxCenter, Vector boxHalfSize) 
Octree  getParent () 
Octree  new (Vector center, Vector halfSize) 
Octree  searchTreeForBox (Vector boxCenter, Vector boxHalfSize) 
Octree  searchTreeForPoint (Vector point) 
void  setNodeAt (int index, Octree node) 
void  setParent (Octree parent) 
Public Attributes  
final int  MAX_DEPTH = 8 
Extendible octree implementation. The class has to be subclassed to provide the required behavior like content management and creation of new nodes.
Determines if the box is located completely in this node.
bool containsPoint  (  Vector  point  ) 
Determines if the point is located in this node.
Octree createOctree  (  int  octant  ) 
Creates new octree for the specified octant. Implement this function to create a new octree of your own type. Do not set the parent of octree. The caller is responsible for this action if applicable.
void dispose  (  ) 
Disposes of the octree freeing all cross references.
Looks for the child node in which the box lies. If found the node is returned. If no node could be found null or the node does not exist yet null is returned.
Looks for the child node in which the point lies. If found the node is returned. If no node could be found null or the node does not exist yet null is returned.
Looks for the octant in which the element lies. Returns OCTANT_NOT_FOUND if no octant fully contains the element.
int findOctantAtPoint  (  Vector  point  ) 
Looks for the octant in which the point lies.
Vector getCenter  (  ) 
Retrieves the center of the node.
Vector getHalfSize  (  ) 
Retrieves the half size of the node.
Octree getNodeAt  (  int  index  ) 
Retrieves one of the 8 child nodes. This is null if there exists no such node yet. You can use either an index from 0 to 7 inclusive or use one of the the OCTANT_* constants.
Looks for the child node in which the given box lies. If the child node does not yet exist it is created. If found the node is returned. If no node could be found null is returned.
Octree getParent  (  ) 
Retrieves the parent of the octree or null if this is the root.
Creates a new Octree covering the given sub space. The eigth subnodes are initially empty.
Searches for the Node containing a given box.
void setNodeAt  (  int  index, 
Octree  node  
) 
Sets one of the eight child nodes. You can use either an index from 0 to 7 inclusive or use one of the the OCTANT_* constants. Node can be null to remove the child node.
void setParent  (  Octree  parent  ) 
Sets the parent of the octree or null if this is the root.
final int MAX_DEPTH = 8 
Max depth.