Menge Plugin Examples
A Collection of Example Plugins for the Menge Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Aircraft::PropertyXAction Class Reference

An action that sets agent properties based on the agent's position along the x-axis. More...

#include <AircraftAction.h>

Inheritance diagram for Aircraft::PropertyXAction:

Public Member Functions

 PropertyXAction ()
 Constructor.
 
 ~PropertyXAction ()
 Virtual destructor.
 
void onEnter (Agents::BaseAgent *agent)
 Upon entering the state, this is called – it is the main work of the action. More...
 

Protected Member Functions

void leaveAction (Agents::BaseAgent *agent)
 The work to do upon state exit. More...
 

Protected Attributes

float _xOrigin
 The x-position at which the value is set to _originValue;.
 
float _originValue
 The value for the property at _xOrigin;.
 
float _scale
 The rate of change to the property for each unit displacement along the x-axis. (Essentially, this is the slope of the line.)
 
BFSM::PropertyOperand _property
 The property to operate on.
 
std::map< size_t, float > _originalMap
 A mapping from agent id to the agent's property value before the action was applied.
 
SimpleLock _lock
 Lock to protect _originalMap.
 

Friends

class PropertyXActFactory
 

Detailed Description

An action that sets agent properties based on the agent's position along the x-axis.

Member Function Documentation

void Aircraft::PropertyXAction::leaveAction ( Agents::BaseAgent *  agent)
protected

The work to do upon state exit.

Parameters
agentThe agent to act on.
void Aircraft::PropertyXAction::onEnter ( Agents::BaseAgent *  agent)

Upon entering the state, this is called – it is the main work of the action.

Parameters
agentThe agent to act on.

The documentation for this class was generated from the following files: