Packagealternativa.engine3d.core
Classpublic class Object3D
Implementsflash.events.IEventDispatcher
SubclassesBSP, Camera3D, Joint, Mesh, Object3DContainer, Occluder, Sprite3D

Object3D class ia a base class for all 3D objects.



Public Properties
 PropertyDefined by
  alpha : Number = 1
Alpha transparency value.
Object3D
  blendMode : String = "normal"
A value from the flash.
Object3D
  boundMaxX : Number = 1e+22
Right bound of object in its space.
Object3D
  boundMaxY : Number = 1e+22
Front bound of object in its space.
Object3D
  boundMaxZ : Number = 1e+22
Top bound of object in its space.
Object3D
  boundMinX : Number = -1e+22
Left bound of object in its space.
Object3D
  boundMinY : Number = -1e+22
Back bound of object in its space.
Object3D
  boundMinZ : Number = -1e+22
Bottom bound of object in its space.
Object3D
  colorTransform : ColorTransform = null
A ColorTransform object containing values that universally adjust the colors in the display object.
Object3D
  concatenatedMatrix : Matrix3D
[read-only] A Matrix3D object which is the combined result of transformation matrices of object and all its parens.
Object3D
  doubleClickEnabled : Boolean = false
Specifies whether the object receives doubleClick events.
Object3D
  filters : Array = null
An indexed array that contains each filter object currently associated with the display object.
Object3D
  matrix : Matrix3D
Matrix3D object.
Object3D
  mouseEnabled : Boolean = true
Specifies whether this object receives mouse messages.
Object3D
  name : String
Object name.
Object3D
  parent : Object3DContainer
[read-only] Indicates the Object3DContainer object that contains this display object.
Object3D
  rotationX : Number = 0
Rotation angle by X axis (in radians).
Object3D
  rotationY : Number = 0
Rotation angle by Y axis (in radians).
Object3D
  rotationZ : Number = 0
Rotation angle by Z axis (in radians).
Object3D
  scaleX : Number = 1
Scale by X axis.
Object3D
  scaleY : Number = 1
Scale by Y axis.
Object3D
  scaleZ : Number = 1
Scale by Z axis.
Object3D
  useHandCursor : Boolean = false
Set this property to true to show "hand" mouse cursor while hovering the object, false otherwise.
Object3D
  visible : Boolean = true
Whether or not the display object is visible.
Object3D
  x : Number = 0
X coordinate.
Object3D
  y : Number = 0
Y coordinate.
Object3D
  z : Number = 0
Z coordinate.
Object3D
Public Methods
 MethodDefined by
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
Object3D
  
Calculates object bounds in its space.
Object3D
  
calculateResolution(textureWidth:int, textureHeight:int, type:int = 1, matrix:Matrix3D = null):Number
Calculates how many units of 3D space correspond to one pixel of texture.
Object3D
  
Returns an object that is an exact copy of the original object.
Object3D
  
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
Object3D
  
globalToLocal(point:Vector3D):Vector3D
Transforms a point from global space to local spce of the object.
Object3D
  
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
Object3D
  
intersectRay(origin:Vector3D, direction:Vector3D, excludedObjects:Dictionary = null, camera:Camera3D = null):RayIntersectionData
Searches for the ray intersection.
Object3D
  
localToGlobal(point:Vector3D):Vector3D
Transforms a point from local space of object to global spce.
Object3D
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
Object3D
  
toString():String
Returns the string presentation of the specified object.
Object3D
  
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
Object3D
Protected Methods
 MethodDefined by
  
Copies the base properties.
Object3D
Events
 EventSummaryDefined by
   Dispatched when a user presses and releases the main button of the user's pointing device over the same object.Object3D
   Dispatched when a user presses and releases the main button of a pointing device twice in rapid succession over the same object when that object's doubleClickEnabled flag is set to true.Object3D
   Dispatched when a user presses the pointing device button over an object.Object3D
   Dispatched when a user moves the pointing device while it is over an object.Object3D
   Dispatched when the user moves a pointing device away from an object.Object3D
   Dispatched when the user moves a pointing device over an object.Object3D
   Dispatched when a user releases the pointing device button over an object.Object3D
   Dispatched when a mouse wheel is spun over an object.Object3D
   Dispatched when the user moves a pointing device away from an object.Object3D
   Dispatched when the user moves a pointing device over an object.Object3D
Property detail
alphaproperty
public var alpha:Number = 1

Alpha transparency value. Valid values are 0 to1. Default value is 1.

blendModeproperty 
public var blendMode:String = "normal"

A value from the flash.display.BlendMode class that specifies which blend mode to use.

boundMaxXproperty 
public var boundMaxX:Number = 1e+22

Right bound of object in its space.

boundMaxYproperty 
public var boundMaxY:Number = 1e+22

Front bound of object in its space.

boundMaxZproperty 
public var boundMaxZ:Number = 1e+22

Top bound of object in its space.

boundMinXproperty 
public var boundMinX:Number = -1e+22

Left bound of object in its space.

boundMinYproperty 
public var boundMinY:Number = -1e+22

Back bound of object in its space.

boundMinZproperty 
public var boundMinZ:Number = -1e+22

Bottom bound of object in its space.

colorTransformproperty 
public var colorTransform:ColorTransform = null

A ColorTransform object containing values that universally adjust the colors in the display object.

concatenatedMatrixproperty 
concatenatedMatrix:Matrix3D  [read-only]

A Matrix3D object which is the combined result of transformation matrices of object and all its parens.

Implementation
    public function get concatenatedMatrix():Matrix3D
doubleClickEnabledproperty 
public var doubleClickEnabled:Boolean = false

Specifies whether the object receives doubleClick events. Note: it is necessary for mouse events to set interactive property of View object to true.

filtersproperty 
public var filters:Array = null

An indexed array that contains each filter object currently associated with the display object.

matrixproperty 
matrix:Matrix3D  [read-write]

Matrix3D object.

Implementation
    public function get matrix():Matrix3D
    public function set matrix(value:Matrix3D):void
mouseEnabledproperty 
public var mouseEnabled:Boolean = true

Specifies whether this object receives mouse messages. The default value is true. Note: it is necessary for mouse events to set interactive property of View object to true.

nameproperty 
public var name:String

Object name.

parentproperty 
parent:Object3DContainer  [read-only]

Indicates the Object3DContainer object that contains this display object.

Implementation
    public function get parent():Object3DContainer
rotationXproperty 
public var rotationX:Number = 0

Rotation angle by X axis (in radians).

rotationYproperty 
public var rotationY:Number = 0

Rotation angle by Y axis (in radians).

rotationZproperty 
public var rotationZ:Number = 0

Rotation angle by Z axis (in radians).

scaleXproperty 
public var scaleX:Number = 1

Scale by X axis.

scaleYproperty 
public var scaleY:Number = 1

Scale by Y axis.

scaleZproperty 
public var scaleZ:Number = 1

Scale by Z axis.

useHandCursorproperty 
public var useHandCursor:Boolean = false

Set this property to true to show "hand" mouse cursor while hovering the object, false otherwise.

visibleproperty 
public var visible:Boolean = true

Whether or not the display object is visible.

xproperty 
public var x:Number = 0

X coordinate.

yproperty 
public var y:Number = 0

Y coordinate.

zproperty 
public var z:Number = 0

Z coordinate.

Method detail
addEventListener()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. Note: it is necessary for mouse events to set interactive property of View object to true.

Parameters
type:StringEvent type.
 
listener:FunctionEvent listener.
 
useCapture:Boolean (default = false)Specifies whether the listener was registered for the capture phase or the target and bubbling phases.
 
priority:int (default = 0)The priority level of the event listener.
 
useWeakReference:Boolean (default = false)Determines whether the reference to the listener is strong or weak.
calculateBounds()method 
public function calculateBounds():void

Calculates object bounds in its space.

calculateResolution()method 
public function calculateResolution(textureWidth:int, textureHeight:int, type:int = 1, matrix:Matrix3D = null):Number

Calculates how many units of 3D space correspond to one pixel of texture. It is useful for mipmapping.

Parameters
textureWidth:intTexture width.
 
textureHeight:intTexture height.
 
type:int (default = 1)Calculation method: 0 - by first edge, 1 - average value, 2 - max value, 3 - min value.
 
matrix:Matrix3D (default = null)Transformation matrix.

Returns
NumberResolution.

See also

clone()method 
public function clone():Object3D

Returns an object that is an exact copy of the original object.

Returns
Object3DOriginal object clone.
clonePropertiesFrom()method 
protected function clonePropertiesFrom(source:Object3D):void

Copies the base properties.

Parameters
source:Object3DSource object.
dispatchEvent()method 
public function dispatchEvent(event:Event):Boolean

Dispatches an event into the event flow.

Parameters
event:EventThe Event object that is dispatched into the event flow.

Returns
BooleanA value of true if the event was successfully dispatched.
globalToLocal()method 
public function globalToLocal(point:Vector3D):Vector3D

Transforms a point from global space to local spce of the object.

Parameters
point:Vector3DPoint in global space.

Returns
Vector3DPoint in localspace of object.
hasEventListener()method 
public function hasEventListener(type:String):Boolean

Checks whether the EventDispatcher object has any listeners registered for a specific type of event.

Parameters
type:StringEvent type.

Returns
BooleanA value of true if a listener of the specified type is registered; false otherwise.
intersectRay()method 
public function intersectRay(origin:Vector3D, direction:Vector3D, excludedObjects:Dictionary = null, camera:Camera3D = null):RayIntersectionData

Searches for the ray intersection.

Parameters
origin:Vector3DRay origin.
 
direction:Vector3DRay direction.
 
excludedObjects:Dictionary (default = null)The objects that are keys of this dictionary will be excluded from intersection test.
 
camera:Camera3D (default = null)The camera for Sprite3D objects intersection test.

Returns
RayIntersectionDataIntersection test result - RayIntersectionData object. If there is no intersection the value of null will be returned.

See also

localToGlobal()method 
public function localToGlobal(point:Vector3D):Vector3D

Transforms a point from local space of object to global spce.

Parameters
point:Vector3DPoint in local space of object.

Returns
Vector3DPoint in global space.
removeEventListener()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Removes a listener from the EventDispatcher object.

Parameters
type:StringEvent type.
 
listener:FunctionThe listener object to remove.
 
useCapture:Boolean (default = false)Specifies whether the listener was registered for the capture phase or the target and bubbling phases.
toString()method 
public function toString():String

Returns the string presentation of the specified object.

Returns
StringString presentation.
willTrigger()method 
public function willTrigger(type:String):Boolean

Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.

Parameters
type:StringEvent type.

Returns
BooleanA value of true if a listener of the specified type will be triggered; false otherwise.
Event detail
clickevent 
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when a user presses and releases the main button of the user's pointing device over the same object.

doubleClickevent  
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when a user presses and releases the main button of a pointing device twice in rapid succession over the same object when that object's doubleClickEnabled flag is set to true.

mouseDownevent  
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when a user presses the pointing device button over an object.

mouseMoveevent  
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when a user moves the pointing device while it is over an object.

mouseOutevent  
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when the user moves a pointing device away from an object.

mouseOverevent  
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when the user moves a pointing device over an object.

mouseUpevent  
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when a user releases the pointing device button over an object.

mouseWheelevent  
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when a mouse wheel is spun over an object.

rollOutevent  
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when the user moves a pointing device away from an object.

rollOverevent  
Event object type: alternativa.engine3d.core.MouseEvent3D

Dispatched when the user moves a pointing device over an object.