CMovement::ClassifyContactTriangle
function · collision · primitive
- Address
0x6334a0· 290 bytes, up to0x6335c1- Signature
int __thiscall (CMovement *this, uint32_t index, int *ceiling)- Meaning
- Classifies a listed triangle as floor, head-touching ceiling or other, clearing flag 0x4000000
- Confidence
- verified, proof one
- Finding
- collision/airborne#triangle-class-tests
- Test
collision::slope_classify_difftest
Finding: Triangle class tests in collision: airborne
For triangle i of 0xc4e52c with normal z = n.z, the slope limit s is cos 50° = 0.64278764
(0x3f248dbb) when 0x5fa550 returns nonzero for the unit, else cos 80° = 0.17364818 (0x3e31d0d4):
| function | returns |
|---|---|
0x6336a0(i) | 1 when −cos 50° ≤ n.z ≤ cos 50°, else 0, NaN included |
0x6335d0(i, p) | 1 when n·p + d is at most 1/12, or NaN, for each of the first three planes 0x632460 builds for i |
0x633760(p, i, unit) | 0 when n.z > s, or NaN, and 0x6335d0(i, p); else 1 |
0x633720(i, D) | 1 when 0x633760(+0x10 + D, i, +0x15c) returns 0 |
0x6333d0(i) | 1 when a top corner (x ± r, y ± r, z + h) lies within 1/720 of i's plane |
0x6334a0(i, &f) | n.z > s or NaN: 1, clearing 0x4000000 when 0x6335d0(i, +0x10); n.z ≥ 0: flags & 0x4000000; n.z < 0 without 0x6333d0(i): the same; with it: f = 1 and 0x4000000 cleared if it was set, then 1 when −n.z > cos 50° or NaN, else 0 |
The derivation is in the doc.
Callers 2
- CMovement::ProbeStepUp collision
- CMovement::ResolveWalk collision
Callees 3
- IsUnitPlayerDriven objectlayer
- CMovement::BoxTopTouchesTriangle collision
- IsPointOverListedTriangle collision
Calls and jumps by a bare address, from tables/calls.tsv.