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::CircleCondition Class Reference

A transition based on spatial relationship with a circle. More...

#include <CondSpace.h>

Inheritance diagram for Menge::BFSM::CircleCondition:
Menge::BFSM::SpaceCondition Menge::Math::CircleShape Menge::BFSM::Condition Menge::Math::Geometry2D Menge::Element

Public Member Functions

 CircleCondition ()
 Constructor.
 
 CircleCondition (const CircleCondition &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::CircleShape
 CircleShape ()
 Default constructor.
 
 CircleShape (const Vector2 &center, float radius)
 Constructor. More...
 
 CircleShape (const CircleShape &shape)
 Copy constructor. More...
 
 CircleShape (const CircleShape &shape, const Vector2 &offset)
 Initializes this shape as an translated version of the input shape. More...
 
CircleShape operator+ (const Vector2 &pt)
 Construct an offset version of this shape. More...
 
void setRadius (float radius)
 Sets the radius of the circle. More...
 
void setCenter (const Vector2 &center)
 Sets the center of the circle. More...
 
void set (const Vector2 &center, float radius)
 Sets the properties of the circle. More...
 
virtual bool containsPoint (const Vector2 &pt, const Vector2 &pos) const
 Determine if the point is inside a circle, centered on the given position. 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::CircleShape
Vector2 _center
 Center of the circle.
 
float _radSqd
 Squared radius of the circle.
 

Detailed Description

A transition based on spatial relationship with a circle.

The agent will transition when it reaches the relationship (inside or outside) to the defined circle.

Constructor & Destructor Documentation

Menge::BFSM::CircleCondition::CircleCondition ( const CircleCondition cond)

Copy Constructor.

Parameters
condThe condition to copy from.

Member Function Documentation

virtual bool Menge::BFSM::CircleCondition::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::CircleCondition::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: