Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
Menge::Agents::NavMeshElevation Class Reference

Elevation definition based on a navigation mesh. More...

#include <ElevationNavMesh.h>

Inheritance diagram for Menge::Agents::NavMeshElevation:
Menge::Agents::Elevation Menge::Element

Public Member Functions

 NavMeshElevation ()
 Constructor.
 
virtual float getElevation (const Vector2 &point) const
 Reports the elevation of the simulation domain at the given point. The domain may have more than one valid elevation for the point. It is the responsibility of the elevation entity resolve this. More...
 
virtual float getElevation (const BaseAgent *agent) const
 Reports the elevation of the simulation domain for the given agent. More...
 
virtual Vector2 getGradient (const Vector2 &point) const
 Reports the gradient of the simulation domain at the given point. The domain may have more than one valid gradient for the point. It is the responsibility of the elevation entity resolve this. More...
 
virtual Vector2 getGradient (const BaseAgent *agent) const
 Reports the gradient of the simulation domain for the given agent. More...
 
void setNavMesh (const NavMeshPtr &nm)
 Sets the navigation mesh pointer. More...
 
void setNavMeshLocalizer (const NavMeshLocalizerPtr &nml)
 Sets the navigation mesh localizer pointer. More...
 
virtual BFSM::TaskgetTask ()
 Returns a pointer to the nav mesh localizer task. More...
 
- Public Member Functions inherited from Menge::Element
void destroy ()
 This supplants the destructor. More...
 
virtual SceneGraph::GLNodegetSGNode ()
 Returns an optional visualization element associated with the element. More...
 

Protected Attributes

NavMeshPtr _navMesh
 The navigation mesh used to query elevation and gradient.
 
NavMeshLocalizerPtr _localizer
 The localizer for identifying where the agents are in the navigation mesh.
 

Additional Inherited Members

- Protected Member Functions inherited from Menge::Agents::Elevation
virtual ~Elevation ()
 Virtual destructor.
 

Detailed Description

Elevation definition based on a navigation mesh.

Member Function Documentation

float Menge::Agents::NavMeshElevation::getElevation ( const Vector2 point) const
virtual

Reports the elevation of the simulation domain at the given point. The domain may have more than one valid elevation for the point. It is the responsibility of the elevation entity resolve this.

Parameters
pointA point on the x-z cartesian plane.
Returns
The elevation at the given point.

Implements Menge::Agents::Elevation.

float Menge::Agents::NavMeshElevation::getElevation ( const BaseAgent agent) const
virtual

Reports the elevation of the simulation domain for the given agent.

Parameters
agentA pointer to the agent for which elevation should be reported.
Returns
The elevation (position on the y-axis) based on current agent state/position.

Implements Menge::Agents::Elevation.

Vector2 Menge::Agents::NavMeshElevation::getGradient ( const Vector2 point) const
virtual

Reports the gradient of the simulation domain at the given point. The domain may have more than one valid gradient for the point. It is the responsibility of the elevation entity resolve this.

Parameters
pointA point on the x-z cartesian plane.
Returns
The gradient at the given point.

Implements Menge::Agents::Elevation.

Vector2 Menge::Agents::NavMeshElevation::getGradient ( const BaseAgent agent) const
virtual

Reports the gradient of the simulation domain for the given agent.

Parameters
agentA pointer to the agent for which gradient should be reported.
Returns
The gradient of the domain based on current agent state/position.

Implements Menge::Agents::Elevation.

BFSM::Task * Menge::Agents::NavMeshElevation::getTask ( )
virtual

Returns a pointer to the nav mesh localizer task.

Returns
A pointer to the nav mesh localizer task. It is the responsibility of the caller to free the memory of the provided task by calling its destroy method.

Reimplemented from Menge::Element.

void Menge::Agents::NavMeshElevation::setNavMesh ( const NavMeshPtr nm)
inline

Sets the navigation mesh pointer.

Parameters
nmThe managed pointer to the navigation mesh.
void Menge::Agents::NavMeshElevation::setNavMeshLocalizer ( const NavMeshLocalizerPtr nml)
inline

Sets the navigation mesh localizer pointer.

Parameters
nmlThe managed pointer to the navigation mesh localizer.

The documentation for this class was generated from the following files: