Menge
Modular Pedestrian Simulation Framework for Research and Development
|
A transition based on spatial relationship with a circle. More...
#include <CondSpace.h>
Public Member Functions | |
CircleCondition () | |
Constructor. | |
CircleCondition (const CircleCondition &cond) | |
Copy Constructor. More... | |
virtual Condition * | copy () |
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::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... | |
Public Member Functions inherited from Menge::Math::CircleShape | |
CircleShape () | |
Default constructor. | |
CircleShape (const Vector2 ¢er, 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 ¢er) |
Sets the center of the circle. More... | |
void | set (const Vector2 ¢er, 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. | |
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.
Menge::BFSM::CircleCondition::CircleCondition | ( | const CircleCondition & | cond | ) |
Copy Constructor.
cond | The condition to copy from. |
|
inlineprotectedvirtual |
Determines if a point is inside the test region.
pt | The point to test w.r.t. the transition region. |
Implements Menge::BFSM::SpaceCondition.
|
virtual |
Create a copy of this condition.
It is the responsibility of the caller to delete the object.
Implements Menge::BFSM::Condition.