benilla-re systems structs docs

RotateMatrix

function · cmath · primitive

Address
0x7bdd60 · 75 bytes, up to 0x7bddaa
Signature
void __thiscall (NTempest::C44Matrix *this, float angle, const NTempest::C3Vector *axis, uint32_t normalized)
Meaning
Multiplies a matrix on the left by the rotation about an axis by an angle
Confidence
verified, proof one
Finding
collision/world#transport-matrix

Finding: Transport matrix in collision: world

0x630ac0(M, guid) writes the row-vector 4×4 matrix of the transport game object guid, mapping a transport-space point q to q·M. With t the vector the object's vtable slot +0x14 returns, and c and s the float cosine and sine of the angle slot +0x18 returns, the rows are:

rowvalues
0c, s, 0, 0
1−s, c, 0, 0
20, 0, k, 0
3t.x, t.y, t.z, 1

k = float(float(1 − c) + c) is one unit in the last place below 1.0 for some negative c. 0x468460 finds the object with the type mask 0x20, and no null test follows: a GUID naming no game object faults. The slots return the type handler's position and facing, or without a handler the descriptor's fields +0x24 and +0x30.

The derivation is in the doc.

Callers 27

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.