![]() |
VR-Forces 4.2 Class Documentation
|
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 |
| WanderTraversal * | GetTraversal () const |
| void | SetSpeed (const KyFloat32 speed) |
| KyFloat32 | GetSpeed () const |
| const PointWrapper & | GetDestination () const |
| void | SetDestination (Kaim::Vec3f fixedDestination) |
| KyBool | HasArrived () const |
| KyFloat32 | GetDestinationTimeStamp () const |
| DtVrfObject * | wanderArea () const |
| void | setWanderArea (DtVrfObject *val) |
| virtual void | processObjectAboutToBeRemoved (DtVrfObject *) |
Static Public Member Functions | |
| static void | objectAboutToBeRemovedCallback (DtVrfObject *, void *) |
Private Member Functions | |
| KyBool | ComputeDestination () |
Private Attributes | |
| Bot * | m_bot |
| BHAVE::DtRestrictedWanderTraversal * | myRestrictedTraversal |
| Time-Sliced Traversal. | |
| TraversalManager::ConfigId | myRestrictedTraversalConfigId |
| WanderTraversal * | m_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 |
| DtVrfObject * | myWanderArea |
| bool | myUsingFixedDestination |
| bool | myWanderAreaRemoved |
| If wander area is removed, this flag is set and next think returns false. | |
| bool | myWarnedOnce |
Friends | |
| class | WanderTraversal |
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".
| Kaim::bhaveWanderAgent::bhaveWanderAgent | ( | ) |
| Kaim::bhaveWanderAgent::~bhaveWanderAgent | ( | ) |
| KyResult Kaim::bhaveWanderAgent::Initialize | ( | Bot & | bot, |
| TraversalManager::ConfigId | traversalConfigId, | ||
| TraversalManager::ConfigId | restrictedTraversalConfigId | ||
| ) |
| bot | The Bot that will use the HideAgent. |
| traversalConfigId | The unique ID of a WanderTraversal instance configured for the TraversalManager. |
| restrictedTraversalConfigId | The unique ID of a RestrictedWanderTraversal instance configured for the TraversalManager. |
| void Kaim::bhaveWanderAgent::Clear | ( | ) |
| void Kaim::bhaveWanderAgent::ReInit | ( | ) |
| KyBool Kaim::bhaveWanderAgent::Think | ( | ) |
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.
|
inline |
Retrieves the value set through a call to SetGraph().
|
inline |
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.
|
inline |
Retrieves the value set through a call to SetSpeed().
|
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
|
inline |
Indicates whether or not the bhaveWanderAgent has arrived at its chosen destination.
|
inline |
Retrieves the time at which the bhaveWanderAgent last calculated its destination.
|
inline |
| void Kaim::bhaveWanderAgent::setWanderArea | ( | DtVrfObject * | val | ) |
|
static |
|
virtual |
|
private |
|
friend |
|
private |
|
private |
Time-Sliced Traversal.
|
private |
|
private |
|
private |
|
private |
Chosen destination.
|
private |
|
private |
|
private |
Hiding graph and related FindNearestData.
|
private |
Bias that is used to find a wander point.
|
private |
|
private |
State data.
|
private |
|
private |
|
private |
|
private |
If wander area is removed, this flag is set and next think returns false.
|
private |