mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: fix naming of constant (XZY -> XYZ)
The direction is represented over the XY plane, previously XZ on Recast's original coordinate system. There were multiple inconsistencies in Recast where the XZ plane got represented as XY and visa versa.
This commit is contained in:
parent
57e66f1dfc
commit
bf251bccd5
@ -449,28 +449,28 @@ float rdCalcLedgeSpanOffsetAmount(const float ledgeSpan, const float slopeAngle,
|
||||
}
|
||||
|
||||
static const unsigned char XP = 1 << 0;
|
||||
static const unsigned char ZP = 1 << 1;
|
||||
static const unsigned char YP = 1 << 1;
|
||||
static const unsigned char XM = 1 << 2;
|
||||
static const unsigned char ZM = 1 << 3;
|
||||
static const unsigned char YM = 1 << 3;
|
||||
|
||||
unsigned char rdClassifyPointOutsideBounds(const float* pt, const float* bmin, const float* bmax)
|
||||
{
|
||||
unsigned char outcode = 0;
|
||||
outcode |= (pt[0] >= bmax[0]) ? XM : 0;
|
||||
outcode |= (pt[1] >= bmax[1]) ? ZP : 0;
|
||||
outcode |= (pt[1] >= bmax[1]) ? YP : 0;
|
||||
outcode |= (pt[0] < bmin[0]) ? XP : 0;
|
||||
outcode |= (pt[1] < bmin[1]) ? ZM : 0;
|
||||
outcode |= (pt[1] < bmin[1]) ? YM : 0;
|
||||
|
||||
switch (outcode)
|
||||
{
|
||||
case XP: return 0;
|
||||
case XP|ZP: return 1;
|
||||
case ZP: return 2;
|
||||
case XM|ZP: return 3;
|
||||
case XP|YP: return 1;
|
||||
case YP: return 2;
|
||||
case XM|YP: return 3;
|
||||
case XM: return 4;
|
||||
case XM|ZM: return 5;
|
||||
case ZM: return 6;
|
||||
case XP|ZM: return 7;
|
||||
case XM|YM: return 5;
|
||||
case YM: return 6;
|
||||
case XP|YM: return 7;
|
||||
};
|
||||
|
||||
return 0xff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user