Matrix in Anark Studio 2.5
A 4x4 matrix.
Inherits from:
Instance Properties
name | type | description |
---|---|---|
_11 | Number | |
_12 | Number | |
_13 | Number | |
_14 | Number | |
_21 | Number | |
_22 | Number | |
_23 | Number | |
_24 | Number | |
_31 | Number | |
_32 | Number | |
_33 | Number | |
_34 | Number | |
_41 | Number | |
_42 | Number | |
_43 | Number | |
_44 | Number | |
constructor | Object | A reference to the constructor class for the current object instance. [from Object] |
prototype | Object | The prototype for a class. [from Object] |
Instance Methods
name | returns | description |
---|---|---|
copy() | Matrix | Return a copy of the matrix object. |
hasOwnProperty(propertyOrMethodName) | Boolean | Determines if the object/instance itself has the named property or method. [from Object] |
identity() | (none) | Turn to an identity matrix. |
invert() | (none) | Invert the matrix. |
isIdentity() | Boolean | Is this an identity matrix? |
isPrototypeOf(instanceToTest) | Boolean | Determines if the calling object prototype is in the inheritance chain for the supplied argument. [from Object] |
multiply(otherMatrix) | (none) | Multiply two matrices. |
propertyIsEnumerable(propertyOrMethodName) | Boolean |
Determines if the object/instance itself has a property or method of the supplied name which will appear in a for (prop in obj) enumeration.
[from Object]
|
rotate(x,y,z) | (none) | Rotate the matrix. |
scale(x,y,z) | (none) | Scale the matrix. |
toLocaleString() | String |
For most objects, the same as toString() unless explicitly overridden.
[from Object]
|
toString() | String | Returns a string representation of the object. [from Object] |
translate(x,y,z) | (none) | Translate the matrix. |
transpose() | (none) | Transpose the matrix. |
valueOf() | String |
Returns the internal this value of the object.
[from Object]
|
Description
A matrix is an advanced mathematical structure used to describe the local space of an object and to transform objects within the space. In Anark Studio, matrices are 4 x 4 arrays. The Matrix constructor creates an identity matrix. An identity matrix is a square matrix with its diagonal elements equal to 1 and its off-diagonal elements equal to 0. It performs for matrix arithmetic what the number 1 performs for the arithmetic of numbers.
Properties that are a Matrix
name | object | description |
---|---|---|
lastGlobalTransform | Node | (read only) Cumulative transformation applied to this object. |
Methods that return a Matrix
name | of object | description |
---|---|---|
copy() | Matrix | Return a copy of the matrix object. |
Arguments that are a Matrix
name | in method | of object | description |
---|---|---|---|
otherMatrix | multiply(otherMatrix) | Matrix | The matrix to be multiplied wi |
transformMatrix | transform(transformMatrix) | Vector | The transformation matrix. |
transformMatrix | transform(transformMatrix) | Rotation | The transformation matrix. |