Drag[en]gine Script Module DragonScript Script API  1.0
DefaultOctree Class Reference
Inheritance diagram for DefaultOctree:

Public Member Functions

void addObject (Object object)
Octree createOctree (int octant)
void dispose ()
Object getObjectAt (int index)
int getObjectCount ()
int hasObject (Object object)
int indexOfObject (Object object)
void insertIntoTree (Object object, Vector boxCenter, Vector boxHalfSize)
DefaultOctree new (Vector center, Vector halfSize)
void removeAllObjects ()
void removeObject (Object object)
- Public Member Functions inherited from Octree
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)

Additional Inherited Members

- Public Attributes inherited from Octree
final int MAX_DEPTH = 8

Detailed Description

Default implementation of the octree storing a list of objects.

Roland Pl├╝ss

Member Function Documentation

§ addObject()

void addObject ( Object  object)

Adds an object.

§ createOctree()

Octree createOctree ( int  octant)

Creates new octree for the specified octant. Implement this function to create a new octree of your own type.

§ dispose()

void dispose ( )

Disposes of the octree freeing all cross references.

§ getObjectAt()

Object getObjectAt ( int  index)

Retrieves the object at the given index.

§ getObjectCount()

int getObjectCount ( )

Retrieves the count of objects.

§ hasObject()

int hasObject ( Object  object)

Determines if the object exists.

§ indexOfObject()

int indexOfObject ( Object  object)

Retrieves the index of the given object or -1 if not existing.

§ insertIntoTree()

void insertIntoTree ( Object  object,
Vector  boxCenter,
Vector  boxHalfSize 

Adds a new object to the octree. The object is placed in the node which hosts the specified box.

§ new()

DefaultOctree new ( Vector  center,
Vector  halfSize 

Creates a new Octree covering the given sub space. The eigth sub-nodes are initially empty.

§ removeAllObjects()

void removeAllObjects ( )

Removes all objects.

§ removeObject()

void removeObject ( Object  object)

Removes an object.

The documentation for this class was generated from the following file: