Class sandy.core.transform.RotationInterpolator

Implemented Interfaces

Interpolator3D

Description

RotationInterpolator

Method Index

new RotationInterpolator()
getEndMatrix(), getStartMatrix(), getType(), redo(), setAngles(), setAxisOfRotation(), setPointOfReference(), toString(), yoyo()

Inherited from BasicInterpolator

Constructor Detail

RotationInterpolator

public function RotationInterpolator(f:Function, pnFrames:Number, pmin:Number, pmax:Number)

RotationInterpolator

This class realise a rotation interpolation of the group of objects it has been applied to

Parameters

fFunction The function generating the interpolation value. You can use what you want even if Sandy recommends the Ease class The function must return a number between [0,1] and must have a parameter between [0,1] too.
pminNumber [facultative]The value containing the original rotation offset that will be applied to the object's vertex. Default value is 0.
pmaxNumber [facultative]The value containing the final rotation offset to apply to the object's vertex. Default value is 360.

Method Detail

setAxisOfRotation

public function setAxisOfRotation(v:Vector):Void

Allows you to change the axis of rotation. This axis will be automatically be normalized! If the axis components are very small the rotation will be paused automatically until you change the axis.

Parameters

vVector the vector that contains the axis components.

Return

Nothing

setPointOfReference

public function setPointOfReference(v:Vector):Void

Allows you to make your object rotate around a specific position and not anymore around its center. The value passed in argument represents an offset to the object position. It is NOT the real position of the rotation center.

Parameters

vVector the offset to apply to change the rotation center.

Return

Nothing

setAngles

public function setAngles(start:Number, end:Number):Void

Allows you to change the angles of rotation during the interpolation or once it is finished. If no values are given the default one will be set (0 and 360)

Parameters

startNumber the angle you want to start rotating.
endNumber the angle you want your interpolation finish.

getStartMatrix

public function getStartMatrix(Void):Matrix4

getEndMatrix

public function getEndMatrix(Void):Matrix4

redo

public function redo(Void):Void

redo

Make the interpolation starting again

Specified By

redo() in sandy.core.transform.Interpolator3D

Overrides

redo() in sandy.core.transform.BasicInterpolator

yoyo

public function yoyo(Void):Void

yoyo

Make the interpolation going in the inversed way

Specified By

yoyo() in sandy.core.transform.Interpolator3D

Overrides

yoyo() in sandy.core.transform.BasicInterpolator

getType

public function getType(Void):TransformType

Returns the type of the interpolation.

Parameters

Void

Return

TransformType the type of the interpolation

Overrides

getType() in sandy.core.transform.BasicInterpolator

toString

public function toString():String