Packagealternativa.engine3d.containers
Classpublic class LODContainer
InheritanceLODContainer Inheritance Object3DContainer Inheritance Object3D

Container with child objects with different detalization. There is corresponding distance for each child object. Distance to camera is calculated during drawing and it determines the object with the most corresponding level of detail. Other children are not drawn.



Public Properties
 PropertyDefined by
 Inheritedalpha : Number = 1
Alpha transparency value.
Object3D
 InheritedblendMode : String = "normal"
A value from the flash.
Object3D
 InheritedboundMaxX : Number = 1e+22
Right bound of object in its space.
Object3D
 InheritedboundMaxY : Number = 1e+22
Front bound of object in its space.
Object3D
 InheritedboundMaxZ : Number = 1e+22
Top bound of object in its space.
Object3D
 InheritedboundMinX : Number = -1e+22
Left bound of object in its space.
Object3D
 InheritedboundMinY : Number = -1e+22
Back bound of object in its space.
Object3D
 InheritedboundMinZ : Number = -1e+22
Bottom bound of object in its space.
Object3D
 InheritedcolorTransform : ColorTransform = null
A ColorTransform object containing values that universally adjust the colors in the display object.
Object3D
 InheritedconcatenatedMatrix : Matrix3D
A Matrix3D object which is the combined result of transformation matrices of object and all its parens.
Object3D
 InheriteddoubleClickEnabled : Boolean = false
Specifies whether the object receives doubleClick events.
Object3D
 Inheritedfilters : Array = null
An indexed array that contains each filter object currently associated with the display object.
Object3D
 Inheritedmatrix : Matrix3D
Matrix3D object.
Object3D
 InheritedmouseChildren : Boolean = true
Determines whether or not the children of the object are mouse enabled.
Object3DContainer
 InheritedmouseEnabled : Boolean = true
Specifies whether this object receives mouse messages.
Object3D
 Inheritedname : String
Object name.
Object3D
 InheritednumChildren : int
Returns the number of children of this object.
Object3DContainer
 Inheritedparent : Object3DContainer
Indicates the Object3DContainer object that contains this display object.
Object3D
 InheritedrotationX : Number = 0
Rotation angle by X axis (in radians).
Object3D
 InheritedrotationY : Number = 0
Rotation angle by Y axis (in radians).
Object3D
 InheritedrotationZ : Number = 0
Rotation angle by Z axis (in radians).
Object3D
 InheritedscaleX : Number = 1
Scale by X axis.
Object3D
 InheritedscaleY : Number = 1
Scale by Y axis.
Object3D
 InheritedscaleZ : Number = 1
Scale by Z axis.
Object3D
 InheriteduseHandCursor : Boolean = false
Set this property to true to show "hand" mouse cursor while hovering the object, false otherwise.
Object3D
 Inheritedvisible : Boolean = true
Whether or not the display object is visible.
Object3D
 Inheritedx : Number = 0
X coordinate.
Object3D
 Inheritedy : Number = 0
Y coordinate.
Object3D
 Inheritedz : Number = 0
Z coordinate.
Object3D
Public Methods
 MethodDefined by
 Inherited
Adds a child Object3D instance to this Object3DContainer instance.
Object3DContainer
 Inherited
addChildAt(child:Object3D, index:int):Object3D
Adds a child Object3D instance to this Object3DContainer instance.
Object3DContainer
 Inherited
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
  
addLOD(lod:Object3D, distance:Number):Object3D
Adds child object and sets distance to it.
LODContainer
 Inherited
Calculates object bounds in its space.
Object3D
 Inherited
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.
LODContainer
 Inherited
contains(child:Object3D):Boolean
Determines whether the specified display object is a child of the Object3DContainer instance or the instance itself.
Object3DContainer
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
Object3D
 Inherited
getChildAt(index:int):Object3D
Returns the child object instance that exists at the specified index.
Object3DContainer
 Inherited
getChildByName(name:String):Object3D
Returns the child object that exists with the specified name.
Object3DContainer
  
getChildDistance(child:Object3D):Number
Returns the distance of supplied object.
LODContainer
 Inherited
Returns the index position of a child object instance.
Object3DContainer
 Inherited
globalToLocal(point:Vector3D):Vector3D
Transforms a point from global space to local spce of the object.
Object3D
 Inherited
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.
LODContainer
 Inherited
localToGlobal(point:Vector3D):Vector3D
Transforms a point from local space of object to global spce.
Object3D
 Inherited
Removes the specified child object from the child list of the Object3DContainer instance.
Object3DContainer
 Inherited
removeChildAt(index:int):Object3D
Removes a child object from the specified index position in the child list of the Object3DContainer.
Object3DContainer
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
Object3D
  
setChildDistance(child:Object3D, distance:Number):void
Changes the distance of an existing child in the container.
LODContainer
 Inherited
setChildIndex(child:Object3D, index:int):void
Changes the position of an existing child in the Object3DContainer.
Object3DContainer
 Inherited
swapChildren(child1:Object3D, child2:Object3D):void
Swaps the order of the two specified child objects.
Object3DContainer
 Inherited
swapChildrenAt(index1:int, index2:int):void
Swaps the order of the child objects at the two specified index positions in the child list.
Object3DContainer
 Inherited
toString():String
Returns the string presentation of the specified object.
Object3D
 Inherited
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
 Inherited
Copies the base properties.
Object3DContainer
Events
 EventSummaryDefined by
 Inherited Dispatched when a user presses and releases the main button of the user's pointing device over the same object.Object3D
 Inherited 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
 Inherited Dispatched when a user presses the pointing device button over an object.Object3D
 Inherited Dispatched when a user moves the pointing device while it is over an object.Object3D
 Inherited Dispatched when the user moves a pointing device away from an object.Object3D
 Inherited Dispatched when the user moves a pointing device over an object.Object3D
 Inherited Dispatched when a user releases the pointing device button over an object.Object3D
 Inherited Dispatched when a mouse wheel is spun over an object.Object3D
 Inherited Dispatched when the user moves a pointing device away from an object.Object3D
 Inherited Dispatched when the user moves a pointing device over an object.Object3D
Method detail
addLOD()method
public function addLOD(lod:Object3D, distance:Number):Object3D

Adds child object and sets distance to it.

Parameters
lod:Object3DThe Object3D instance to add as a child of this Object3DContainer instance.
 
distance:NumberDistance.

Returns
Object3DObject3D instance.
clone()method 
public override function clone():Object3D

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

Returns
Object3DOriginal object clone.
getChildDistance()method 
public function getChildDistance(child:Object3D):Number

Returns the distance of supplied object.

Parameters
child:Object3DThe child object instance for which you want to change the index number.

Returns
NumberDistance.
intersectRay()method 
public override 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 exluded 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.
setChildDistance()method 
public function setChildDistance(child:Object3D, distance:Number):void

Changes the distance of an existing child in the container.

Parameters
child:Object3DThe child object instance for which you want to change the index number.
 
distance:NumberDistance.