benilla-re systems structs docs

BuildAxisRotation34

function · unassigned · primitive

Address
0x7bb860 · 303 bytes, up to 0x7bb98e
Signature
NTempest::C34Matrix * __fastcall (NTempest::C34Matrix *out, const NTempest::C3Vector *axis, float angle, uint8_t axisIsUnit)
Meaning
Stores the rotation about an axis by an angle in a 3×4 matrix with zero translation
Confidence
verified, proof two
Finding
cmath/matrices#axis-and-angle-rotations
Test
cmath::axis_angle_mat34

Finding: Axis and angle rotations in cmath: matrices

0x7be490(out, axis, angle, unit), 0x7bdb00 and 0x7bb860 build the rotation about an axis for a row vector. Unless the flag says the axis is a unit vector, it is scaled by 1/√((z² + y²) + x²), each component stored as a float. With c, s, t = 1 − c, x·s and y·s stored as floats, the 3×3 is, by row:

rowcolumn 0column 1column 2
0x·x·t + ct·x·y + z·st·x·z − y·s
1t·x·y − z·sy·y·t + cx·s + t·y·z
2t·x·z + y·st·y·z − x·sz·z·t + c

0x7bdb00 puts it in a 4×4 with (0, 0, 0, 1) last, 0x7bb860 in a 3×4 with zero translation; 0x7be730 and 0x7bbab0 multiply a 3×3 or a 3×4 on the left by one.

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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