struct
Eagle::Mat3
- Eagle::Mat3
- Struct
- Value
- Object
Overview
A 3x3 matrix in column-major order. Eagle uses it for normal matrices in 3D shaders.
Defined in:
eagle/math/mat4.crConstructors
-
.identity : Mat3
The identity matrix.
-
.new(m : StaticArray(Float32, 9))
Wraps 9 floats in column-major order.
-
.new
Creates the zero matrix.
Instance Method Summary
-
#*(o : Mat3) : Mat3
Composes matrices.
-
#*(v : Vec3) : Vec3
Transforms a vector.
-
#[](col : Int, row : Int) : Float32
Reads the element at col, row.
-
#[]=(col : Int, row : Int, v : Number)
Writes the element at col, row.
-
#data : StaticArray(Float32, 9)
The raw column-major storage.
-
#determinant : Float32
The determinant.
-
#inverse : Mat3
The inverse matrix.
-
#to_unsafe : Pointer(Float32)
Pointer to the 9 floats, for passing to OpenGL.
-
#transposed : Mat3
Rows and columns swapped.