BuildAxisRotation34
function · unassigned · primitive
- Address
0x7bb860· 303 bytes, up to0x7bb98e- 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:
| row | column 0 | column 1 | column 2 |
|---|---|---|---|
| 0 | x·x·t + c | t·x·y + z·s | t·x·z − y·s |
| 1 | t·x·y − z·s | y·y·t + c | x·s + t·y·z |
| 2 | t·x·z + y·s | t·y·z − x·s | z·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
- RotateMatrix34 unassigned
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.