CM2Model::GetBoundingSphere
function · models · primitive
- Address
0x713680· 128 bytes, up to0x7136ff- Meaning
- Returns the centre of the model's bounding box and its bounding radius
- Confidence
- verified, proof one
- Finding
- models/model#bounds
- Test
models::bbox_center_difftest
Finding: Bounds in models: the instance
GetBoundingSphere returns the centre of the header's bounding box and its radius: x and y are
(min + max)·0.5 from a sum at the FPU's 53-bit precision, z rounds the sum to a float first. The radius is
header +0xcc. GetBoundingBox and GetCollisionBox copy the six floats at +0xb4 and +0xd0.
The derivation is in the doc.
Callers 8
- CharacterModelBaseChooseCamera ui
- CCamera::BuildPivotHeights uicamera
- CGDynamicObject_C::ModelLoaded objectlayer
- CGCorpse_C::ModelLoaded objectlayer
- UpdateSpellEffectObject objectlayer
- SetDoodadDefBounds terrain
- CMapDoodadDef::Repose terrain
- CParticleEmitter2::GetBounds models
Callees 1
- CM2Model::WaitForShared models
Calls and jumps by a bare address, from tables/calls.tsv.