Packageaway3d.core.partition
Classpublic class EntityNode
InheritanceEntityNode Inheritance NodeBase
SubclassesCameraNode, LightNode, MeshNode, RenderableNode, SkyBoxNode

The EntityNode class provides an abstract base class for leaf nodes in a partition tree, containing entities to be fed to the EntityCollector traverser. The concrete subtype of Entity is responsible for creating a matching subtype of EntityNode.

See also

away3d.scenegraph.Entity
away3d.core.traverse.EntityCollector
Public Properties
 PropertyDefined by
  entity : Entity
[read-only] The entity contained in this leaf node.
EntityNode
 Inheritedparent : NodeBase
The parent node.
NodeBase
Protected Properties
 PropertyDefined by
 Inherited_childNodes : Vector
NodeBase
 Inherited_numChildNodes : uint
NodeBase
 Inherited_parent : NodeBase
NodeBase
Public Methods
 MethodDefined by
  
EntityNode
(entity:Entity)
Creates a new EntityNode object.
EntityNode
  
Allows the traverser to visit the current node.
EntityNode
 Inherited
addNode(node:NodeBase):void
Adds a node to the tree.
NodeBase
 Inherited
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.
EntityNode
  
Detaches the node from its parent.
EntityNode
 Inherited
removeNode(node:NodeBase):void
Removes a child node from the tree.
NodeBase
Property detail
entityproperty
entity:Entity  [read-only]

The entity contained in this leaf node.

Implementation
    public function get entity():Entity
Constructor detail
EntityNode()constructor
public function EntityNode(entity:Entity)Parameters
entity:Entity — The Entity to be contained in this leaf node.
Init Parameters
Method detail
acceptTraverser()method
public override 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.
isInFrustum()method 
public override function isInFrustum(camera:Camera3D):Boolean

Tests if the current node is at least partly inside the frustum.

Parameters
camera:Camera3D — The camera providing the view frustum to test against.

Returns
Boolean — Whether or not the node is at least partly inside the view frustum.
removeFromParent()method 
public function removeFromParent():void

Detaches the node from its parent.

Wiki link
Click to go to the wiki page for 'away3d.core.partition.EntityNode'

Code examples

Comments