The X Toolkit API

X.transform

/**
* Create a transform.
*
* @constructor
* @extends X.base
*/
var t = new X.transform();
/**
* The className of this class.
*
* @type {string}
* @protected
*/
t._classname = $_CLASSNAME;
/**
* The 'dirty' flag of this object.
*
* @type {boolean}
* @protected
*/
t._dirty = $_DIRTY;
/**
* The uniqueId of this instance. Each class instance in XTK has a uniqueId.
*
* @type {number}
* @protected
*/
t._id = $_ID;
/**
* The transformation matrix.
*
* @type {!Float32Array}
* @protected
*/
t._matrix = $_MATRIX;
/**
* Get the className of this object.
*
* @return {string} The className of this object.
* @public
*/
var _classname = t.classname;
/**
* Get the id of this instance.
*
* @return {string} The className of this object.
* @public
*/
var _id = t.id;
/**
* Get the transformation matrix.
*
* @return {!Float32Array} The transformation matrix.
*/
var _matrix = t.matrix;
/**
* Set the transformation matrix.
*
* @param {!Float32Array} matrix The transformation matrix.
*/
t.matrix = $MATRIX;
/**
* Flip in X direction.
*/
t.flipX();
/**
* Flip in Y direction.
*/
t.flipY();
/**
* Flip in Z direction.
*/
t.flipZ();
/**
* Flip the matrix value at the given index.
*
* @param {number} row The row index.
* @param {number} col The column index.
* @private
*/
t.flip_($ROW, $COL);
/**
* Mark the transform as modified.
*/
t.modified();
/**
* Rotate around the X-axis.
*
* @param {number} angle The angle to rotate in degrees.
* @throws {Error} An exception, if the given angle is invalid.
*/
t.rotateX($ANGLE);
/**
* Rotate around the Y-axis.
*
* @param {number} angle The angle to rotate in degrees.
* @throws {Error} An exception, if the given angle is invalid.
*/
t.rotateY($ANGLE);
/**
* Rotate around the Z-axis.
*
* @param {number} angle The angle to rotate in degrees.
* @throws {Error} An exception, if the given angle is invalid.
*/
t.rotateZ($ANGLE);
/**
* Translate on the X-axis.
*
* @param {number} distance The distance to move.
* @throws {Error} An exception, if the given distance is invalid.
*/
t.translateX($DISTANCE);
/**
* Translate on the Y-axis.
*
* @param {number} distance The distance to move.
* @throws {Error} An exception, if the given distance is invalid.
*/
t.translateY($DISTANCE);
/**
* Translate on the Z-axis.
*
* @param {number} distance The distance to move.
* @throws {Error} An exception, if the given distance is invalid.
*/
t.translateZ($DISTANCE);


CONSTRUCTORS
X.transform

PROPERTIES
_classname
_dirty
_id
_matrix

GETTERS/SETTERS
classname
id
matrix

FUNCTIONS
flipX
flipY
flipZ
flip_
modified
rotateX
rotateY
rotateZ
translateX
translateY
translateZ

STATIC



SOURCECODE