Moai SDK  1.5 revision 1 (MoaiEdition)
MOAITransform2D Class Reference
Inheritance diagram for MOAITransform2D:
MOAITransformBase MOAINode MOAIInstanceEventSource MOAIEventSource MOAICamera2D MOAIProp2D MOAILayer2D

List of all members.

Function List

  addLoc
  addPiv
  addRot
  addScl
  getLoc
  getPiv
  getRot
  getScl
  modelToWorld
  move
  moveLoc
  movePiv
  moveRot
  moveScl
  seek
  seekLoc
  seekPiv
  seekRot
  seekScl
  setLoc
  setParent
  setPiv
  setRot
  setScl
  worldToModel

Function Documentation

SUPPRESS_EMPTY_FILE_WARNING addLoc

Adds a delta to the transform's location.


function addLoc ( MOAITransform2D self, number xDelta, number yDelta )
Parameters:
self ( MOAITransform2D )
xDelta ( number )
yDelta ( number )
Returns:
nil

Adds a delta to the transform's pivot.


function addPiv ( MOAITransform2D self, number xDelta, number yDelta )
Parameters:
self ( MOAITransform2D )
xDelta ( number )
yDelta ( number )
Returns:
nil

Adds a delta to the transform's rotation.


function addRot ( MOAITransform2D self, number xDelta, number yDelta )
Parameters:
self ( MOAITransform2D )
xDelta ( number ) In degrees.
yDelta ( number ) In degrees.
Returns:
nil

Adds a delta to the transform's scale.


function addScl ( MOAITransform2D self, number xSclDelta [, number ySclDelta ] )
Parameters:
self ( MOAITransform2D )
xSclDelta ( number )
ySclDelta ( number ) Optional. Default value is xSclDelta.
Returns:
nil

Returns the transform's current location.


function getLoc ( MOAITransform2D self )
Parameters:
self ( MOAITransform2D )
Returns:
xLoc ( number ), yLoc ( number )

Returns the transform's current pivot.


function getPiv ( MOAITransform2D self )
Parameters:
self ( MOAITransform2D )
Returns:
xPiv ( number ), yPiv ( number )

Returns the transform's current rotation.


function getRot ( MOAITransform2D self )
Parameters:
self ( MOAITransform2D )
Returns:
zRot ( number )

Returns the transform's current scale.


function getScl ( MOAITransform2D self )
Parameters:
self ( MOAITransform2D )
Returns:
xScl ( number ), yScl ( number )

Transform a point in model space to world space.


function modelToWorld ( MOAITransform2D self [, number x, number y ] )
Parameters:
self ( MOAITransform2D )
x ( number ) Optional. Default value is 0.
y ( number ) Optional. Default value is 0.
Returns:
x ( number ), y ( number )

Animate the transform by applying a delta. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function move ( MOAITransform2D self, number xDelta, number yDelta, number zRotDelta, number xSclDelta, number ySclDelta, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
xDelta ( number ) Delta to be added to x.
yDelta ( number ) Delta to be added to y.
zRotDelta ( number ) Delta to be added to z rot (in degrees).
xSclDelta ( number ) Delta to be added to x scale.
ySclDelta ( number ) Delta to be added to y scale.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the transform by applying a delta. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function moveLoc ( MOAITransform2D self, number xDelta, number yDelta, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
xDelta ( number ) Delta to be added to x.
yDelta ( number ) Delta to be added to y.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the transform by applying a delta. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function movePiv ( MOAITransform2D self, number xDelta, number yDelta, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
xDelta ( number ) Delta to be added to xPiv.
yDelta ( number ) Delta to be added to yPiv.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the transform by applying a delta. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function moveRot ( MOAITransform2D self, number zDelta, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
zDelta ( number ) Delta to be added to zRot (in degrees).
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the transform by applying a delta. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function moveScl ( MOAITransform2D self, number xSclDelta, number ySclDelta, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
xSclDelta ( number ) Delta to be added to x scale.
ySclDelta ( number ) Delta to be added to y scale.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the transform by applying a delta. Delta is computed given a target value. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function seek ( MOAITransform2D self, number xGoal, number yGoal, number zRotGoal, number xSclGoal, number ySclGoal, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
xGoal ( number ) Desired resulting value for x.
yGoal ( number ) Desired resulting value for y.
zRotGoal ( number ) Desired resulting value for z rot (in degrees).
xSclGoal ( number ) Desired resulting value for x scale.
ySclGoal ( number ) Desired resulting value for y scale.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the transform by applying a delta. Delta is computed given a target value. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function seekLoc ( MOAITransform2D self, number xGoal, number yGoal, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
xGoal ( number ) Desired resulting value for x.
yGoal ( number ) Desired resulting value for y.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the transform by applying a delta. Delta is computed given a target value. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function seekPiv ( MOAITransform2D self, number xGoal, number yGoal, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
xGoal ( number ) Desired resulting value for xPiv.
yGoal ( number ) Desired resulting value for yPiv.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the transform by applying a delta. Delta is computed given a target value. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function seekRot ( MOAITransform2D self, number zRotGoal, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
zRotGoal ( number ) Desired resulting value for z rot (in degrees).
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the transform by applying a delta. Delta is computed given a target value. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function seekScl ( MOAITransform2D self, number xSclGoal, number ySclGoal, number length [, number mode ] )
Parameters:
self ( MOAITransform2D )
xSclGoal ( number ) Desired resulting value for x scale.
ySclGoal ( number ) Desired resulting value for y scale.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Sets the transform's location.


function setLoc ( MOAITransform2D self [, number x, number y ] )
Parameters:
self ( MOAITransform2D )
x ( number ) Optional. Default value is 0.
y ( number ) Optional. Default value is 0.
Returns:
nil

This method has been deprecated. Use MOAINode setAttrLink instead.


function setParent ( MOAITransform2D self [, MOAINode parent ] )
Parameters:
self ( MOAITransform2D )
parent ( MOAINode ) Optional. Default value is nil.
Returns:
nil

Reimplemented in MOAIProp2D.

Sets the transform's pivot.


function setPiv ( MOAITransform2D self [, number xPiv, number yPiv ] )
Parameters:
self ( MOAITransform2D )
xPiv ( number ) Optional. Default value is 0.
yPiv ( number ) Optional. Default value is 0.
Returns:
nil

Sets the transform's rotation.


function setRot ( MOAITransform2D self [, number zRot ] )
Parameters:
self ( MOAITransform2D )
zRot ( number ) Optional. Default value is 0.
Returns:
nil

Sets the transform's scale.


function setScl ( MOAITransform2D self, number xScl [, number yScl ] )
Parameters:
self ( MOAITransform2D )
xScl ( number )
yScl ( number ) Optional. Default value is xScl.
Returns:
nil

Transform a point in world space to model space.


function worldToModel ( MOAITransform2D self [, number x, number y ] )
Parameters:
self ( MOAITransform2D )
x ( number ) Optional. Default value is 0.
y ( number ) Optional. Default value is 0.
Returns:
x ( number ), y ( number )