The modFollowAgent is based on the FollowAgent, which makes a Bot follow another //! specified Body, at a given distance and at a given angle relative to the.
More...
Detailed Description
The modFollowAgent is based on the FollowAgent, which makes a Bot follow another //! specified Body, at a given distance and at a given angle relative to the.
Constructor & Destructor Documentation
| Kaim::modFollowAgent::modFollowAgent |
( |
| ) |
|
STANDARD AGENT FUNCTIONS.
| Kaim::modFollowAgent::~modFollowAgent |
( |
| ) |
|
Member Function Documentation
| KyResult Kaim::modFollowAgent::Initialize |
( |
Bot & |
bot, |
|
|
TimeManager::TaskId |
computeRealDestinationTaskId |
|
) |
| |
- Parameters
-
| bot | The Bot that will use the modFollowAgent. |
| computeRealDestinationTaskId | The unique ID of a aperiodic task configured for the TraversalManager, which will be used to determine whether or not enough time remains in the current frame for the modFollowAgent to recompute its ideal destination. |
| void Kaim::modFollowAgent::Clear |
( |
| ) |
|
| void Kaim::modFollowAgent::ReInit |
( |
| ) |
|
| KyBool Kaim::modFollowAgent::Think |
( |
| ) |
|
Determines an appropriate destination point for the modFollowAgent based on the position of the Leader Bot, the distance to the Leader, and the desired following distance and angle set for the modFollowAgent. It then calls the PathFinder to move the modFollowAgent to the destination.
| void Kaim::modFollowAgent::SetLeader |
( |
Body * |
target | ) |
|
| Body* Kaim::modFollowAgent::GetLeader |
( |
| ) |
const |
|
inline |
| void Kaim::modFollowAgent::SetDistFromLeader |
( |
KyFloat32 |
distFromTarget | ) |
|
Determines the distance the modFollowAgent attempts to maintain between itself and its Leader Bot. meters any positive value or 0.0f 1.0f
| KyFloat32 Kaim::modFollowAgent::GetDistFromLeader |
( |
| ) |
const |
|
inline |
| void Kaim::modFollowAgent::SetAngleFromLeader |
( |
KyFloat32 |
angleFromTarget | ) |
|
Determines the angle the modFollowAgent attempts to maintain between the orientation of the Leader Body and the preferred destination. For example, the default value of 180.0 degrees means the modFollowAgent stays directly behind the Leader Body. degrees any negative or positive value 180.0f
| KyFloat32 Kaim::modFollowAgent::GetAngleFromLeader |
( |
| ) |
const |
|
inline |
| void Kaim::modFollowAgent::SetMinimalImportantMove |
( |
const KyFloat32 |
value | ) |
|
Determines the minimum distance the Leader Body must move in order to trigger a response from the modFollowAgent. If the Leader Body moves less than this value, the modFollowAgent will not re-evaluate its ideal destination. meters any positive value 1.0f
| KyFloat32 Kaim::modFollowAgent::GetMinimalImportantMove |
( |
| ) |
const |
|
inline |
| void Kaim::modFollowAgent::SetSpeed |
( |
const KyFloat32 |
speed | ) |
|
Determines the preferred speed at which the modFollowAgent should move. This preferred speed is capped to the value of the BodyMaxSpeed attribute set for the Bot using the modFollowAgent, if any. In addition, it may be altered by the current set of IModifier classes used by the PathFinder. meters per second any positive value The value of the BodyMaxSpeed attribute of the Bot if available, or 1.0f otherwise.
| KyFloat32 Kaim::modFollowAgent::GetSpeed |
( |
| ) |
const |
|
inline |
| void Kaim::modFollowAgent::SetMaxTimeToReachIdealDestination |
( |
KyFloat32 |
interval | ) |
|
Determines the maximum amount of time the modFollowAgent may spend trying to reach its destination point. When this time interval is exceeded, the modFollowAgent recalculates its ideal destination point.
| const Vec3f& Kaim::modFollowAgent::GetDestination |
( |
| ) |
const |
|
inline |
| KyBool Kaim::modFollowAgent::HasArrived |
( |
| ) |
const |
|
inline |
| void Kaim::modFollowAgent::computeAndLockDestination |
( |
Vec3f & |
offsetPosNow | ) |
|
|
protected |
| KyBool Kaim::modFollowAgent::NeedRecomputation |
( |
Vec3f & |
offsetPosNow | ) |
|
|
protected |
| void Kaim::modFollowAgent::computeVisibleDestination |
( |
Vec3f & |
idealPos | ) |
|
|
protected |
Member Data Documentation
| Bot* Kaim::modFollowAgent::m_bot |
|
protected |
| Body* Kaim::modFollowAgent::m_leaderBody |
|
protected |
| KyFloat32 Kaim::modFollowAgent::m_minDistBetweenAgents |
|
protected |
| KyFloat32 Kaim::modFollowAgent::m_desiredDistFromLeader |
|
protected |
| KyFloat32 Kaim::modFollowAgent::m_desiredAngleFromLeader |
|
protected |
| PointLockManager* Kaim::modFollowAgent::m_pointLockManager |
|
protected |
| TimeManager::TaskId Kaim::modFollowAgent::m_computeRealDestinationTaskId |
|
protected |
service
Time-slicing configuration
| KyFloat32 Kaim::modFollowAgent::m_computeRealDistTimer |
|
protected |
| KyFloat32 Kaim::modFollowAgent::m_minimalIntervalToReevaluate |
|
protected |
| KyFloat32 Kaim::modFollowAgent::m_maximalIntervalToReachDestination |
|
protected |
| KyFloat32 Kaim::modFollowAgent::m_timerToReach |
|
protected |
| ActionTorsoRotate* Kaim::modFollowAgent::m_torsoRotateAttr |
|
protected |
| PointWrapper Kaim::modFollowAgent::m_destination |
|
protected |
| PointInfo_NavTriangleId Kaim::modFollowAgent::m_DestPointInfo |
|
protected |
| KyBool Kaim::modFollowAgent::m_hasArrived |
|
protected |
| KyFloat32 Kaim::modFollowAgent::m_desiredSpeed |
|
protected |
| KyFloat32 Kaim::modFollowAgent::m_leaderLastSpeed |
|
protected |
| KyBool Kaim::modFollowAgent::m_useDistanceToLeaderMode |
|
protected |
the agent will aim to move at this speed at the follow position.
| Vec3f Kaim::modFollowAgent::m_lastIdealOffsetPos |
|
protected |
offset position, so it maintains a distance to its leader without regard to the desired angle offset.
| KyFloat32 Kaim::modFollowAgent::m_minimalImportantMove |
|
protected |
| KyFloat32 Kaim::modFollowAgent::m_currentMaxAccel |
|
protected |
The current maximum acceleration and deceleration the entity is capable of.
VRF can compute these based with consideration of slope, soils, and max entity speed, and provide them to the Agent so it can use them to set speed.
| KyFloat32 Kaim::modFollowAgent::m_currentMaxDecel |
|
protected |
The documentation for this class was generated from the following file:
- /exports/nfedora7-1/nightly/docs/vrforcesDevelopment.tot/include/bhaveSim/modFollowAgent.h