Recast Navigation  1.0.35
Heightfield.h
Go to the documentation of this file.
1 //
2 // Heightfield.h
3 // Recast
4 //
5 // Created by Graham Pentheny on 7/31/15.
6 //
7 //
8 
9 #ifndef Recast_Heightfield_h
10 #define Recast_Heightfield_h
11 
16 
23 void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax);
24 
32 void rcCalcGridSize(const float* bmin, const float* bmax, float cs, int* w, int* h);
33 
44 bool rcCreateHeightfield(rcContext* ctx, rcHeightfield& hf, int width, int height, const float* bmin, const float* bmax, float cs, float ch);
45 
57 void rcMarkWalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, const float* verts, int nv, const int* tris, int nt, navAreaMask* areaMasks);
58 
69 void rcClearUnwalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, const float* verts, int nv, const int* tris, int nt, navAreaMask* areaMasks);
70 
83 void rcAddSpan(rcContext* ctx, rcHeightfield& hf, const int x, const int y, const unsigned short smin, const unsigned short smax, const navAreaMask areaMask, const int flagMergeThr);
84 
95 void rcRasterizeTriangle(rcContext* ctx, const float* v0, const float* v1, const float* v2, const navAreaMask areaMask, rcHeightfield& solid, const int flagMergeThr = 1);
96 
108 void rcRasterizeTriangles(rcContext* ctx, const float* verts, const int nv, const int* tris, const navAreaMask* areaMasks, const int nt, rcHeightfield& solid, const int flagMergeThr = 1);
109 
121 void rcRasterizeTriangles(rcContext* ctx, const float* verts, const int nv, const unsigned short* tris, const navAreaMask* areaMasks, const int nt, rcHeightfield& solid, const int flagMergeThr = 1);
122 
132 void rcRasterizeTriangles(rcContext* ctx, const float* verts, const navAreaMask* areaMasks, const int nt, rcHeightfield& solid, const int flagMergeThr = 1);
133 
140 void rcFilterLowHangingWalkableObstacles(rcContext* ctx, const int walkableClimb, rcHeightfield& solid);
141 
150 void rcFilterLedgeSpans(rcContext* ctx, const int walkableHeight, const int walkableClimb, rcHeightfield& solid);
151 
158 void rcFilterWalkableLowHeightSpans(rcContext* ctx, int walkableHeight, rcHeightfield& solid);
159 
166 
167 
168 #endif
A dynamic heightfield representing obstructed space.
Definition: Recast.h:275
bool rcCreateHeightfield(rcContext *ctx, rcHeightfield &hf, int width, int height, const float *bmin, const float *bmax, float cs, float ch)
Initializes a new heightfield.
Definition: Recast.cpp:210
Provides an interface for optional logging and performance tracking of the Recast build process...
Definition: Recast.h:103
void rcMarkWalkableTriangles(rcContext *ctx, const float walkableSlopeAngle, const float *verts, int nv, const int *tris, int nt, navAreaMask *areaMasks)
Sets the area id of all triangles with a slope below the specified value to RC_WALKABLE_AREA.
Definition: Recast.cpp:244
void rcFilterLowHangingWalkableObstacles(rcContext *ctx, const int walkableClimb, rcHeightfield &solid)
Marks non-walkable spans as walkable if their maximum is within walkableClimp of a walkable neihbor...
Definition: RecastFilter.cpp:36
void rcCalcGridSize(const float *bmin, const float *bmax, float cs, int *w, int *h)
Calculates the grid size based on the bounding box and grid cell size.
Definition: Recast.cpp:199
void rcClearUnwalkableTriangles(rcContext *ctx, const float walkableSlopeAngle, const float *verts, int nv, const int *tris, int nt, navAreaMask *areaMasks)
Sets the area id of all triangles with a slope greater than or equal to the specified value to RC_NUL...
Definition: Recast.cpp:271
void rcRasterizeTriangles(rcContext *ctx, const float *verts, const int nv, const int *tris, const navAreaMask *areaMasks, const int nt, rcHeightfield &solid, const int flagMergeThr=1)
Rasterizes an indexed triangle mesh into the specified heightfield.
Definition: RecastRasterization.cpp:354
void rcRasterizeTriangle(rcContext *ctx, const float *v0, const float *v1, const float *v2, const navAreaMask areaMask, rcHeightfield &solid, const int flagMergeThr=1)
Rasterizes a triangle into the specified heightfield.
Definition: RecastRasterization.cpp:334
void rcFilterLedgeSpans(rcContext *ctx, const int walkableHeight, const int walkableClimb, rcHeightfield &solid)
Marks spans that are ledges as not-walkable.
Definition: RecastFilter.cpp:84
void rcCalcBounds(const float *verts, int nv, float *bmin, float *bmax)
Calculates the bounding box of an array of vertices.
Definition: Recast.cpp:186
void rcFilterWalkableLowHeightSpans(rcContext *ctx, int walkableHeight, rcHeightfield &solid)
Marks walkable spans as not walkable if the clearence above the span is less than the specified heigh...
Definition: RecastFilter.cpp:180
int rcGetHeightFieldSpanCount(rcContext *ctx, rcHeightfield &hf)
Returns the number of spans contained in the specified heightfield.
Definition: Recast.cpp:290
void rcAddSpan(rcContext *ctx, rcHeightfield &hf, const int x, const int y, const unsigned short smin, const unsigned short smax, const navAreaMask areaMask, const int flagMergeThr)
Adds a span to the specified heightfield.
Definition: RecastRasterization.cpp:164