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.

Constructor

new()

Creates a new Scene3D object.

Variables

Methods

addChild(child:ObjectContainer3D):ObjectContainer3D

Adds a child to the scene's root.

Parameters:

child

The child to be added to the scene

Returns:

A reference to the added child.

getChildAt(index:Int):ObjectContainer3D

Retrieves the child with the given index

Parameters:

index

The index for the child to be retrieved.

Returns:

The child with the given index

invalidateEntityBounds(entity:Entity):Void

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

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

removeChild(child:ObjectContainer3D):Void

Removes a child from the scene's root.

Parameters:

child

The child to be removed from the scene.

removeChildAt(index:Int):Void

Removes a child from the scene's root.

Parameters:

index

Index of child to be removed from the scene.

traversePartitions(traverser:PartitionTraverser):Void

Sends a PartitionTraverser object down the scene partitions

Parameters:

traverser

The traverser which will pass through the partitions.

See also:

  • away3d.core.traverse.PartitionTraverser

  • away3d.core.traverse.EntityCollector

unregisterPartition(entity:Entity):Void

When a partition is removed from an object somewhere in the scene graph, remove the partition from the list