benilla-re systems structs docs

TransformPoint

function · cmath · primitive

Address
0x7bca80 · 93 bytes, up to 0x7bcadc
Signature
NTempest::C3Vector * __fastcall (NTempest::C3Vector *out, const NTempest::C3Vector *v, const NTempest::C44Matrix *m)
Meaning
Writes v times the upper 3×3 of a row-major 4×4 matrix plus its fourth row to out
Confidence
verified, proof one
Finding
collision/falling#frame-transform
Test
terrain::liquid_hit_flush_difftest, terrain::horizon_insert, gx::lightningrender_strip_difftest, models::m2_light_coord_finalize_difftest, models::particle_quad_expand_difftest, models::particle_quad_expand_rotated_difftest, models::particle_quad_expand_stretched_difftest, models::particle_quad_expand_tiled_difftest, models::particle_quad_expand_tiled_rotated_difftest, cmath::transform_point4

Finding: Frame transform in collision: falling

0x7c6620(m, a) re-expresses the mover in another frame, given a 4×4 matrix m and an angle a. It transforms the position +0x10 and the anchor +0x44 in place with 0x7bcc60; adds a to the facing +0x1c and the anchor facing +0x50, each wrapped once; maps the heights +0x7c and +0x80 to z·m[10] + m[14]; turns the direction +0x5c by m's upper 3×3; and sets +0x68, +0x6c to its x and y, each times 1/len when the length is 2⁻²² or more, or NaN. With a live spline, flag 0x4 clear, it ends with 0x7c6520(m, a), which moves the spline's point at +0x08, its path (through 0x7bca80) and its facing at +0x14 the same way.

The derivation is in the doc.

Callers 70

Callees 0

None by a direct call or jump.

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