benilla-re systems structs docs

CWorld::IsPointInEntity

function · terrain · primitive

Address
0x670a70 · 627 bytes, up to 0x670ce2
Signature
bool __fastcall (void *entity, const float *point)
Meaning
Returns whether a point lies in a map object's convex volume or a loaded model's file box, true for other entities
Confidence
verified, proof one
Finding
collision/world#point-inside-a-transport
Test
terrain::point_in_entity_difftest, terrain::defvol_classify_difftest

Finding: Point inside a transport in collision: world

Both transport handlers answer slot +0x54 with the same body: 1 without a world entity at +0x10, else CWorld::IsPointInEntity. A map object definition (tag 0x8 of its +0x8) answers by its root's convex volume planes, PointInsidePlanes, and false while the root is unloaded. A doodad definition (tag 0x40) answers false without a model at +0x88 or while it is unloaded, else whether the point lies in the model file's bounding box, faces included and a NaN inside. Any other entity answers 1. The point 0x6173b0 passes is the mover's position, which on a transport is in transport space; the planes and the box are in the file's own frame, so nothing scales or moves them.

The derivation is in the doc.

Callers 2

Callees 5

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