#include <src/TerrainAgent.h>
Inheritance diagram for TerrainAgent:
Default attitude correction policy is now keep up, with up defined by the terrain normal at the agent location. This allows the agents to keep their horizontal right on the floor, whatever the floor slope.
Note: The static class terrain field should be set up externally. By default, the agents consider Z=0 as the floor, and Z up the normal.
Public Member Functions | |
TerrainAgent () | |
Public API ///////////////. | |
double | getAltitude () |
const osg::Vec3d & | getFloorNormal () |
Static Public Attributes | |
static TerrainInterface * | terrain = &planeTerrain |
Protected Member Functions | |
virtual void | updateIntegration (const double elapsedTime, const double currentTime) |
Perform integration update: The position is constrained to be above the terrain, and attitude is updated accordingly. | |
virtual void | updateAI (const double elapsedTime, const double currentTime) |
Perform AI update: The position is constrained to be above the terrain, and attitude is updated accordingly. | |
Protected Attributes | |
double | altitude |
osg::Vec3d | floorNormal |
|
Perform AI update: The position is constrained to be above the terrain, and attitude is updated accordingly. Two new internal variables are set for subclasse, which can be checked together with other state variables (position, attitude, etc...)
Subclasses should call this function at the beginning of their AI update routine Reimplemented from Agent. Reimplemented in ExplicitAIAgent, NeuronalAgent, and ExplicitAIAgent. |
|
Perform integration update: The position is constrained to be above the terrain, and attitude is updated accordingly. Two new internal variables are set for subclasse, which can be checked together with other state variables (position, attitude, etc...)
Subclasses should call this function at the beginning of their AI update routine Reimplemented from Agent. Reimplemented in CrogaiAgent. |