Package | away3d.core.partition |
Class | public class NodeBase |
Inheritance | NodeBase Object |
Subclasses | EntityNode, NullNode, OctreeNode, QuadTreeNode |
See also
Property | Defined By | ||
---|---|---|---|
parent : NodeBase [read-only]
The parent node. | NodeBase | ||
showDebugBounds : Boolean | NodeBase |
Property | Defined By | ||
---|---|---|---|
_childNodes : Vector.<NodeBase> | NodeBase | ||
_numChildNodes : uint | NodeBase | ||
_parent : NodeBase | NodeBase |
Method | Defined By | ||
---|---|---|---|
NodeBase()
Creates a new NodeBase object. | NodeBase | ||
acceptTraverser(traverser:PartitionTraverser):void
Allows the traverser to visit the current node. | NodeBase | ||
Adds a node to the tree. | NodeBase | ||
Finds the partition that contains (or should contain) the given entity. | NodeBase | ||
isInFrustum(camera:Camera3D):Boolean
Tests if the current node is at least partly inside the frustum. | NodeBase | ||
removeNode(node:NodeBase):void
Removes a child node from the tree. | NodeBase |
Method | Defined By | ||
---|---|---|---|
NodeBase |
_childNodes | property |
protected var _childNodes:Vector.<NodeBase>
_numChildNodes | property |
protected var _numChildNodes:uint
_numEntities | property |
arcane var _numEntities:int
_parent | property |
protected var _parent:NodeBase
parent | property |
parent:NodeBase
[read-only] The parent node. Null if this node is the root.
public function get parent():NodeBase
showDebugBounds | property |
showDebugBounds:Boolean
public function get showDebugBounds():Boolean
public function set showDebugBounds(value:Boolean):void
NodeBase | () | Constructor |
public function NodeBase()
Creates a new NodeBase object.
acceptTraverser | () | method |
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
traverser:PartitionTraverser — The traverser visiting the node.
|
See also
addNode | () | method |
public 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.
|
createDebugBounds | () | method |
findPartitionForEntity | () | method |
public function findPartitionForEntity(entity:Entity):NodeBase
Finds the partition that contains (or should contain) the given entity.
Parameters
entity:Entity |
NodeBase |
isInFrustum | () | method |
public function isInFrustum(camera:Camera3D):Boolean
Tests if the current node is at least partly inside the frustum.
Parameters
camera:Camera3D — The raw data of the view projection matrix
|
Boolean — Whether or not the node is at least partly inside the view frustum.
|
removeNode | () | method |
public function removeNode(node:NodeBase):void
Removes a child node from the tree.
Parameters
node:NodeBase — The child node to be removed.
|