Packageflare.utils
Classpublic class Pivot3DUtils
InheritancePivot3DUtils Inheritance Object

The Pivot3DUtils class contains help tools to work with Pivot3D-type objects.



Public Methods
 MethodDefined By
  
appendAnimation(dest:Pivot3D, animation:Pivot3D, label:String = null, includeMaterials:Boolean = false):void
[static] Add animation frames and labels to source pivot from another pivot, including children.
Pivot3DUtils
  
getBounds(pivot:Pivot3D, out:Boundings3D = null, relativeTo:Pivot3D = null, includeChildren:Boolean = true):Boundings3D
[static] Gets the boundings for the specified pivot.
Pivot3DUtils
  
getDistance(pivot1:Pivot3D, pivot2:Pivot3D):Number
[static] Returns the distance between two objects.
Pivot3DUtils
  
getVectorBounds(vector:Vector.<Pivot3D>, out:Boundings3D = null, relativeTo:Pivot3D = null):Boundings3D
[static] Returns the bounding volume for a specified list of objects.
Pivot3DUtils
  
lookAtWithReference(pivot:Pivot3D, x:Number, y:Number, z:Number, reference:Pivot3D, up:Vector3D = null, smooth:Number = 1):void
[static] Points the object direction towards a given position using a reference object.
Pivot3DUtils
  
removeAnimations(pivot:Pivot3D, includeChildren:Boolean = true):void
[static] Removes all pivot animations and its labels.
Pivot3DUtils
  
setAnimations(dest:Pivot3D, source:Pivot3D):void
[static] This method replaces all pivot dest animations and labels by the source ones using pivot names.
Pivot3DUtils
  
setPositionWithReference(pivot:Pivot3D, x:Number, y:Number, z:Number, reference:Pivot3D, smooth:Number = 1):void
[static] Positions an object using another as reference.
Pivot3DUtils
  
traceInfo(pivot:Pivot3D, includeMaterials:Boolean = false, includeChildren:Boolean = true):void
[static] Returns information about an object and its properties at the Flash output.
Pivot3DUtils
Method Detail
appendAnimation()method
public static function appendAnimation(dest:Pivot3D, animation:Pivot3D, label:String = null, includeMaterials:Boolean = false):void

Add animation frames and labels to source pivot from another pivot, including children.

The pivot names and hierarchy must be the same.

Parameters

dest:Pivot3D — Pivot who want to append the animations.
 
animation:Pivot3D — The pivot that contains the animations to add to dest pivot.
 
label:String (default = null) — Optionally, you can set a new label name to define the appened animation.
 
includeMaterials:Boolean (default = false) — If materials has animated parameters, they will be append.

getBounds()method 
public static function getBounds(pivot:Pivot3D, out:Boundings3D = null, relativeTo:Pivot3D = null, includeChildren:Boolean = true):Boundings3D

Gets the boundings for the specified pivot.

Parameters

pivot:Pivot3D — The pivot to test.
 
out:Boundings3D (default = null) — A Boundings3D instance, otherwise, a new one will be created.
 
relativeTo:Pivot3D (default = null) — Use the scene to get the bounds in world space, otherwise, it will be used the pivot local space.
 
includeChildren:Boolean (default = true) — true to include all its pivot children.

Returns
Boundings3D — A Boundings3D instance with its new calculated values.
getDistance()method 
public static function getDistance(pivot1:Pivot3D, pivot2:Pivot3D):Number

Returns the distance between two objects. This method uses the global space of the scene.

Parameters

pivot1:Pivot3D — First object to be tested.
 
pivot2:Pivot3D — Second object to be tested.

Returns
Number — Distance between the two objects.
getVectorBounds()method 
public static function getVectorBounds(vector:Vector.<Pivot3D>, out:Boundings3D = null, relativeTo:Pivot3D = null):Boundings3D

Returns the bounding volume for a specified list of objects.

Parameters

vector:Vector.<Pivot3D> — The list of objects to test.
 
out:Boundings3D (default = null) — A boundings3D object, otherwise, a new one will be returned.
 
relativeTo:Pivot3D (default = null) — Use the scene to get the bounds in world space, otherwise, it will be used each object local space.

Returns
Boundings3D — A Boundings3D instance with its new calculated values.
lookAtWithReference()method 
public static function lookAtWithReference(pivot:Pivot3D, x:Number, y:Number, z:Number, reference:Pivot3D, up:Vector3D = null, smooth:Number = 1):void

Points the object direction towards a given position using a reference object. The coordinates used correspond to the local space of the 'reference' parameter.

Parameters

pivot:Pivot3D — pivot Object to be oriented.
 
x:Number — Reference object position on the x axis.
 
y:Number — Reference object position on the Y axis.
 
z:Number — Reference object position on the Z axis.
 
reference:Pivot3D — Object to be used as referente for "x", "y" and "z" parameters.
 
up:Vector3D (default = null) — Vector3D corresponding to the direction of the object upper side. If omitted, the default value (0, 1, 0) will be used.
 
smooth:Number (default = 1) — Optional interpolation value towards final transformation (0-1).

See also

removeAnimations()method 
public static function removeAnimations(pivot:Pivot3D, includeChildren:Boolean = true):void

Removes all pivot animations and its labels.

Parameters

pivot:Pivot3D — The pivot from where you want to remove the animations.
 
includeChildren:Boolean (default = true) — 'true' if all the hierarchy is to be included.

setAnimations()method 
public static function setAnimations(dest:Pivot3D, source:Pivot3D):void

This method replaces all pivot dest animations and labels by the source ones using pivot names. Allowing to keep multiple object aniamtions synchronized and avoiding the need to append the animations for each one.

Parameters

dest:Pivot3D — The destination pivot.
 
source:Pivot3D — The source pivot from where the animations will be taken.

setPositionWithReference()method 
public static function setPositionWithReference(pivot:Pivot3D, x:Number, y:Number, z:Number, reference:Pivot3D, smooth:Number = 1):void

Positions an object using another as reference.

Parameters

pivot:Pivot3D — Object to be positioned.
 
x:Number — Reference object position on the X axis.
 
y:Number — Reference object position on the Y axis.
 
z:Number — Reference object position on the Z axis.
 
reference:Pivot3D — Object to be used as reference.
 
smooth:Number (default = 1) — Optional interpolation value towards final transformation (0-1).

traceInfo()method 
public static function traceInfo(pivot:Pivot3D, includeMaterials:Boolean = false, includeChildren:Boolean = true):void

Returns information about an object and its properties at the Flash output.

Parameters

pivot:Pivot3D — Object to be tested.
 
includeMaterials:Boolean (default = false) — 'true' if information about the materials is to be included.
 
includeChildren:Boolean (default = true) — 'true' if all the hierarchy is to be included.