Packageaway3d.containers
Classpublic class Scene3D

The Scene3D class represents an independent 3D scene in which 3D objects can be created and manipulated. Multiple Scene3D instances can be created in the same SWF file. Scene management happens through the scene graph, which is exposed using addChild and removeChild methods. Internally, the Scene3D object also manages any space partition objects that have been assigned to objects in the scene graph, of which there is at least 1.

Public Properties
 PropertyDefined by
  numChildren : uint
[read-only] The amount of children directly contained by the scene.
Scene3D
  partition : Partition3D
The root partition to be used by the Scene3D.
Scene3D
Public Methods
 MethodDefined by
  
Creates a new Scene3D object.
Scene3D
  
Adds a child to the scene's root.
Scene3D
  
Retrieves the child with the given index
Scene3D
  
Removes a child from the scene's root.
Scene3D
  
Sends a PartitionTraverser object down the scene partitions
Scene3D
Protected Methods
 MethodDefined by
  
Add a partition if it's not in the list
Scene3D
Property detail
numChildrenproperty
numChildren:uint  [read-only]

The amount of children directly contained by the scene.

Implementation
    public function get numChildren():uint
partitionproperty 
partition:Partition3D  [read-write]

The root partition to be used by the Scene3D.

Implementation
    public function get partition():Partition3D
    public function set partition(value:Partition3D):void
Constructor detail
Scene3D()constructor
public function Scene3D() Init Parameters
Method detail
addChild()method
public function addChild(child:ObjectContainer3D):ObjectContainer3D

Adds a child to the scene's root.

Parameters
child:ObjectContainer3D — The child to be added to the scene

Returns
ObjectContainer3D — A reference to the added child.
addPartitionUnique()method 
protected function addPartitionUnique(partition:Partition3D):void

Add a partition if it's not in the list

Parameters
partition:Partition3D
getChildAt()method 
public function getChildAt(index:uint):ObjectContainer3D

Retrieves the child with the given index

Parameters
index:uint — The index for the child to be retrieved.

Returns
ObjectContainer3D — The child with the given index
invalidateEntityBounds()method 
arcane function invalidateEntityBounds(entity:Entity):void

When an entity has moved or changed size, update its position in its partition tree.

Parameters
entity:Entity
registerPartition()method 
arcane function registerPartition(entity:Entity):void

When a partition is assigned to an object somewhere in the scene graph, add the partition to the list if it isn't in there yet

Parameters
entity:Entity
removeChild()method 
public function removeChild(child:ObjectContainer3D):void

Removes a child from the scene's root.

Parameters
child:ObjectContainer3D — The child to be removed from the scene.
traversePartitions()method 
public function traversePartitions(traverser:PartitionTraverser):void

Sends a PartitionTraverser object down the scene partitions

Parameters
traverser:PartitionTraverser — The traverser which will pass through the partitions.

See also

unregisterPartition()method 
arcane function unregisterPartition(entity:Entity):void

When a partition is removed from an object somewhere in the scene graph, remove the partition from the list if it isn't in there yet

Parameters
entity:Entity
Wiki link
Click to go to the wiki page for 'away3d.containers.Scene3D'

Code examples

Comments