Changes

Jump to: navigation, search

Canvas3D JS Library

919 bytes added, 09:48, 30 January 2008
Matrix Class
=== Matrix Class ===
A Matrix Class is necessary to provide Matrix operations such as rotation, translation, and scaling to any point in the 3D world. It is composed of a 4x4 matrix of floating point values that can be applied to any Matrix operation. This matrix is stored in '''Row-Major''' format, meaning its first 4 values are in the first row. The Matrix Class has the following members:
* void IdentityGetters** getMatrix() - '''Returns an array of 16 numbers. Each value represents a location of the matrix starting at the top left corner (Row-Major)''' * Setters** setMatrix(newMatArray) - '''Takes an Array of 16 numbers that represent the matrix in Row-Major format''' * Calculations** identity() - '''Sets the matrix up to be an identity matrix'''** transpose() - '''Create Identity MatrixTransposes the matrix to be in Column-Major format, and vice versa'''* void Transpose* inverse() - '''Transpose Calculates the Inverse of the matrix. Returns NULL if it fails, else it returns an inverse matrix'''** determinant() - '''Returns a Matrixnumber that is the Matrices determinant'''* void Inverse* adjoint() - '''Inverse Matrix ValuesReturns the Hermitian transpose (Adjoint) of this matrix'''* float Multiply* multiplyByScalar(Matrixscalar) - '''Multiplication Multiplies the values of the matrix by Scalara number'''* float Divide* divideByScalar(Matrixscalar) - '''Division Divides the values of the matrix by Scalara number'''* Matrix Add* multiplyByMatrix(Matrixmat) - '''Addition of Multiplies two Matricesmatrices together. It returns a new matrix'''* Matrix Subtract* multiplyByVector(Matrixvec) - '''Subtraction Mutiplies the orientation of two Matricesthe matrix by the vector. This function returns the newly oriented Vector'''* Vector Multiply* addMatrix(Vectormat) - '''Matrix times Adds the values of two matrices together. It returns a Vectornew matrix'''* Matrix Multiply* subtractMatrix(Matrixmat) - '''Matrix times Subtracts the values of the two matrices. It return a Matrixnew matrix'''
== Camera ==
1
edit

Navigation menu