The agent definition for the OpenSteer model.
More...
#include <OpenSteerAgent.h>
|
float | _tau |
| The time horizon for predicting agent collisions.
|
|
float | _tauObst |
| The time horizon for predicting obstacle collisions.
|
|
The agent definition for the OpenSteer model.
Vector2 OpenSteer::Agent::calcBoidAccel |
( |
Vector2 & |
force, |
|
|
const Vector2 & |
forward |
|
) |
| |
|
protected |
Clamp acceleration according to OpenSteer rules.
This function converts the force into a mass by processing it according to constraints and then dividing it by the agent's mass.
- Parameters
-
force | The accelerating force computed. |
forward | The agent's facing direction. |
- Returns
- The acceleration the agent should experience.
bool OpenSteer::Agent::steerToAvoidNeighbors |
( |
const Vector2 & |
forward, |
|
|
Vector2 & |
avoidForce |
|
) |
| |
|
protected |
Determine steering force to avoid agents.
- Parameters
-
forward | The forward direction of the agent |
avoidForce | The avoidance force will be placed in this parameter. |
- Returns
- True if steering is required and the value in avoidForce is meaningful. Otherwise, false, and avoidForce's value should be ignored.
bool OpenSteer::Agent::steerToAvoidObstacles |
( |
const Vector2 & |
forward, |
|
|
Vector2 & |
avoidForce, |
|
|
const float |
maxForce |
|
) |
| |
|
protected |
Determine steering force to avoid obstacles.
- Parameters
-
forward | The forward direction of the agent |
avoidForce | The avoidance force will be placed in this parameter. |
maxForce | The maximum allowable magnitude for the avoidance force. |
- Returns
- True if steering is required and the value in avoidForce is meaningful. Otherwise, false, and avoidForce's value should be ignored.
The documentation for this class was generated from the following files:
- PedPlugins/PedOpenSteer/OpenSteerAgent.h
- PedPlugins/PedOpenSteer/OpenSteerAgent.cpp