benilla-re systems structs docs

IntersectRayCone

function · cmath · unreached

Address
0x7c3390 · 1000 bytes, up to 0x7c3777
Signature
uint8_t __fastcall (const NTempest::C3Ray *ray, const Cone *cone, float *outT, NTempest::C3Vector *outPoint)
Meaning
Finds where a ray meets a cone, writing the parameter and the point
Confidence
verified, proof two
Finding
cmath/solids#ray-and-cone

Finding: Ray and cone in cmath: boxes, cones and triangles

0x7c3390(outT, outPoint) intersects the ray in ecx (origin +0, direction D +0xc) with the cone in edx: apex C +0, unit axis U +0x10, cap length H +0x1c, k +0x20 (half-angle cosine). With W = L + t·D and L = origin − C, the surface is (W·U)² = k²·|W|², a quadratic A·t² + 2B·t + Cc = 0 with A = (D·U)² − k²|D|², B = (D·U)(L·U) − k²(L·D) and Cc = (L·U)² − k²|L|². The hit point P must have (P − C)·U above 0 and, for a non-zero H, below H, except in the degenerate leg, which returns 1 at the origin untested.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 3

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