benilla-re systems structs docs

CMapObj::GetBoundingSphere

function · models · primitive

Address
0x6a4310 · 265 bytes, up to 0x6a4418
Signature
float * __thiscall (CMapObj *this, float *sphere)
Meaning
Returns the centre and radius of a map object's box, or zero when unloaded
Confidence
verified, proof one
Finding
models/wmo#bounding-spheres-and-volume
Test
models::wmo_bounding_sphere_difftest

Finding: Bounding spheres and volume in models: map objects

A loaded map object's bounding sphere is centred at (min + max)·0.5 of its box, the sum rounded to a float before the halving, with radius |max − centre|; a group's comes the same way from its group record's box. An unloaded map object gives a zero sphere. A point is inside the map object's convex volume when every plane gives n·p + d ≤ 0, a NaN counting as inside, and with no planes it is inside; an unloaded map object contains nothing.

The derivation is in the doc.

Callers 3

Callees 1

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