MatrixBase<M extends MatrixBase<M, V3, Q, V4>, V3 extends Vector3Base<V3, M, Q, V4>, Q extends QuaternionBase<Q, M, V3, V4>, V4 extends Vector4Base<V4, Q, M, V3>> mixin

Backend-agnostic contract for MatrixBase structs.

Must be mixed into every concrete platform implementation of a Raylib type to ensure a unified API surface across different backends.


4x4 components, column major, OpenGL style, right-handed.

Layout note:

The native Raylib C struct lays out fields in row-major order (m0, m4, m8, m12 = first row), but this Dart representation uses column-major ordering (m0..m3 = first column, m4..m7 = second column, etc.). Named constructors and keyed parameters abstract this away, but methods such as set and toArray follow the column-major convention.

Superclass constraints

Properties

$state RaylibTempStructState
Per-instance allocation state tracking slot keys, disposal, and identity.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
m0 double
Column 0, row 0
getter/setter pair
m1 double
Column 0, row 1
getter/setter pair
m10 double
Column 2, row 2
getter/setter pair
m11 double
Column 2, row 3
getter/setter pair
m12 double
Column 3, row 0 (translation X)
getter/setter pair
m13 double
Column 3, row 1 (translation Y)
getter/setter pair
m14 double
Column 3, row 2 (translation Z)
getter/setter pair
m15 double
Column 3, row 3
getter/setter pair
m2 double
Column 0, row 2
getter/setter pair
m3 double
Column 0, row 3
getter/setter pair
m4 double
Column 1, row 0
getter/setter pair
m5 double
Column 1, row 1
getter/setter pair
m6 double
Column 1, row 2
getter/setter pair
m7 double
Column 1, row 3
getter/setter pair
m8 double
Column 2, row 0
getter/setter pair
m9 double
Column 2, row 1
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
structName String
The Dart-side type name of this struct
no setterinherited

Methods

add(M o) → M
Returns a new matrix that is the component-wise sum of this and o.
clone() → M
Returns a deep copy of this instance, preserving RaylibStructBase.originalPointer if present.
inherited
copy() → M
Returns a deep copy of this instance without RaylibStructBase.originalPointer.
inherited
decompose() → (V3, Q, V3)
Decomposes this matrix into its translation, rotation, and scale components.
determinant() double
Returns the determinant of this matrix.
format([int x0 = 0]) String
Returns a formatted 4x4 matrix string with each row on its own line.
invert() → M
Returns a new matrix that is the inverse of this one.
mul(M o) → M
Returns a new matrix that is the product of this and o.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(num m0, num m1, num m2, num m3, num m4, num m5, num m6, num m7, num m8, num m9, num m10, num m11, num m12, num m13, num m14, num m15) → M
Sets all components in column-major order at once.
setD(M o) → M
Copies the fields of o into this instance and returns this.
inherited
signature() String
Returns a human-readable representation of this struct.
override
sub(M o) → M
Returns a new matrix that is the component-wise difference of this and o.
toArray() List<double>
Returns all 16 components as a flat list in column-major order.
toString() String
A string representation of this object.
inherited
trace() double
Returns the trace of this matrix (sum of diagonal elements: m0 + m5 + m10 + m15).
transpose() → M
Returns a new matrix that is the transpose of this one.

Operators

operator ==(Object other) bool
The equality operator.
inherited