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 | List of all members
Menge::BFSM::AABBCondition Class Reference

A transition based on spatial relationship with an axis-aligned bounding box (AABB). More...

#include <CondSpace.h>

Inheritance diagram for Menge::BFSM::AABBCondition:
Menge::BFSM::SpaceCondition Menge::Math::AABBShape Menge::BFSM::Condition Menge::Math::Geometry2D Menge::Element

Public Member Functions

 AABBCondition ()
 Constructor.
 
 AABBCondition (const AABBCondition &cond)
 Copy Constructor. More...
 
virtual Conditioncopy ()
 Create a copy of this condition. More...
 
- Public Member Functions inherited from Menge::BFSM::SpaceCondition
 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...
 
- 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...
 
- Public Member Functions inherited from Menge::Math::AABBShape
 AABBShape ()
 Default constructor.
 
 AABBShape (const Vector2 &minPt, const Vector2 &maxPt)
 Constructor. More...
 
 AABBShape (const AABBShape &shape)
 Copy constructor. More...
 
 AABBShape (const AABBShape &shape, const Vector2 &offset)
 Initializes this shape as an translated version of the input shape. More...
 
AABBShape operator+ (const Vector2 &pt)
 Construct an offset version of this shape. More...
 
virtual bool containsPoint (const Vector2 &pt, const Vector2 &pos) const
 Determine if the point is inside a AABB, centered on the given position. More...
 
void set (const Vector2 &minPt, const Vector2 &maxPt)
 Sets the extent of the AABB. More...
 
void setSize (const Vector2 &size)
 Sets the size of the AABB. More...
 
- Public Member Functions inherited from Menge::Math::Geometry2D
 Geometry2D ()
 Constructor.
 
virtual ~Geometry2D ()
 Simple destructor.
 

Protected Member Functions

virtual bool containsPoint (const Vector2 &pt) const
 Determines if a point is inside the test region. More...
 
- Protected Member Functions inherited from Menge::BFSM::SpaceCondition
 ~SpaceCondition ()
 Constructor.
 
- Protected Member Functions inherited from Menge::BFSM::Condition
virtual ~Condition ()
 Protected destructor.
 

Additional Inherited Members

- Protected Attributes inherited from Menge::BFSM::SpaceCondition
bool _outsideActive
 Determines if the transition happens when the agent is outside (true) or inside (false).
 
- Protected Attributes inherited from Menge::Math::AABBShape
Vector2 _minPt
 The minimum extent of the bounding box.
 
Vector2 _maxPt
 The maximum extent of the bounding box.
 
Vector2 _halfSize
 The size of the bounding box (along the x- and y- axes).
 

Detailed Description

A transition based on spatial relationship with an axis-aligned bounding box (AABB).

The agent will transition when it reaches the relationship (inside or outside) to the defined axis-aligned bounding box (AABB).

Constructor & Destructor Documentation

Menge::BFSM::AABBCondition::AABBCondition ( const AABBCondition cond)

Copy Constructor.

Parameters
condThe condition to copy from.

Member Function Documentation

virtual bool Menge::BFSM::AABBCondition::containsPoint ( const Vector2 pt) const
inlineprotectedvirtual

Determines if a point is inside the test region.

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

Implements Menge::BFSM::SpaceCondition.

Condition * Menge::BFSM::AABBCondition::copy ( )
virtual

Create a copy of this condition.

It is the responsibility of the caller to delete the object.

Returns
: A "deep copy" of this condition - such that there is no shared objects between this and its copy.

Implements Menge::BFSM::Condition.


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