DisplayObjectContainer3D
| Kind of class: | public class |
|---|---|
| Package: | org.papervision3d.core.proto |
| Inherits from: | EventDispatcher |
| Known subclasses: | |
| Classpath: | org.papervision3d.core.proto.DisplayObjectContainer3D |
| File last modified: | Sunday, 02 March 2008, 15:23:35 |
The DisplayObjectContainer3D class is the base class for all objects that can serve as DisplayObject3D containers.Each DisplayObjectContainer3D object has its own child list.
Summary
Constructor
- DisplayObjectContainer3D : void
- Creates a new DisplayObjectContainer3D object.
Instance properties
- root : DisplayObjectContainer3D
- [read-only] [read-only] The scene, which is the top-most displayObjectContainer3D in the tree structure.
- numChildren : int
- Returns the number of children of this object.
- children : Object
- Returns the children object.
Instance methods
- addCollada (filename:String, materials:MaterialsList = null, scale:Number = 1) : void
- This method has been deprecated.
- addChild (child:DisplayObject3D, name:String = null) : DisplayObject3D
- Adds a child DisplayObject3D instance to this DisplayObjectContainer instance.
- addChildren (parent:DisplayObject3D) : DisplayObjectContainer3D
- Adds all the children of a DisplayObject3D instance to this DisplayObjectContainer instance.
- removeChild (child:DisplayObject3D) : DisplayObject3D
- Removes the specified child DisplayObject3D instance from the child list of the DisplayObjectContainer3D instance.
- getChildByName (name:String) : DisplayObject3D
- Returns the child display object that exists with the specified name.
- removeChildByName (name:String) : DisplayObject3D
- Removes the child DisplayObject3D instance that exists with the specified name, from the child list of the DisplayObjectContainer3D instance.
- toString : String
- Returns a string value with the list of objects.
- childrenList : String
- Returns a string value with the list of objects.
Constructor
DisplayObjectContainer3D
public function DisplayObjectContainer3D (
) : void
Creates a new DisplayObjectContainer3D object.
Instance properties
children
public children:Object
(read)
Returns the children object.
numChildren
public numChildren:int
(read)
Returns the number of children of this object.
root
[read-only] [read-only] The scene, which is the top-most displayObjectContainer3D in the tree structure.
Instance methods
addChild
Adds a child DisplayObject3D instance to this DisplayObjectContainer instance.
[TODO: If you add a child object that already has a different display object container as a parent, the object is removed from the child list of the other display object container.]
[TODO: If you add a child object that already has a different display object container as a parent, the object is removed from the child list of the other display object container.]
Parameters:
child:
The DisplayObject3D instance to add as a child of this DisplayObjectContainer3D instance.
name :
An optional name of the child to add or create. If no name is provided, the child name will be used.
Returns:
- The DisplayObject3D instance that you have added or created.
addChildren
Adds all the children of a DisplayObject3D instance to this DisplayObjectContainer instance.
Parameters:
child:
The DisplayObjectContainer3D instance that contains the children to add.
Returns:
- The DisplayObject3D instance that you have added or created.
addCollada
public function addCollada (
filename:String,
materials:MaterialsList = null,
scale:Number = 1) : void
This method has been deprecated.
childrenList
public function childrenList (
) : String
Returns a string value with the list of objects.
Returns:
- A string.
getChildByName
Returns the child display object that exists with the specified name.If more that one child display object has the specified name, the method returns the first object in the child list.
Parameters:
name:
The name of the child to return.
Returns:
- The child display object with the specified name.
removeChild
Removes the specified child DisplayObject3D instance from the child list of the DisplayObjectContainer3D instance.[TODO: The parent property of the removed child is set to null, and the object is garbage collected if no other references to the child exist.]The garbage collector is the process by which Flash Player reallocates unused memory space. When a variable or object is no longer actively referenced or stored somewhere, the garbage collector sweeps through and wipes out the memory space it used to occupy if no other references to it exist.
Parameters:
child:
The DisplayObject3D instance to remove.
Returns:
- The DisplayObject3D instance that you pass in the child parameter.
removeChildByName
Removes the child DisplayObject3D instance that exists with the specified name, from the child list of the DisplayObjectContainer3D instance.If more that one child display object has the specified name, the method removes the first object in the child list.[TODO: The parent property of the removed child is set to null, and the object is garbage collected if no other references to the child exist.]The garbage collector is the process by which Flash Player reallocates unused memory space. When a variable or object is no longer actively referenced or stored somewhere, the garbage collector sweeps through and wipes out the memory space it used to occupy if no other references to it exist.
Parameters:
name:
The name of the child to remove.
Returns:
- The DisplayObject3D instance that was removed.
toString
override public function toString (
) : String
Returns a string value with the list of objects.
Returns:
- A string.
Overrides:
- EventDispatcher.toString