Elevation definition based on a navigation mesh.
More...
#include <ElevationNavMesh.h>
Elevation definition based on a navigation mesh.
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
-
point | A 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
-
agent | A 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
-
point | A 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
-
agent | A 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
-
nm | The managed pointer to the navigation mesh. |
Sets the navigation mesh localizer pointer.
- Parameters
-
nml | The managed pointer to the navigation mesh localizer. |
The documentation for this class was generated from the following files:
- src/menge/MengeCore/Agents/Elevations/ElevationNavMesh.h
- src/menge/MengeCore/Agents/Elevations/ElevationNavMesh.cpp