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 Member Functions | List of all members
Menge::Agents::Elevation Class Referenceabstract

The base class for determining an agent's elevation. More...

#include <Elevation.h>

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

Public Member Functions

virtual float getElevation (const Vector2 &point) const =0
 Reports the elevation of the simulation domain at the given point. More...
 
virtual float getElevation (const BaseAgent *agent) const =0
 Reports the elevation of the simulation domain for the given agent. More...
 
virtual Vector2 getGradient (const Vector2 &point) const =0
 Reports the gradient of the simulation domain at the given point. More...
 
virtual Vector2 getGradient (const BaseAgent *agent) const =0
 Reports the gradient of the simulation domain for the given agent. More...
 
- Public Member Functions inherited from Menge::Element
void destroy ()
 This supplants the destructor. More...
 
virtual BFSM::TaskgetTask ()
 Return an optional task associated with this element. More...
 
virtual SceneGraph::GLNodegetSGNode ()
 Returns an optional visualization element associated with the element. More...
 

Protected Member Functions

virtual ~Elevation ()
 Virtual destructor.
 

Detailed Description

The base class for determining an agent's elevation.

This is an abstract class, primarily defining the Elevation abstraction. Essentially, the Elevation object must be able to report elevation for an agent (or an arbitrary position) and the "gradient" at that point.

The gradient is not truly the gradient. In fact, it is merely the projection of the elevation object's normal on the planning plane. So, if the elevation is parallel to the planning plane, the gradient would be the vector <0, 0>. If the elevation surface is perpendicular to the planning plane (a highly unlikely contingent) it would be the vector <x, y> such that the magnitude of that vector is 1.

Member Function Documentation

virtual float Menge::Agents::Elevation::getElevation ( const Vector2 point) const
pure 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.

Implemented in Menge::Agents::NavMeshElevation, and Menge::Agents::FlatElevation.

virtual float Menge::Agents::Elevation::getElevation ( const BaseAgent agent) const
pure virtual

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

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

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.

Implemented in Menge::Agents::NavMeshElevation, and Menge::Agents::FlatElevation.

virtual Vector2 Menge::Agents::Elevation::getGradient ( const Vector2 point) const
pure 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.

Implemented in Menge::Agents::NavMeshElevation, and Menge::Agents::FlatElevation.

virtual Vector2 Menge::Agents::Elevation::getGradient ( const BaseAgent agent) const
pure virtual

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

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

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

Implemented in Menge::Agents::NavMeshElevation, and Menge::Agents::FlatElevation.


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