SMat4
A standard 4x4 transformation matrix.
Constructors
Method New(a:Float, b:Float, c:Float, d:Float, e:Float, f:Float, g:Float, h:Float, i:Float, j:Float, k:Float, l:Float, m:Float, n:Float, o:Float, p:Float)
Creates a new SMat4 from the supplied arguments.
Operators
Method Operator+:SMat4(z:SMat4 Var)
Adds z to the matrix, returning a new matrix.
Method Operator-:SMat4(z:SMat4 Var)
Subtracts z from the matrix, returning a new matrix.
Method Operator*:SMat4(z:SMat4 Var)
Multiplies the matrix by z, returnin a new matrix.
Methods
Method Adjoint:SMat4()
Returns the transposition of the cofactor matrix.
Method CompMul:SMat4(z:SMat4 Var)
Multiplies the matrix by z by its components, return a new matrix.
Method Det:Float()
Returns the determinant of the matrix.
Method Invert:SMat4()
The inverse of this matrix.
An inverted matrix is such that if multiplied by the original would result in identity matrix. If some matrix transforms vectors in a particular way, then the inverse matrix can transform them back.
Method Rotate:SMat4(axis:SVec3, angle:Float)
Creates a rotation matrix, rotated angle degrees around the point axis.
Method Scale:SMat4(s:SVec3)
Scales the matrix, return the new scaled matrix.
Method Transpose:SMat4()
Returns the transpose of this matrix
The transposed matrix is the one that has the columns exchanged with its rows.
Method Translate:SMat4(s:SVec3)
Translates the matrix to s.
Method ToString:String() Override
Returns a String representation of the matrix.
Functions
Function Identity:SMat4()
Returns the identity matrix.
Function Frustum:SMat4(l:Float, r:Float, b:Float, t:Float, n:Float, f:Float)
Returns a projection matrix with a viewing frustum defined by the plane coordinates passed in.
Function LookAt:SMat4(eye:SVec3, pos:SVec3, up:SVec3)
Computes a transformation matrix that corresponds to a camera viewing the eye from the pos.
The right-hand vector is perpendicular to the up vector.
Function Orthogonal:SMat4(width:Float, height:Float, zNear:Float, zFar:Float)
Creates an orthogonal projection matrix.
The returned matrix, when used as a Camera's projection matrix, creates a view showing the area between width and height, with zNear and zFar as the near and far depth clipping planes.
Function Perspective:SMat4(fov:Float, w:Float, h:Float, n:Float, f:Float)
Creates a perspective projection matrix.
Function Rotation:SMat4(axis:SVec3, angle:Float)
Returns a rotation matrix on the given axis and angle degrees.
Function RotTrans:SMat4(a:SQuat, s:SVec3)
Creates a translation and rotation matrix.
The returned matrix is such that it places objects at position s, oriented in rotation a.
Function RotTransOrigin:SMat4(a:SQuat, s:SVec3, origin:SVec3)
Creates a translation, rotation and scaling matrix.
The returned matrix is such that it places objects at position origin, oriented in rotation a and scaled by s.
Function Scaling:SMat4(s:SVec3)
Creates a scaling matrix.
Function Translation:SMat4(s:SVec3)
Creates a translation matrix.
Function Quat:SMat4(a:SQuat)
Applies the quaternian to the matrix, return the new matrix.