91 const int w = solid.
width;
92 const int h = solid.
height;
96 for (
int y = 0;
y < h; ++
y)
98 for (
int x = 0;
x < w; ++
x)
106 const int bot = (int)(s->smax);
107 const int top = s->next ? (int)(s->next->smin) :
MAX_HEIGHT;
116 for (
int dir = 0; dir < 4; ++dir)
121 if (dx < 0 || dy < 0 || dx >= w || dy >= h)
123 minh =
rcMin(minh, -walkableClimb - bot);
129 int nbot = -walkableClimb;
130 int ntop = ns ? (int)ns->
smin : MAX_HEIGHT;
132 if (
rcMin(top,ntop) -
rcMax(bot,nbot) > walkableHeight)
133 minh =
rcMin(minh, nbot - bot);
136 for (ns = solid.
spans[dx + dy*w]; ns; ns = ns->
next)
138 nbot = (int)ns->
smax;
141 if (
rcMin(top,ntop) -
rcMax(bot,nbot) > walkableHeight)
143 minh =
rcMin(minh, nbot - bot);
146 if (
rcAbs(nbot - bot) <= walkableClimb)
148 if (nbot < asmin) asmin = nbot;
149 if (nbot > asmax) asmax = nbot;
158 if (minh < -walkableClimb)
163 if ((asmax - asmin) > walkableClimb)
#define rcAssert
Definition: RecastAssert.h:30
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition: Recast.h:276
T rcAbs(T a)
Definition: Recast.h:577
int rcGetDirOffsetY(int dir)
Definition: Recast.h:1048
T rcMin(T a, T b)
Definition: Recast.h:566
int rcGetDirOffsetX(int dir)
Definition: Recast.h:1038
G3D::int16 y
Definition: Vector2int16.h:38
unsigned int smin
The lower limit of the span. [Limit: < smax].
Definition: Recast.h:258
void startTimer(const rcTimerLabel label)
Definition: Recast.h:131
unsigned int smax
The upper limit of the span. [Limit: <= RC_SPAN_MAX_HEIGHT].
Definition: Recast.h:259
rcSpan * next
The next span higher up in column.
Definition: Recast.h:261
static const unsigned char RC_NULL_AREA
Definition: Recast.h:538
T rcMax(T a, T b)
Definition: Recast.h:572
G3D::int16 x
Definition: Vector2int16.h:37
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition: Recast.h:277
void stopTimer(const rcTimerLabel label)
Definition: Recast.h:135
#define MAX_HEIGHT
Definition: Map.h:247
The time to filter ledge spans. (See: rcFilterLedgeSpans)
Definition: Recast.h:53
rcSpan ** spans
Heightfield of spans (width*height).
Definition: Recast.h:282