Packageaway3d.core.traverse
Classpublic class EntityCollector
InheritanceEntityCollector Inheritance PartitionTraverser
SubclassesShadowCasterCollector

The EntityCollector class is a traverser for scene partitions that collects all scene graph entities that are considered potientially visible.

See also

away3d.partition.Partition3D
away3d.partition.Entity
Public Properties
 PropertyDefined by
  blendedRenderables : Vector
The list of IRenderable objects that require blending and are considered potentially visible.
EntityCollector
  camera : Camera3D
The camera that provides the visible frustum.
EntityCollector
  lights : Vector
[read-only] The lights of which the affecting area intersects the camera's frustum.
EntityCollector
  numMouseEnableds : uint
[read-only] The amount of IRenderable objects that are mouse-enabled.
EntityCollector
  numTriangles : uint
[read-only] The total number of triangles collected, and which will be pushed to the render engine.
EntityCollector
  opaqueRenderables : Vector
The list of opaque IRenderable objects that are considered potentially visible.
EntityCollector
 Inheritedscene : Scene3D
The scene being traversed.
PartitionTraverser
  skyBox : IRenderable
[read-only] The sky box object if encountered.
EntityCollector
Protected Properties
 PropertyDefined by
  _blendedRenderables : Vector
EntityCollector
  _camera : Camera3D
EntityCollector
  _entities : Vector
EntityCollector
  _lights : Vector
EntityCollector
  _numBlended : uint
EntityCollector
  _numEntities : uint
EntityCollector
  _numLights : uint
EntityCollector
  _numMouseEnableds : uint
EntityCollector
  _numOpaques : uint
EntityCollector
  _numTriangles : uint
EntityCollector
  _opaqueRenderables : Vector
EntityCollector
  _skyBox : IRenderable
EntityCollector
Public Methods
 MethodDefined by
  
Creates a new EntityCollector object.
EntityCollector
  
applyEntity(entity:Entity):void
Registers an entity for use.
EntityCollector
  
applyLight(light:LightBase):void
Adds a light to the potentially visible objects.
EntityCollector
  
applyRenderable(renderable:IRenderable):void
Adds an IRenderable object to the potentially visible objects.
EntityCollector
  
applySkyBox(renderable:IRenderable):void
Adds a skybox to the potentially visible objects.
EntityCollector
  
cleanUp():void
Cleans up any data at the end of a frame.
EntityCollector
  
clear():void
Clears all objects in the entity collector.
EntityCollector
  
enterNode(node:NodeBase):Boolean
Returns true if the current node is at least partly in the frustum.
EntityCollector
 Inherited
leaveNode(node:NodeBase):void
Called when the traverser leaves a node.
PartitionTraverser
Property detail
_blendedRenderablesproperty
protected var _blendedRenderables:Vector
blendedRenderablesproperty 
blendedRenderables:Vector  [read-write]

The list of IRenderable objects that require blending and are considered potentially visible.

Implementation
    public function get blendedRenderables():Vector
    public function set blendedRenderables(value:Vector):void
_cameraproperty 
protected var _camera:Camera3D
cameraproperty 
camera:Camera3D  [read-write]

The camera that provides the visible frustum.

Implementation
    public function get camera():Camera3D
    public function set camera(value:Camera3D):void
_entitiesproperty 
protected var _entities:Vector
_lightsproperty 
protected var _lights:Vector
lightsproperty 
lights:Vector  [read-only]

The lights of which the affecting area intersects the camera's frustum.

Implementation
    public function get lights():Vector
_numBlendedproperty 
protected var _numBlended:uint
_numEntitiesproperty 
protected var _numEntities:uint
_numLightsproperty 
protected var _numLights:uint
_numMouseEnabledsproperty 
protected var _numMouseEnableds:uint
numMouseEnabledsproperty 
numMouseEnableds:uint  [read-only]

The amount of IRenderable objects that are mouse-enabled.

Implementation
    public function get numMouseEnableds():uint
_numOpaquesproperty 
protected var _numOpaques:uint
_numTrianglesproperty 
protected var _numTriangles:uint
numTrianglesproperty 
numTriangles:uint  [read-only]

The total number of triangles collected, and which will be pushed to the render engine.

Implementation
    public function get numTriangles():uint
_opaqueRenderablesproperty 
protected var _opaqueRenderables:Vector
opaqueRenderablesproperty 
opaqueRenderables:Vector  [read-write]

The list of opaque IRenderable objects that are considered potentially visible.

Implementation
    public function get opaqueRenderables():Vector
    public function set opaqueRenderables(value:Vector):void
_skyBoxproperty 
protected var _skyBox:IRenderable
skyBoxproperty 
skyBox:IRenderable  [read-only]

The sky box object if encountered.

Implementation
    public function get skyBox():IRenderable
Constructor detail
EntityCollector()constructor
public function EntityCollector() Init Parameters
Method detail
applyEntity()method
public override function applyEntity(entity:Entity):void

Registers an entity for use.

Parameters
entity:Entity
applyLight()method 
public override function applyLight(light:LightBase):void

Adds a light to the potentially visible objects.

Parameters
light:LightBase — The light to add.
applyRenderable()method 
public override function applyRenderable(renderable:IRenderable):void

Adds an IRenderable object to the potentially visible objects.

Parameters
renderable:IRenderable — The IRenderable object to add.
applySkyBox()method 
public override function applySkyBox(renderable:IRenderable):void

Adds a skybox to the potentially visible objects.

Parameters
renderable:IRenderable — The skybox to add.
cleanUp()method 
public function cleanUp():void

Cleans up any data at the end of a frame.

clear()method 
public function clear():void

Clears all objects in the entity collector.

enterNode()method 
public override function enterNode(node:NodeBase):Boolean

Returns true if the current node is at least partly in the frustum. If so, the partition node knows to pass on the traverser to its children.

Parameters
node:NodeBase — The Partition3DNode object to frustum-test.

Returns
Boolean
Wiki link
Click to go to the wiki page for 'away3d.core.traverse.EntityCollector'

Code examples

Comments