VR-Forces 4.0.4 Class Documentation
Public Member Functions | Private Member Functions | Private Attributes | Friends
Kaim::bhaveWanderAgent Class Reference

List of all members.

Public Member Functions

 bhaveWanderAgent ()
 ~bhaveWanderAgent ()
KyResult Initialize (Bot &bot, TraversalManager::ConfigId traversalConfigId, TraversalManager::ConfigId restrictedTraversalConfigId)
void Clear ()
void ReInit ()
KyBool Think ()
void SetGraph (GraphManager &graphManager)
const GraphManager * GetGraph () const
WanderTraversalGetTraversal () const
void SetSpeed (const KyFloat32 speed)
KyFloat32 GetSpeed () const
const PointWrapper & GetDestination () const
void SetDestination (Kaim::Vec3f fixedDestination)
KyBool HasArrived () const
KyFloat32 GetDestinationTimeStamp () const
DtVrfObjectwanderArea () const
void setWanderArea (DtVrfObject *val)

Private Member Functions

KyBool ComputeDestination ()

Private Attributes

Botm_bot
BHAVE::DtRestrictedWanderTraversalmyRestrictedTraversal
 Time-Sliced Traversal.
TraversalManager::ConfigId myRestrictedTraversalConfigId
WanderTraversalm_traversal
TraversalManager::ConfigId m_traversalConfigId
KyFloat32 m_destinationTimeStamp
 Chosen destination.
PointWrapper m_destination
PointInfo_VertexSafePtr m_destinationSafePtr
GraphManager * m_graphManager
 Hiding graph and related FindNearestData.
PropagationBias_Wander m_bias
 Bias that is used to find a wander point.
BHAVE::PropagationBias_RestrictedWander myRestrictedBias
KyBool m_hasArrived
 State data.
KyFloat32 m_speed
DtVrfObjectmyWanderArea
bool myUsingFixedDestination

Friends

class WanderTraversal

Detailed Description

The bhaveWanderAgent makes a Bot wander around the world at random. Each time it reaches a destination, it chooses a new vertex at random and moves there, repeating the process indefinitely. For details on using the bhaveWanderAgent, see :USERGUIDE:"Wandering".


Constructor & Destructor Documentation


Member Function Documentation

KyResult Kaim::bhaveWanderAgent::Initialize ( Bot bot,
TraversalManager::ConfigId  traversalConfigId,
TraversalManager::ConfigId  restrictedTraversalConfigId 
)
Parameters:
botThe Bot that will use the HideAgent.
traversalConfigIdThe unique ID of a WanderTraversal instance configured for the TraversalManager.
restrictedTraversalConfigIdThe unique ID of a RestrictedWanderTraversal instance configured for the TraversalManager.

Invokes the WanderTraversal to pick a destination at random, and invokes the PathFinder to move the Bot toward that destination.

void Kaim::bhaveWanderAgent::SetGraph ( GraphManager &  graphManager)

Sets the GraphManager that contains the set of that the bhaveWanderAgent should search for a hidden destination point.

const GraphManager* Kaim::bhaveWanderAgent::GetGraph ( ) const [inline]

Retrieves the value set through a call to SetGraph().

Retrieves the WanderTraversal currently in use by the bhaveWanderAgent, or #KY_NULL if the bhaveWanderAgent is not currently using a WanderTraversal.

void Kaim::bhaveWanderAgent::SetSpeed ( const KyFloat32  speed)

Determines the preferred speed at which the bhaveWanderAgent should move. This preferred speed is capped to the value of the BodyMaxSpeed attribute set for the Bot using the bhaveWanderAgent, 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::bhaveWanderAgent::GetSpeed ( ) const [inline]

Retrieves the value set through a call to SetSpeed().

const PointWrapper& Kaim::bhaveWanderAgent::GetDestination ( ) const [inline]

Retrieves the destination chosen by the bhaveWanderAgent, or #KY_NULL if it has not yet found a random destination.

void Kaim::bhaveWanderAgent::SetDestination ( Kaim::Vec3f  fixedDestination)

mak - This is the only added thing in here, and the reason why this class is copied

KyBool Kaim::bhaveWanderAgent::HasArrived ( ) const [inline]

Indicates whether or not the bhaveWanderAgent has arrived at its chosen destination.

Retrieves the time at which the bhaveWanderAgent last calculated its destination.


Friends And Related Function Documentation

friend class WanderTraversal [friend]

Member Data Documentation

Time-Sliced Traversal.

TraversalManager::ConfigId Kaim::bhaveWanderAgent::myRestrictedTraversalConfigId [private]
TraversalManager::ConfigId Kaim::bhaveWanderAgent::m_traversalConfigId [private]

Chosen destination.

PointWrapper Kaim::bhaveWanderAgent::m_destination [private]
PointInfo_VertexSafePtr Kaim::bhaveWanderAgent::m_destinationSafePtr [private]
GraphManager* Kaim::bhaveWanderAgent::m_graphManager [private]

Hiding graph and related FindNearestData.

PropagationBias_Wander Kaim::bhaveWanderAgent::m_bias [private]

Bias that is used to find a wander point.

State data.

KyFloat32 Kaim::bhaveWanderAgent::m_speed [private]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)