Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Menge::BFSM::SpaceCondition Class Referenceabstract

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>

Inheritance diagram for Menge::BFSM::SpaceCondition:
Menge::BFSM::Condition Menge::Element Menge::BFSM::AABBCondition Menge::BFSM::CircleCondition Menge::BFSM::OBBCondition

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 Conditioncopy ()=0
 Create a copy of this condition. More...
 
- Public Member Functions inherited from Menge::Element
void destroy ()
 This supplants the destructor. More...
 
virtual BFSM::TaskgetTask ()
 Return an optional task associated with this element. More...
 
virtual SceneGraph::GLNodegetSGNode ()
 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
 

Detailed Description

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.

Constructor & Destructor Documentation

Menge::BFSM::SpaceCondition::SpaceCondition ( const SpaceCondition cond)

Copy Constructor.

Parameters
condThe condition to copy from.

Member Function Documentation

bool Menge::BFSM::SpaceCondition::conditionMet ( Agents::BaseAgent agent,
const Goal goal 
)
virtual

The AutoCondition is always met – it is a tautology.

Parameters
agentThe agent to test the transition for.
goalThe agent's goal (although this may be ignored).
Returns
True if the condition has been met, false otherwise.

Implements Menge::BFSM::Condition.

virtual bool Menge::BFSM::SpaceCondition::containsPoint ( const Vector2 pt) const
protectedpure virtual

Determines if a point is inside the test region.

Purely a virtual function. Derived transitions must override this function.

Parameters
ptThe point to test w.r.t. the transition region.
Returns
True if the transition region contains the given point.

Implemented in Menge::BFSM::OBBCondition, Menge::BFSM::AABBCondition, and Menge::BFSM::CircleCondition.


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