Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The abstact base class for spatial conditions. This includes all conditions which define a geometric region and then determines that the condition is met by either entering or exiting the region. More...
#include <CondSpace.h>
Public Member Functions | |
SpaceCondition () | |
Constructor. | |
SpaceCondition (const SpaceCondition &cond) | |
Copy Constructor. More... | |
virtual bool | conditionMet (Agents::BaseAgent *agent, const Goal *goal) |
The AutoCondition is always met – it is a tautology. 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... | |
virtual Condition * | copy ()=0 |
Create a copy of this condition. 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 Member Functions | |
~SpaceCondition () | |
Constructor. | |
virtual bool | containsPoint (const Vector2 &pt) const =0 |
Determines if a point is inside the test region. More... | |
Protected Member Functions inherited from Menge::BFSM::Condition | |
virtual | ~Condition () |
Protected destructor. | |
Protected Attributes | |
bool | _outsideActive |
Determines if the transition happens when the agent is outside (true) or inside (false). | |
Friends | |
class | SpaceCondFactory |
The abstact base class for spatial conditions. This includes all conditions which define a geometric region and then determines that the condition is met by either entering or exiting the region.
Menge::BFSM::SpaceCondition::SpaceCondition | ( | const SpaceCondition & | cond | ) |
Copy Constructor.
cond | The condition to copy from. |
|
virtual |
The AutoCondition is always met – it is a tautology.
agent | The agent to test the transition for. |
goal | The agent's goal (although this may be ignored). |
Implements Menge::BFSM::Condition.
|
protectedpure virtual |
Determines if a point is inside the test region.
Purely a virtual function. Derived transitions must override this function.
pt | The point to test w.r.t. the transition region. |
Implemented in Menge::BFSM::OBBCondition, Menge::BFSM::AABBCondition, and Menge::BFSM::CircleCondition.