Menge
Modular Pedestrian Simulation Framework for Research and Development
|
A transition based on spatial relationship with an axis-aligned bounding box (AABB). More...
#include <CondSpace.h>
Public Member Functions | |
OBBCondition () | |
Constructor. | |
OBBCondition (const OBBCondition &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::OBBShape | |
OBBShape () | |
Default constructor. | |
OBBShape (const Vector2 &pivot, const Vector2 &size, float angle) | |
Constructor. More... | |
OBBShape (const OBBShape &shape) | |
Copy constructor. More... | |
OBBShape (const OBBShape &shape, const Vector2 &offset) | |
Initializes this shape as an translated version of the input shape. More... | |
OBBShape | 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 OBB, centered on the given position. More... | |
void | set (const Vector2 &pivot, float width, float height, float angle) |
Sets the extent of the OBB. More... | |
void | setSize (const Vector2 &size) |
Sets the size of the OBB. More... | |
void | setAngle (float angle) |
Sets the angle of the OBB. 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::OBBShape | |
Vector2 | _pivot |
The minimum corners of the bounding box (the box is rotated around this point). | |
Vector2 | _size |
The width and height of the box (along its local coordinate system). | |
Vector2 | _halfSize |
The half width and height of the box. | |
float | _cosTheta |
The cosine of the box's angle of rotation (used for accelerating queries). | |
float | _sinTheta |
The sine of the box's angle of rotation (used for accelerating queries). | |
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).
Menge::BFSM::OBBCondition::OBBCondition | ( | const OBBCondition & | 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.