class Transform
package iron.object
Constructor
Variables
dim:Vec4
The dimensions of the object in local space (without parent, prepended or appended matrices applied).
Methods
buildMatrix():Void
Update the transform matrix based on loc, rot, and scale. If any
change is made to loc, rot, or scale buildMatrix() must be
called to update the objects transform.
decompose():Void
Update the loc, rot and scale fields according to the local
matrix. You may need to call this after directly mutating the local
matrix.
diff():Bool
Check whether the transform has changed at all since the last time this function was called.
Returns:
true if the transform has changed.
move(axis:Vec4, f:Float = 1.0):Void
Apply a scaled translation in local space.
Parameters:
| axis | The direction to move. | 
|---|---|
| f | A multiplier for the movement. If  | 
multMatrix(mat:Mat4):Void
Apply another transform to this one, i.e. multiply this transform's local matrix by another.
Parameters:
| mat | The other transform to apply. | 
|---|
reset():Void
Reset to a null transform: zero location and rotation, and a uniform scale of one. Other fields such as prepended matrices and bone parents will not be changed.
rotate(axis:Vec4, f:FastFloat):Void
Rotate around an axis.
Parameters:
| axis | The axis to rotate around. | 
|---|---|
| f | The magnitude of the rotation in radians. | 
setMatrix(mat:Mat4):Void
Set the local matrix and update loc, rot, scale and world.
Parameters:
| mat | The new local matrix. | 
|---|
setRotation(x:FastFloat, y:FastFloat, z:FastFloat):Void
Set the rotation of the object in radians.
Parameters:
| x | Set the x axis rotation in radians. | 
|---|---|
| y | Set the y axis rotation in radians. | 
| z | Set the z axis rotation in radians. |