9 #ifndef Recast_CompactHeightfield_h
10 #define Recast_CompactHeightfield_h
79 const unsigned int shift = (
unsigned int)dir*6;
81 s.
connectionData = (con & ~(0x3f << shift)) | (((
unsigned int)i & 0x3f) << shift);
91 const unsigned int shift = (
unsigned int)dir*6;
101 const int offset[4] = { -1, 0, 1, 0, };
102 return offset[dir&0x03];
111 const int offset[4] = { 0, 1, 0, -1 };
112 return offset[dir&0x03];
A dynamic heightfield representing obstructed space.
Definition: Recast.h:275
Represents a span of unobstructed space within a compact heightfield.
Definition: Recast.h:296
Provides an interface for optional logging and performance tracking of the Recast build process...
Definition: Recast.h:103
bool rcBuildDistanceField(rcContext *ctx, rcCompactHeightfield &chf)
Builds the distance field for the specified compact heightfield.
Definition: CompactHeightfield.cpp:382
bool rcBuildRegionsMonotone(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea)
Builds region data for the heightfield using simple monotone partitioning.
Definition: RecastRegion.cpp:1292
bool rcBuildLayerRegions(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea)
Builds region data for the heightfield by partitioning the heightfield in non-overlapping layers...
Definition: RecastRegion.cpp:1604
bool rcBuildRegions(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea)
Builds region data for the heightfield using watershed partitioning.
Definition: RecastRegion.cpp:1466
A compact, static heightfield representing unobstructed space.
Definition: Recast.h:306
int rcGetDirOffsetX(int dir)
Gets the standard width (x-axis) offset for the specified direction.
Definition: CompactHeightfield.h:99
bool rcBuildCompactHeightfield(rcContext *ctx, const int walkableHeight, const int walkableClimb, rcHeightfield &hf, rcCompactHeightfield &chf)
Builds a compact heightfield representing open space, from a heightfield representing solid space...
Definition: CompactHeightfield.cpp:236
int rcGetCon(const rcCompactSpan &s, int dir)
Gets neighbor connection data for the specified direction.
Definition: CompactHeightfield.h:89
int rcGetDirOffsetY(int dir)
Gets the standard height (z-axis) offset for the specified direction.
Definition: CompactHeightfield.h:109
void rcSetCon(rcCompactSpan &s, int dir, int i)
Sets the neighbor connection data for the specified direction.
Definition: CompactHeightfield.h:77
unsigned int connectionData
Packed neighbor connection data.
Definition: Recast.h:300