Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The base class for modifying agent obstacle sets. More...
#include <ObstacleAction.h>
Public Member Functions | |
ObstacleAction () | |
Constructor. | |
virtual | ~ObstacleAction () |
Virtual destructor. | |
virtual void | onEnter (Agents::BaseAgent *agent) |
Upon entering the state, this is called – it is the main work of the action. More... | |
Public Member Functions inherited from Menge::BFSM::Action | |
Action () | |
Constructor. | |
void | onLeave (Agents::BaseAgent *agent) |
The work to do upon state exit. 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... | |
Protected Member Functions | |
virtual void | leaveAction (Agents::BaseAgent *agent) |
The work to do upon state exit. More... | |
virtual size_t | newValue (size_t value)=0 |
Computes the new property value given the original property value. More... | |
Protected Member Functions inherited from Menge::BFSM::Action | |
virtual | ~Action () |
Virtual destructor. | |
Protected Attributes | |
size_t | _setOperand |
The set operand to apply to the agents obstacle set. | |
std::map< size_t, size_t > | _originalMap |
A mapping from agent id to the agent's obstacle set value before the action was applied. | |
SimpleLock | _lock |
Lock for guaranteeing thread-safety. | |
Protected Attributes inherited from Menge::BFSM::Action | |
bool | _undoOnExit |
Determines if the action undoes itself on exiting the state. | |
Friends | |
class | ObstacleActFactory |
The base class for modifying agent obstacle sets.
This is an abstract class and must be sub-classed.
|
protectedvirtual |
The work to do upon state exit.
agent | The agent to act on. |
Implements Menge::BFSM::Action.
|
protectedpure virtual |
Computes the new property value given the original property value.
value | The original obstacle set value. |
Implemented in Menge::BFSM::SetObstacleSetAction, Menge::BFSM::AddObstacleSetAction, and Menge::BFSM::RemoveObstacleSetAction.
|
virtual |
Upon entering the state, this is called – it is the main work of the action.
agent | The agent to act on. |
Implements Menge::BFSM::Action.