45 #ifndef __NAV_MESH_POLY_H__
46 #define __NAV_MESH_POLY_H__
141 void initialize(
size_t vCount,
unsigned int * ids,
float A=0.f,
float B=0.f,
float C=0.f );
222 #endif // __NAV_MESH_POLY_H__
unsigned int * _vertIDs
An array of indices into the vertex list defining the polygon. The indices must be ordered such that ...
Definition: NavMeshPoly.h:155
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
float getElevation(const Vector2 &point) const
Computes the elevation of the polygon at the given point.
Definition: NavMeshPoly.cpp:161
float _A
The first coefficient of the planar equation: f( x, y ) = Ax + By + C Used to compute the elevation o...
Definition: NavMeshPoly.h:204
size_t _vertCount
The number of vertices in the polygon.
Definition: NavMeshPoly.h:160
The navigation mesh adjacency graph node. It corresponds to a convex polygon in the navigation mesh...
Definition: NavMeshNode.h:64
The polygon used in each node of a navigation mesh graph.
Definition: NavMeshPoly.h:61
float _maxX
Maximum extent on the x-axis of the polygon.
Definition: NavMeshPoly.h:179
NavMeshPoly & operator=(const NavMeshPoly &n)
Assignment operator.
Definition: NavMeshPoly.cpp:61
NavMeshPoly()
Constructor.
Definition: NavMeshPoly.cpp:48
float _minY
Minimum extent on the y-axis of the polygon.
Definition: NavMeshPoly.h:184
bool loadFromAscii(std::ifstream &f)
Sets the polygon properties from a polygon definition in the given ascii file stream.
Definition: NavMeshPoly.cpp:167
Vector2 getGradient() const
Reports the gradient of the polygon. Because it is a plane, the gradient is constant at all positions...
Definition: NavMeshPoly.h:106
const Vector2 * _vertices
A pointer to the mesh vertex information for performing geometric tests.
Definition: NavMeshPoly.h:166
float _C
The third coefficient of the planar equation: f( x, y ) = Ax + By + C Used to compute the elevation o...
Definition: NavMeshPoly.h:218
void setBB(const Vector2 *vertices)
Compute the bounding box for this polygon.
Definition: NavMeshPoly.cpp:236
bool loadFromBinary(std::ifstream &f)
Sets the polygon properties from a polygon definition in the given binary file stream.
Definition: NavMeshPoly.cpp:190
~NavMeshPoly()
Destructor.
Definition: NavMeshPoly.cpp:53
Collection of convenient pre-compiler information for fsm definitions.
The class for defining a navigation mesh. A decomposition of the free space into a connected mesh of ...
Definition: NavMesh.h:120
float _B
The second coefficient of the planar equation: f( x, y ) = Ax + By + C Used to compute the elevation ...
Definition: NavMeshPoly.h:211
void initialize(size_t vCount, unsigned int *ids, float A=0.f, float B=0.f, float C=0.f)
Initialize the polygon with vertices and equation of plane.
Definition: NavMeshPoly.cpp:222
bool containsPoint(const Vector2 &point) const
Reports if the point lies inside the polygon. NOTE: This is limited to 2D polygons.
Definition: NavMeshPoly.cpp:75
float _maxY
Maximum extent on the y-axis of the polygon.
Definition: NavMeshPoly.h:189
float _minX
Minimum extent on the x-axis of the polygon.
Definition: NavMeshPoly.h:174