Package | org.papervision3d.objects |
Class | public class DisplayObject3D |
Inheritance | DisplayObject3D DisplayObjectContainer3D flash.events.EventDispatcher |
Subclasses | CameraObject3D, Collada, DAE, LightObject3D, Mouse3D, Sound3D, Vertices3D |
Property | Defined by | ||
---|---|---|---|
children : Object
Returns the children object.
| DisplayObjectContainer3D | ||
containerBlendMode : int | DisplayObject3D | ||
containerSortMode : int | DisplayObject3D | ||
culled : Boolean
[internal use] Is this object culled by camera frustum?
| DisplayObject3D | ||
extra : Object
An object that contains user defined properties.
| DisplayObject3D | ||
faceLevelMode : Boolean [static]
This allows objects faces to have their own containers.
| DisplayObject3D | ||
faces : Array
[internal-use]
| DisplayObject3D | ||
filters : Array | DisplayObject3D | ||
geometry : GeometryObject3D
The GeometryObject3D object that contains the 3D definition of this instance.
| DisplayObject3D | ||
id : int
[read-only] Unique id of this instance.
| DisplayObject3D | ||
material : MaterialObject3D | DisplayObject3D | ||
materials : MaterialsList
The list of materials for this instance.
| DisplayObject3D | ||
meshSort : uint = 1
tells Mesh3D's render() method to compare the measurement choice of the user for a triangle's sorting
| DisplayObject3D | ||
name : String
An optional object name.
| DisplayObject3D | ||
numChildren : int
Returns the number of children of this object.
| DisplayObjectContainer3D | ||
parent : DisplayObjectContainer3D
[read-only] Indicates the DisplayObjectContainer3D object that contains this display object.
| DisplayObject3D | ||
root : DisplayObjectContainer3D
[read-only] [read-only] The scene, which is the top-most displayObjectContainer3D in the tree structure.
| DisplayObjectContainer3D | ||
rotationX : Number
Specifies the rotation around the X axis from its original orientation.
| DisplayObject3D | ||
rotationY : Number
Specifies the rotation around the Y axis from its original orientation.
| DisplayObject3D | ||
rotationZ : Number
Specifies the rotation around the Z axis from its original orientation.
| DisplayObject3D | ||
scale : Number
Sets the 3D scale as applied from the registration point of the object.
| DisplayObject3D | ||
scaleX : Number
Sets the scale along the local X axis as applied from the registration point of the object.
| DisplayObject3D | ||
scaleY : Number
Sets the scale along the local Y axis as applied from the registration point of the object.
| DisplayObject3D | ||
scaleZ : Number
Sets the scale along the local Z axis as applied from the registration point of the object.
| DisplayObject3D | ||
scene : SceneObject3D | DisplayObject3D | ||
sceneX : Number [read-only]
The X coordinate of a object relative to the scene coordinate system.
| DisplayObject3D | ||
sceneY : Number [read-only]
The Y coordinate of a object relative to the scene coordinate system.
| DisplayObject3D | ||
sceneZ : Number [read-only]
The Z coordinate of a object relative to the scene coordinate system.
| DisplayObject3D | ||
screen : Number3D
[read-only] The coordinate of the object on screen.
| DisplayObject3D | ||
screenZ : Number
[internal-use] The average depth of the object faces center.
| DisplayObject3D | ||
sortedArray : Array [static]
| DisplayObject3D | ||
transform : Matrix3D
A Matrix3D object containing values that affect the scaling, rotation, and translation of the display object.
| DisplayObject3D | ||
useOwnContainer : Boolean | DisplayObject3D | ||
view : Matrix3D
[internal-use] A camera transformed Matrix3D object.
| DisplayObject3D | ||
visible : Boolean
Whether or not the display object is visible.
| DisplayObject3D | ||
world : Matrix3D
World transformation.
| DisplayObject3D | ||
x : Number
An Number that sets the X coordinate of a object relative to the origin of its parent.
| DisplayObject3D | ||
y : Number
An Number that sets the Y coordinate of a object relative to the origin of its parent.
| DisplayObject3D | ||
z : Number
An Number that sets the Z coordinate of a object relative to the origin of its parent.
| DisplayObject3D | ||
ZERO : DisplayObject3D
[static][read-only]
Returns an empty DiplayObject3D object positioned in the center of the 3D coordinate system (0, 0 ,0).
| DisplayObject3D |
Property | Defined by | ||
---|---|---|---|
_children : Dictionary
[internal-use] Names indexed by children.
| DisplayObjectContainer3D | ||
_childrenByName : Object
[internal-use] Children indexed by name.
| DisplayObjectContainer3D | ||
_containerBlendMode : int | DisplayObject3D | ||
_containerSortMode : int | DisplayObject3D | ||
_filters : Array | DisplayObject3D | ||
_scene : SceneObject3D = null
The scene where the object belongs.
| DisplayObject3D | ||
_sorted : Array | DisplayObject3D | ||
_transformDirty : Boolean = false
[internal-use]
| DisplayObject3D | ||
_useOwnContainer : Boolean | DisplayObject3D |
Method | Defined by | ||
---|---|---|---|
DisplayObject3D(name:String = null, geometry:GeometryObject3D = null, initObject:Object = null)
Creates a new DisplayObject3D instance.
| DisplayObject3D | ||
Adds a child DisplayObject3D instance to this DisplayObjectContainer instance.
| DisplayObject3D | ||
Adds all the children of a DisplayObject3D instance to this DisplayObjectContainer instance.
| DisplayObjectContainer3D | ||
addCollada(filename:String, materials:MaterialsList = null, scale:Number = 1):void
This method has been deprecated.
| DisplayObjectContainer3D | ||
addGeometry(geometry:GeometryObject3D = null):void
Adds a geometry definition to the instance.
| DisplayObject3D | ||
childrenList():String
Returns a string value with the list of objects.
| DisplayObjectContainer3D | ||
copyPosition(reference:*):void
Copies the position information (x, y and z coordinates) from another object or Matrix3D.
| DisplayObject3D | ||
copyTransform(reference:*):void
Copies the transformation information (position, rotation and scale) from another object or Matrix3D.
| DisplayObject3D | ||
distanceTo(obj:DisplayObject3D):Number
Gets the distance to the position of the given object.
| DisplayObject3D | ||
getChildByName(name:String):DisplayObject3D
Returns the child display object that exists with the specified name.
| DisplayObjectContainer3D | ||
getMaterialByName(name:String):MaterialObject3D
Returns the material that exists with the specified name in the materials list.
| DisplayObject3D | ||
hitTestObject(obj:DisplayObject3D, multiplier:Number = 1):Boolean
Evaluates the display object to see if it overlaps or intersects with the obj display object.
| DisplayObject3D | ||
hitTestPoint(x:Number, y:Number, z:Number):Boolean
Evaluates the display object to see if it overlaps or intersects with the point specified by the x, y and z parameters.
| DisplayObject3D | ||
Make the object look at a specific position.
| DisplayObject3D | ||
materialsList():String
Returns a string value with the list of material names of the materials list.
| DisplayObject3D | ||
moveBackward(distance:Number):void
Translate the display object in the opposite direction it is facing, i.e.
| DisplayObject3D | ||
moveDown(distance:Number):void
Translate the display object downwards, with respect to the direction it is facing, i.e.
| DisplayObject3D | ||
moveForward(distance:Number):void
Translate the display object in the direction it is facing, i.e.
| DisplayObject3D | ||
moveLeft(distance:Number):void
Translate the display object lateraly, to the left of the direction it is facing, i.e.
| DisplayObject3D | ||
moveRight(distance:Number):void
Translate the display object lateraly, to the right of the direction it is facing, i.e.
| DisplayObject3D | ||
moveUp(distance:Number):void
Translate the display object upwards, with respect to the direction it is facing, i.e.
| DisplayObject3D | ||
pitch(angle:Number):void
Rotate the display object around its lateral or transverse axis —an axis running from the pilot's left to right in piloted aircraft, and parallel to the wings of a winged aircraft; thus the nose pitches up and the tail down, or vice-versa.
| DisplayObject3D | ||
[internal-use] Projects three dimensional coordinates onto a two dimensional plane to simulate the relationship of the camera to subject.
| DisplayObject3D | ||
Removes the specified child DisplayObject3D instance from the child list of the DisplayObjectContainer3D instance.
| DisplayObjectContainer3D | ||
removeChildByName(name:String):DisplayObject3D
Removes the child DisplayObject3D instance that exists with the specified name, from the child list of the DisplayObjectContainer3D instance.
| DisplayObjectContainer3D | ||
roll(angle:Number):void
Rotate the display object around the longitudinal axis —an axis drawn through the body of the vehicle from tail to nose in the normal direction of flight, or the direction the object is facing.
| DisplayObject3D | ||
toString():String
Returns a string value representing the three-dimensional position values of the display object instance.
| DisplayObject3D | ||
Move the object along a given direction.
| DisplayObject3D | ||
yaw(angle:Number):void
Rotate the display object around about the vertical axis —an axis drawn from top to bottom.
| DisplayObject3D |
Method | Defined by | ||
---|---|---|---|
updateTransform():void
[internal-use] Updates the transform Matrix3D with the current rotation and scale values.
| DisplayObject3D |
Constant | Defined by | ||
---|---|---|---|
MESH_SORT_CENTER : uint = 1 [static]
tells Mesh3D's render() method to sort by measuring from the center of a triangle
| DisplayObject3D | ||
MESH_SORT_CLOSE : uint = 3 [static]
tells Mesh3D's render() method to sort by measuring from the closest point of a triangle
| DisplayObject3D | ||
MESH_SORT_FAR : uint = 2 [static]
tells Mesh3D's render() method to sort by measuring from the farthest point of a triangle
| DisplayObject3D |
_containerBlendMode | property |
protected var _containerBlendMode:int
containerBlendMode | property |
containerBlendMode:int
[read-write]Implementation
public function get containerBlendMode():int
public function set containerBlendMode(value:int):void
_containerSortMode | property |
protected var _containerSortMode:int
containerSortMode | property |
containerSortMode:int
[read-write]Implementation
public function get containerSortMode():int
public function set containerSortMode(value:int):void
culled | property |
public var culled:Boolean
[internal use] Is this object culled by camera frustum?
extra | property |
public var extra:Object
An object that contains user defined properties.
All properties of the extra field are copied into the new instance. The properties specified with extra are publicly available.faceLevelMode | property |
public static var faceLevelMode:Boolean
This allows objects faces to have their own containers.
faces | property |
public var faces:Array
[internal-use]
_filters | property |
protected var _filters:Array
filters | property |
filters:Array
[read-write]Implementation
public function get filters():Array
public function set filters(value:Array):void
geometry | property |
public var geometry:GeometryObject3D
The GeometryObject3D object that contains the 3D definition of this instance.
When different objects share the same geometry, they become instances. They are the same object, displayed multiple times. Changing the shape of this object changes the shape of all of its instances. Instancing an object saves system memory, and is useful to display an object multiple times while maintaining its shape. For example, you could create armies and forests full of duplicate objects without needing the memory to handle that much actual geometry. Each instance has its own transform node so it can have its own position, rotation, and scaling.id | property |
public var id:int
[read-only] Unique id of this instance.
material | property |
material:MaterialObject3D
[read-write]Implementation
public function get material():MaterialObject3D
public function set material(value:MaterialObject3D):void
materials | property |
public var materials:MaterialsList
The list of materials for this instance.
meshSort | property |
public var meshSort:uint = 1
tells Mesh3D's render() method to compare the measurement choice of the user for a triangle's sorting
name | property |
public var name:String
An optional object name.
parent | property |
public var parent:DisplayObjectContainer3D
[read-only] Indicates the DisplayObjectContainer3D object that contains this display object.
rotationX | property |
rotationX:Number
[read-write]Specifies the rotation around the X axis from its original orientation.
Implementation public function get rotationX():Number
public function set rotationX(value:Number):void
rotationY | property |
rotationY:Number
[read-write]Specifies the rotation around the Y axis from its original orientation.
Implementation public function get rotationY():Number
public function set rotationY(value:Number):void
rotationZ | property |
rotationZ:Number
[read-write]Specifies the rotation around the Z axis from its original orientation.
Implementation public function get rotationZ():Number
public function set rotationZ(value:Number):void
scale | property |
scale:Number
[read-write]Sets the 3D scale as applied from the registration point of the object.
Implementation public function get scale():Number
public function set scale(value:Number):void
scaleX | property |
scaleX:Number
[read-write]Sets the scale along the local X axis as applied from the registration point of the object.
Implementation public function get scaleX():Number
public function set scaleX(value:Number):void
scaleY | property |
scaleY:Number
[read-write]Sets the scale along the local Y axis as applied from the registration point of the object.
Implementation public function get scaleY():Number
public function set scaleY(value:Number):void
scaleZ | property |
scaleZ:Number
[read-write]Sets the scale along the local Z axis as applied from the registration point of the object.
Implementation public function get scaleZ():Number
public function set scaleZ(value:Number):void
_scene | property |
protected var _scene:SceneObject3D = null
The scene where the object belongs.
scene | property |
scene:SceneObject3D
[read-write]Implementation
public function get scene():SceneObject3D
public function set scene(value:SceneObject3D):void
sceneX | property |
sceneX:Number
[read-only]The X coordinate of a object relative to the scene coordinate system.
Implementation public function get sceneX():Number
sceneY | property |
sceneY:Number
[read-only]The Y coordinate of a object relative to the scene coordinate system.
Implementation public function get sceneY():Number
sceneZ | property |
sceneZ:Number
[read-only]The Z coordinate of a object relative to the scene coordinate system.
Implementation public function get sceneZ():Number
screen | property |
public var screen:Number3D
[read-only] The coordinate of the object on screen.
screenZ | property |
public var screenZ:Number
[internal-use] The average depth of the object faces center. Used internally for z-sorting.
_sorted | property |
protected var _sorted:Array
sortedArray | property |
public static var sortedArray:Array
transform | property |
public var transform:Matrix3D
A Matrix3D object containing values that affect the scaling, rotation, and translation of the display object.
_transformDirty | property |
protected var _transformDirty:Boolean = false
[internal-use]
_useOwnContainer | property |
protected var _useOwnContainer:Boolean
useOwnContainer | property |
useOwnContainer:Boolean
[read-write]Implementation
public function get useOwnContainer():Boolean
public function set useOwnContainer(value:Boolean):void
view | property |
public var view:Matrix3D
[internal-use] A camera transformed Matrix3D object.
visible | property |
public var visible:Boolean
Whether or not the display object is visible.
A Boolean value that indicates whether the object is projected, transformed and rendered. A value of false will effectively ignore the object. The default value is true.world | property |
public var world:Matrix3D
World transformation.
x | property |
x:Number
[read-write]An Number that sets the X coordinate of a object relative to the origin of its parent.
Implementation public function get x():Number
public function set x(value:Number):void
y | property |
y:Number
[read-write]An Number that sets the Y coordinate of a object relative to the origin of its parent.
Implementation public function get y():Number
public function set y(value:Number):void
z | property |
z:Number
[read-write]An Number that sets the Z coordinate of a object relative to the origin of its parent.
Implementation public function get z():Number
public function set z(value:Number):void
ZERO | property |
ZERO:DisplayObject3D
[read-only]Returns an empty DiplayObject3D object positioned in the center of the 3D coordinate system (0, 0 ,0).
Implementation public static function get ZERO():DisplayObject3D
DisplayObject3D | () | constructor |
public function DisplayObject3D(name:String = null, geometry:GeometryObject3D = null, initObject:Object = null)
Creates a new DisplayObject3D instance. After creating the instance, call the addChild() method of a DisplayObjectContainer3D.
Parametersname:String (default = null ) — [optional] - The name of the newly created object.
|
|
geometry:GeometryObject3D (default = null ) — [optional] - The geometry of the newly created object.
|
|
initObject:Object (default = null ) — [optional] - An object that contains user defined properties with which to populate the newly created DisplayObject3D.
|
addChild | () | method |
public override function addChild(child:DisplayObject3D, name:String = null):DisplayObject3D
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.]
Parameterschild:DisplayObject3D — The DisplayObject3D instance to add as a child of this DisplayObjectContainer3D instance.
|
|
name:String (default = null ) — An optional name of the child to add or create. If no name is provided, the child name will be used.
|
DisplayObject3D —
The DisplayObject3D instance that you have added or created.
|
addGeometry | () | method |
public function addGeometry(geometry:GeometryObject3D = null):void
Adds a geometry definition to the instance. A geometry describes the visual shape and appearance of an object in a scene.
Parametersgeometry:GeometryObject3D (default = null ) — A geometry definition.
|
copyPosition | () | method |
public function copyPosition(reference:*):void
Copies the position information (x, y and z coordinates) from another object or Matrix3D.
Parametersreference:* — A DisplayObject3D or Matrix3D object to copy the position from.
|
copyTransform | () | method |
public function copyTransform(reference:*):void
Copies the transformation information (position, rotation and scale) from another object or Matrix3D.
Parametersreference:* — A DisplayObject3D or Matrix3D object to copy the position from.
|
distanceTo | () | method |
public function distanceTo(obj:DisplayObject3D):Number
Gets the distance to the position of the given object.
Parametersobj:DisplayObject3D — The display object to measure the distance to.
|
Number — The distance to the registration point of the given object.
|
getMaterialByName | () | method |
public function getMaterialByName(name:String):MaterialObject3D
Returns the material that exists with the specified name in the materials list.
If more that one material object has the specified name, the method returns the first material object in the materials list. Parametersname:String — The name of the material to return.
|
MaterialObject3D —
The material object with the specified name.
|
hitTestObject | () | method |
public function hitTestObject(obj:DisplayObject3D, multiplier:Number = 1):Boolean
Evaluates the display object to see if it overlaps or intersects with the obj display object.
Parametersobj:DisplayObject3D — The display object to test against.
|
|
multiplier:Number (default = 1 )
|
Boolean — true if the display objects intersect; false if not.
|
hitTestPoint | () | method |
public function hitTestPoint(x:Number, y:Number, z:Number):Boolean
Evaluates the display object to see if it overlaps or intersects with the point specified by the x, y and z parameters.
The x, y and z parameters specify a point in the coordinate space of the instance parent object, not the scene (unless that parent object is the scene). Parametersx:Number — The x coordinate to test against this object.
|
|
y:Number — The y coordinate to test against this object.
|
|
z:Number — The z coordinate to test against this object.
|
Boolean — true if the display object overlaps or intersects with the specified point; false otherwise.
|
lookAt | () | method |
public function lookAt(targetObject:DisplayObject3D, upAxis:Number3D = null):void
Make the object look at a specific position.
ParameterstargetObject:DisplayObject3D — Object to look at.
|
|
upAxis:Number3D (default = null ) — The vertical axis of the universe. Normally the positive Y axis.
|
materialsList | () | method |
public function materialsList():String
Returns a string value with the list of material names of the materials list.
ReturnsString — A string.
|
moveBackward | () | method |
public function moveBackward(distance:Number):void
Translate the display object in the opposite direction it is facing, i.e. it's negative Z axis.
Parametersdistance:Number — The distance that the object should move backward.
|
moveDown | () | method |
public function moveDown(distance:Number):void
Translate the display object downwards, with respect to the direction it is facing, i.e. it's negative Y axis.
Parametersdistance:Number — The distance that the object should move down.
|
moveForward | () | method |
public function moveForward(distance:Number):void
Translate the display object in the direction it is facing, i.e. it's positive Z axis.
Parametersdistance:Number — The distance that the object should move forward.
|
moveLeft | () | method |
public function moveLeft(distance:Number):void
Translate the display object lateraly, to the left of the direction it is facing, i.e. it's negative X axis.
Parametersdistance:Number — The distance that the object should move left.
|
moveRight | () | method |
public function moveRight(distance:Number):void
Translate the display object lateraly, to the right of the direction it is facing, i.e. it's positive X axis.
Parametersdistance:Number — The distance that the object should move right.
|
moveUp | () | method |
public function moveUp(distance:Number):void
Translate the display object upwards, with respect to the direction it is facing, i.e. it's positive Y axis.
Parametersdistance:Number — The distance that the object should move up.
|
pitch | () | method |
public function pitch(angle:Number):void
Rotate the display object around its lateral or transverse axis —an axis running from the pilot's left to right in piloted aircraft, and parallel to the wings of a winged aircraft; thus the nose pitches up and the tail down, or vice-versa.
Parametersangle:Number — The angle to rotate.
|
project | () | method |
public function project(parent:DisplayObject3D, renderSessionData:RenderSessionData):Number
[internal-use] Projects three dimensional coordinates onto a two dimensional plane to simulate the relationship of the camera to subject.
This is the first step in the process of representing three dimensional shapes two dimensionally. Parametersparent:DisplayObject3D — The DisplayObject3D object that contains this display object.
|
|
renderSessionData:RenderSessionData — Data for the current render.
|
Number |
roll | () | method |
public function roll(angle:Number):void
Rotate the display object around the longitudinal axis —an axis drawn through the body of the vehicle from tail to nose in the normal direction of flight, or the direction the object is facing.
Parametersangle:Number |
setLayerForViewport | () | method |
toString | () | method |
public override function toString():String
Returns a string value representing the three-dimensional position values of the display object instance.
ReturnsString — A string.
|
translate | () | method |
public function translate(distance:Number, axis:Number3D):void
Move the object along a given direction.
Parametersdistance:Number — The distance that the object should travel.
|
|
axis:Number3D — The direction that the object should move towards.
|
updateTransform | () | method |
protected function updateTransform():void
[internal-use] Updates the transform Matrix3D with the current rotation and scale values.
yaw | () | method |
public function yaw(angle:Number):void
Rotate the display object around about the vertical axis —an axis drawn from top to bottom.
Parametersangle:Number — The angle to rotate.
|
MESH_SORT_CENTER | constant |
public static const MESH_SORT_CENTER:uint = 1
tells Mesh3D's render() method to sort by measuring from the center of a triangle
MESH_SORT_CLOSE | constant |
public static const MESH_SORT_CLOSE:uint = 3
tells Mesh3D's render() method to sort by measuring from the closest point of a triangle
MESH_SORT_FAR | constant |
public static const MESH_SORT_FAR:uint = 2
tells Mesh3D's render() method to sort by measuring from the farthest point of a triangle