Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The base class for determining an agent's elevation. More...
#include <Elevation.h>
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::Task * | getTask () |
Return an optional task associated with this element. More... | |
virtual SceneGraph::GLNode * | getSGNode () |
Returns an optional visualization element associated with the element. More... | |
Protected Member Functions | |
virtual | ~Elevation () |
Virtual destructor. | |
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.
|
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.
point | A point on the x-z cartesian plane. |
Implemented in Menge::Agents::NavMeshElevation, and Menge::Agents::FlatElevation.
|
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.
agent | A pointer to the agent for which elevation should be reported. |
Implemented in Menge::Agents::NavMeshElevation, and Menge::Agents::FlatElevation.
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.
point | A point on the x-z cartesian plane. |
Implemented in Menge::Agents::NavMeshElevation, and Menge::Agents::FlatElevation.
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.
agent | A pointer to the agent for which gradient should be reported. |
Implemented in Menge::Agents::NavMeshElevation, and Menge::Agents::FlatElevation.