Menge
Modular Pedestrian Simulation Framework for Research and Development
|
A velocity modifier that scales the input velocity's speed. More...
#include <VelModifierScale.h>
Public Member Functions | |
ScaleVelModifier () | |
Default constructor. | |
ScaleVelModifier (const float scale) | |
Constructor. More... | |
void | setScale (const float scale) |
Sets the scale factor. More... | |
void | adaptPrefVelocity (const Agents::BaseAgent *agent, Agents::PrefVelocity &pVel) |
Scales the input preferred velocity's speed by the pre-defined scale factor. More... | |
float | getScale () const |
Returns scale factor. More... | |
VelModifier * | copy () const |
Creates a copy of this velocity modifier. More... | |
virtual VelModContext * | getContext () |
Provides a display context for interacting with this velocity modifier. More... | |
Public Member Functions inherited from Menge::BFSM::VelModifier | |
VelModifier () | |
Default constructor. | |
virtual void | registerAgent (const Agents::BaseAgent *agent) |
Registers an agent for use with the VelModifier. More... | |
virtual void | unregisterAgent (const Agents::BaseAgent *agent) |
Unregisters a registed agent. More... | |
void | onEnter (const Agents::BaseAgent *agent) |
Called when an agent enters the state with this velocity modifier. More... | |
void | onLeave (const Agents::BaseAgent *agent) |
Called when an agent exits the state with this velocity modifier. 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 Attributes | |
float | _scale |
The scale factor to apply. | |
Friends | |
class | ScaleVMFactory |
Additional Inherited Members | |
Protected Member Functions inherited from Menge::BFSM::VelModifier | |
virtual | ~VelModifier () |
Virtual destructor. | |
A velocity modifier that scales the input velocity's speed.
Menge::BFSM::ScaleVelModifier::ScaleVelModifier | ( | const float | scale | ) |
Constructor.
scale | The scale factor to apply to the preferred velocity's speed. |
|
virtual |
Scales the input preferred velocity's speed by the pre-defined scale factor.
agent | The agent for which a preferred velocity is modified. |
pVel | The instance of Agents::PrefVelocity to set. |
Implements Menge::BFSM::VelModifier.
|
virtual |
Creates a copy of this velocity modifier.
Implements Menge::BFSM::VelModifier.
|
virtual |
Provides a display context for interacting with this velocity modifier.
Reimplemented from Menge::BFSM::VelModifier.
|
inline |
Returns scale factor.
void Menge::BFSM::ScaleVelModifier::setScale | ( | const float | scale | ) |
Sets the scale factor.
scale | The the scale factor to apply to the preferred velocity's speed. |