Menge
Modular Pedestrian Simulation Framework for Research and Development
|
A spatial transition based on individual goal positions. More...
#include <CondGoal.h>
Public Member Functions | |
GoalCondition () | |
Constructor. | |
GoalCondition (const GoalCondition &cond) | |
Copy Constructor. More... | |
virtual bool | conditionMet (Agents::BaseAgent *agent, const Goal *goal) |
The GoalCondition's condition is met when the agent is within a distance to the goal. More... | |
virtual Condition * | copy () |
Create a copy of this condition. More... | |
void | setMinDistance (float dist) |
Set the minimum distance of approach. More... | |
Public Member Functions inherited from Menge::BFSM::Condition | |
Condition () | |
Constructor. | |
Condition (const Condition &cond) | |
Copy Constructor. More... | |
virtual void | onEnter (Agents::BaseAgent *agent) |
Called when an agent enters a state with this exiting transition. More... | |
virtual void | onLeave (Agents::BaseAgent *agent) |
Called when an agent exits the state with this transition. More... | |
Public Member Functions inherited from Menge::Element | |
void | destroy () |
This supplants the destructor. More... | |
virtual BFSM::Task * | getTask () |
Return an optional task associated with this element. More... | |
virtual SceneGraph::GLNode * | getSGNode () |
Returns an optional visualization element associated with the element. More... | |
Protected Attributes | |
float | _distSq |
Minimum distance of approach (squared for efficiency). | |
Additional Inherited Members | |
Protected Member Functions inherited from Menge::BFSM::Condition | |
virtual | ~Condition () |
Protected destructor. | |
A spatial transition based on individual goal positions.
Menge::BFSM::GoalCondition::GoalCondition | ( | const GoalCondition & | cond | ) |
Copy Constructor.
cond | The condition to copy from. |
|
virtual |
The GoalCondition's condition is met when the agent is within a distance to the goal.
agent | The agent to test the transition for. |
goal | The agent's goal (although this may be ignored). |
Implements Menge::BFSM::Condition.
|
virtual |
Create a copy of this condition.
It is the responsibility of the caller to delete the object.
Implements Menge::BFSM::Condition.
|
inline |
Set the minimum distance of approach.
dist | The minimum distance to the goal to consider the condition met. |