The NodeBase class is an abstract base class for any type of space partition tree node. The concrete
subtype will control the creation of its child nodes, which are necessarily of the same type. The exception is
the creation of leaf entity nodes, which is handled by the Partition3D class.
protected var _childNodes:Vector.<NodeBase>
arcane var _collectionMark:uint
protected var _debugPrimitive:WireframePrimitiveBase
protected var _numChildNodes:uint
arcane var _numEntities:int
arcane var _parent:NodeBase
numEntities:int
[read-only]
Implementation protected function get numEntities():int
parent:NodeBase
[read-only]
The parent node. Null if this node is the root.
Implementation public function get parent():NodeBase
showDebugBounds:Boolean
Implementation public function get showDebugBounds():Boolean
public function set showDebugBounds(value:Boolean):void
public function NodeBase()
Creates a new NodeBase object.
public function acceptTraverser(traverser:PartitionTraverser):void
Allows the traverser to visit the current node. If the traverser's enterNode method returns true, the
traverser will be sent down the child nodes of the tree.
This method should be overridden if the order of traversal is important (such as for BSP trees) - or if static
child nodes are not added using addNode, but are linked to separately.
Parameters
See also
arcane function addNode(node:NodeBase):void
Adds a node to the tree. By default, this is used for both static as dynamic nodes, but for some data
structures such as BSP trees, it can be more efficient to only use this for dynamic nodes, and add the
static child nodes using custom links.
Parameters
| node:NodeBase — The node to be added as a child of the current node.
|
protected function createDebugBounds():WireframePrimitiveBase
Returns public function findPartitionForEntity(entity:Entity):NodeBase
Finds the partition that contains (or should contain) the given entity.
Parameters
Returns public function isInFrustum(planes:Vector.<Plane3D>, numPlanes:int):Boolean
Tests if the current node is at least partly inside the frustum.
Parameters
| planes:Vector.<Plane3D> — The raw data of the view projection matrix
|
|
| numPlanes:int |
Returns | Boolean — Whether or not the node is at least partly inside the view frustum.
|
public function isIntersectingRay(rayPosition:Vector3D, rayDirection:Vector3D):Boolean
Tests if the current node is intersecting with a ray.
Parameters
| rayPosition:Vector3D — The starting position of the ray
|
|
| rayDirection:Vector3D — The direction vector of the ray
|
Returns | Boolean — Whether or not the node is at least partly intersecting the ray.
|
arcane function removeNode(node:NodeBase):void
Removes a child node from the tree.
Parameters
| node:NodeBase — The child node to be removed.
|
protected function updateNumEntities(value:int):void
Parameters
Tue May 7 2013, 10:42 PM +01:00