Packagecom.transmote.flar.utils.smoother
Classpublic class FLARMatrixSmoother_Average
InheritanceFLARMatrixSmoother_Average Inheritance Object
Implements IFLARMatrixSmoother

Averages a number of previous matrices to smooth motion of a model. Angle and position can be smoothed different amounts, by setting positionToRotationRatio. Includes code based on work by Anders Gunnarsson.



Public Properties
 PropertyDefined By
  positionToRotationRatio : Number
Amount of position (x,y,z) smoothing relative to the amount of rotation (x,y,z axes) smoothing.
FLARMatrixSmoother_Average
Public Methods
 MethodDefined By
  
FLARMatrixSmoother_Average
  
dispose():void
Halts all processes and frees this instance for garbage collection.
FLARMatrixSmoother_Average
  
initFromXML(paramsObj:Object):void
Init from a name-value paired object that contains parameters parsed from XML.
FLARMatrixSmoother_Average
  
smoothMatrices(storedMatrices:Vector.<Matrix3D>):Matrix3D
Returns a Matrix3D that is the average of a Vector of Matrix3D instances.
FLARMatrixSmoother_Average
Property Detail
positionToRotationRatioproperty
positionToRotationRatio:Number

Amount of position (x,y,z) smoothing relative to the amount of rotation (x,y,z axes) smoothing. Set either via ActionScript or flarConfig.xml. Defaults to 0.5 (position is smoothed half as much as rotation).


Implementation
    public function get positionToRotationRatio():Number
    public function set positionToRotationRatio(value:Number):void
Constructor Detail
FLARMatrixSmoother_Average()Constructor
public function FLARMatrixSmoother_Average()



Method Detail
dispose()method
public function dispose():void

Halts all processes and frees this instance for garbage collection.

initFromXML()method 
public function initFromXML(paramsObj:Object):void

Init from a name-value paired object that contains parameters parsed from XML.

Parameters

paramsObj:Object

smoothMatrices()method 
public function smoothMatrices(storedMatrices:Vector.<Matrix3D>):Matrix3D

Returns a Matrix3D that is the average of a Vector of Matrix3D instances.

Parameters

storedMatrices:Vector.<Matrix3D> — Vector of stored matrices to average. (storedMatrices is not modified.)

Returns
Matrix3D