CMapObj::GetGroupBoundingSphere
function · models · primitive
- Address
0x6a44b0· 250 bytes, up to0x6a45a9- Signature
float * __thiscall (CMapObj *this, float *sphere, uint32_t group)- Meaning
- Returns the centre and radius of a group record'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 2
- CreateGroupDefs terrain
- CMapObjDef::SetPlacement terrain
Callees 1
- SetVector3 spline
Calls and jumps by a bare address, from tables/calls.tsv.