Matrix3x4
3x4 bone-layout transform: 3x3 rotation, translation in column 3, 0-based indices.
Methods
Matrix3x4
Matrix3x4([m00, m01, m02, m03, m10, ..., m23]) -> Matrix3x4| Name | Type | Description |
|---|---|---|
| m00..m23optional | number | 12 numbers, row-major. Default identity. |
Builds from 12 numbers, otherwise the identity.
1 to 11 numbers silently give the identity.
Matrix3x4.from_angles
Matrix3x4.from_angles(angles [, origin]) -> Matrix3x4| Name | Type | Description |
|---|---|---|
| angles | Angle | Pitch, yaw, roll in degrees. |
| originoptional | Vector | Column 3; non-Vectors ignored. Default Vector(0,0,0). |
Rotation plus translation matrix, like the engine's AngleMatrix.
m:get
m:get(row, col) -> number| Name | Type | Description |
|---|---|---|
| row | integer | 0 to 2. |
| col | integer | 0 to 3. |
Reads one element.
Out-of-range row or column raises an error.
m:set
m:set(row, col, value)| Name | Type | Description |
|---|---|---|
| row | integer | 0 to 2. |
| col | integer | 0 to 3. |
| value | number |
Writes one element in place.
Out-of-range row or column raises an error.
m:origin
m:origin() -> VectorPosition part, like a bone's world position.
Returns Column 3 (translation)
m:forward
m:forward() -> VectorForward axis.
Returns Column 0
m:right
m:right() -> VectorRight axis; the engine's column 1 points left.
Returns Negated column 1
m:up
m:up() -> VectorUp axis.
Returns Column 2
m:transform
m:transform(point) -> Vector| Name | Type | Description |
|---|---|---|
| point | Vector | Point in local space. |
Rotates and translates a local point.
m:rotate
m:rotate(v) -> Vector| Name | Type | Description |
|---|---|---|
| v | Vector | Direction vector. |
Rotation only, no translation; use for directions.
tostring(m)
tostring(m) -> stringReadable form with forward axis and origin.
Returns "Matrix3x4[fwd=(x,y,z) org=(x,y,z)]"