Menge Plugin Examples
A Collection of Example Plugins for the Menge Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Attributes | List of all members
Terrain::HeightFieldElevation Class Reference

Elevation definition based on a height field. More...

#include <ElevationHeightField.h>

Inheritance diagram for Terrain::HeightFieldElevation:

Public Member Functions

 HeightFieldElevation ()
 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 Agents::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 Agents::BaseAgent *agent) const
 Reports the gradient of the simulation domain for the given agent. More...
 
void setHeightField (HeightFieldPtr hfPtr)
 Sets the height field for this elevation object to use. More...
 

Protected Attributes

HeightFieldPtr _field
 The height field used to query elevation and gradient.
 

Detailed Description

Elevation definition based on a height field.

Member Function Documentation

float Terrain::HeightFieldElevation::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.
float Terrain::HeightFieldElevation::getElevation ( const Agents::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.
Vector2 Terrain::HeightFieldElevation::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.
Vector2 Terrain::HeightFieldElevation::getGradient ( const Agents::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.
void Terrain::HeightFieldElevation::setHeightField ( HeightFieldPtr  hfPtr)
inline

Sets the height field for this elevation object to use.

Parameters
hfPtrA managed pointer to the height field.

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