DotVector3
function · objectlayer · primitive
- Address
0x602630· 21 bytes, up to0x602644- Signature
float __fastcall (const float *a, const float *b)- Meaning
- Returns (a.z·b.z + a.y·b.y) + a.x·b.x, unrounded
- Confidence
- verified, proof one
- Finding
- collision/airborne#triangle-class-tests
- Test
objectlayer::dot3_difftest,terrain::plane_offset_negate_difftest,terrain::side_plane_d_negate_difftest,terrain::scene_dot_negate_difftest,terrain::wmo_plane_offset_negate_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 14
- AnchorSplinePath objectlayer
- CMovement::BoxTopTouchesTriangle collision
- CMovement::PlaneNearFootPoints collision
- CWorld::IsPointInEntity terrain
- FlushTriangleBatchFacets terrain
- CaptureSceneCamera terrain
- CullExteriorMapObjects terrain
- CullInteriorMapObject terrain
- BuildConvexPlanes terrain
- TestOrientedBoxPlanes terrain
- TraceMapObjectPlanes terrain
- CMapChunk::AddImpassableWalls terrain
- CMapChunk::GetHeight terrain
- DoTrianglesOverlap cmath
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.