IntersectMapObjects
function · terrain · host
- Address
0x6be250· 616 bytes, up to0x6be4b7- Signature
uint8_t __fastcall (const float *start, const float *end, float *t, uint32_t arg4, uint32_t arg5)- Meaning
- Returns the nearest map object floor under a segment, an exterior group not counting
- Confidence
- verified, proof one
- Finding
- terrain/groupdraw#floor-under-a-segment
- Test
terrain::nearest_param_delta_difftest
Finding: Floor under a segment in terrain: map object draw
0x6be250(start, end, fraction, object out, ids out) finds the nearest map object floor under a
segment. It clears the outputs, then for each instance whose flag byte +0xd has bit 0 clear and whose
box takes the segment it works in the model's space: it traces the groups of the instance's list
+0x138 whose boxes the segment crosses, and asks the model which group the segment passes
through. A floor hit counts when it is less than 0.0001 farther than the best so far. The result is
the fraction, the instance, the group and, for an interior group, the face; if the best is an
exterior group the instance is cleared. It returns whether an instance remains.
The derivation is in the doc.
Callers 1
- ClaimCameraMapObject terrain
Callees 7
- CMapObj::CrossPortals models
- CMapObj::QueryGroupLiquid models
- CMapObj::GetLoadedGroup models
- CMapObj::GetGroupPointer models
- CMapObjGroup::IntersectSegment models
- TraceModelList terrain
- TransformPoint cmath
Calls and jumps by a bare address, from tables/calls.tsv.