Class: Matrix4D
Transformation matrix
*single linear* *standard zero-based row-column index*
| 0 4 8 12 | | Rot00*Sx Rot01 Rot02 TransX |
| 1 5 9 13 | | Rot10 Rot11*Sy Rot12 TransY |
| 2 6 10 14 | = | Rot20 Rot21 Rot22*Sz TransZ |
| 3 7 11 15 | | 0 (30) 0 (31) 0 (32) 1 (33) |
Examples
Constructors
Name |
Description |
Matrix4D()
|
Default constructor - creates identity 4x4 matrix
|
Methods
Name |
Description |
Add(Matrix4D)
|
Add matrix to itself.
|
CreateMirror(Vector3D, Double)
|
Create transformation matrix mirroring about a plane
|
CreateRotate(Vector3D, Double)
|
Create transformation matrix that rotates about a given vector by a given angle
|
CreateScale(Double, Double, Double)
|
Create scaling transformation matrix
|
CreateSystem(Vector3D, Vector3D, Vector3D)
|
Create transformation matrix converting to new coordinate system.
|
CreateTranslate(Double, Double, Double)
|
Create translating transformation matrix
|
Invert()
|
Invert itself if determinant is non-zero. Return 0 if inverted; 1 - otherwise.
|
Multiply(Matrix4D)
|
Multiply this matrix by the given matrix
|
Scale(Double, Double, Double)
|
Convenient method to combine x, y, z scale into itself.
|
Subtract(Matrix4D)
|
Subtract matrix from itself.
|
ToString()
|
String representation.
|
Transform(Vector3D)
|
Apply this transformation matrix to a given point/vector.
Note: assumes (0,0,0,1) in last row.
|
Translate(Double, Double, Double)
|
Convenient method to combine (x, y, z) translatation into itself.
|
Transpose()
|
Transpose itself.
|
Fields
Name |
Description |
Identity
|
Identity 4x4 matrix
|