Class CAAT.Math.Matrix
Defined in: Matrix.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
An array of 9 numbers.
|
Method Attributes | Method Name and Description |
---|---|
<private> |
__init()
|
copy(matrix)
Copy into this matrix the given matrix values.
|
|
Creates a new inverse matrix from this matrix.
|
|
identity()
Set this matrix to the identity matrix.
|
|
multiply(m)
Multiply this matrix by a given matrix.
|
|
multiplyScalar(scalar)
Multiply this matrix by a scalar.
|
|
premultiply(m)
Premultiply this matrix by a given matrix.
|
|
rotate(angle)
Create a new rotation matrix and set it up for the specified angle in radians.
|
|
scale(scalex, scaley)
Create a scale matrix.
|
|
setCoordinateClamping(clamp)
|
|
setModelViewMatrix(x, y, sx, sy, r)
|
|
setRotation(angle)
|
|
setScale(scalex, scaley)
|
|
setTranslate(x, y)
Sets this matrix as a translation matrix.
|
|
transformCoord(point)
Transform a point by this matrix.
|
|
translate(x, y)
Create a translation matrix.
|
Field Detail
matrix
An array of 9 numbers.
Method Detail
<private>
__init()
copy(matrix)
Copy into this matrix the given matrix values.
- Parameters:
- matrix
- {CAAT.Matrix}
- Returns:
- this
{CAAT.Matrix}
getInverse()
Creates a new inverse matrix from this matrix.
- Returns:
- {CAAT.Matrix} an inverse matrix.
identity()
Set this matrix to the identity matrix.
- Returns:
- this
multiply(m)
Multiply this matrix by a given matrix.
- Parameters:
- m
- {CAAT.Matrix}
- Returns:
- this
multiplyScalar(scalar)
Multiply this matrix by a scalar.
- Parameters:
- scalar
- {number} scalar value
- Returns:
- this
premultiply(m)
Premultiply this matrix by a given matrix.
- Parameters:
- m
- {CAAT.Matrix}
- Returns:
- this
{CAAT.Matrix}
rotate(angle)
Create a new rotation matrix and set it up for the specified angle in radians.
- Parameters:
- angle
- {number}
- Returns:
- {CAAT.Matrix} a matrix object.
{CAAT.Matrix}
scale(scalex, scaley)
Create a scale matrix.
- Parameters:
- scalex
- {number} x scale magnitude.
- scaley
- {number} y scale magnitude.
- Returns:
- {CAAT.Matrix} a matrix object.
setCoordinateClamping(clamp)
- Parameters:
- clamp
setModelViewMatrix(x, y, sx, sy, r)
- Parameters:
- x
- y
- sx
- sy
- r
setRotation(angle)
- Parameters:
- angle
setScale(scalex, scaley)
- Parameters:
- scalex
- scaley
setTranslate(x, y)
Sets this matrix as a translation matrix.
- Parameters:
- x
- y
{CAAT.Point}
transformCoord(point)
Transform a point by this matrix. The parameter point will be modified with the transformation values.
- Parameters:
- point
- {CAAT.Point}.
- Returns:
- {CAAT.Point} the parameter point.
transformRenderingContext_Clamp(ctx)
- Parameters:
- ctx
transformRenderingContext_NoClamp(ctx)
- Parameters:
- ctx
transformRenderingContextSet_Clamp(ctx)
- Parameters:
- ctx
transformRenderingContextSet_NoClamp(ctx)
- Parameters:
- ctx
{CAAT.Matrix}
translate(x, y)
Create a translation matrix.
- Parameters:
- x
- {number} x translation magnitude.
- y
- {number} y translation magnitude.
- Returns:
- {CAAT.Matrix} a matrix object.