DVMat4 class final

A 4x4 matrix, column-major: element (row r, column c) is storage[c * 4 + r].

Constructors

DVMat4.compose(DVVec3 t, DVQuat r, DVVec3 s)
Translation * rotation * scale, the order glTF and the engine compose a node's local transform in.
factory
DVMat4.fromList(List<double> values)
Copies values (16 of them, column-major).
factory
DVMat4.identity()
factory
DVMat4.lookAt(DVVec3 eye, DVVec3 target, DVVec3 up)
A view matrix for an eye at eye looking at target.
factory
DVMat4.perspective(double fovYRadians, double aspect, double near, double far)
A right-handed perspective projection into OpenGL clip space (NDC z in -1..1). fovYRadians is the full vertical field of view.
factory
DVMat4.scaling(DVVec3 s)
factory
DVMat4.translation(DVVec3 t)
factory

Properties

determinant3 → double
The determinant of the upper 3x3, whose sign says whether this matrix mirrors.
no setter
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
storage → Float64List
final
translation → DVVec3
no setter

Methods

inverse() → DVMat4?
The inverse, or null when this matrix has none.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
transformDirection(DVVec3 d) → DVVec3
d as a direction: rotated and scaled, never translated.
transformPoint(DVVec3 p) → DVVec3
p as a point: translated, and divided by w when this is a projection.

Operators

operator *(DVMat4 other) → DVMat4
operator ==(Object other) → bool
The equality operator.
override