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::ClearAABBCondition Class Reference

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

#include <AircraftTransition.h>

Inheritance diagram for Aircraft::ClearAABBCondition:

Public Member Functions

 ClearAABBCondition ()
 Constructor.
 
 ClearAABBCondition (const ClearAABBCondition &cond)
 Copy constructor. More...
 
virtual bool conditionMet (Agents::BaseAgent *agent, const BFSM::Goal *goal)
 The AutoCondition is always met – it is a tautology. More...
 
virtual BFSM::Condition * copy ()
 Create a copy of this condition. More...
 
void setParams (float xMin, float xMax, float yMin, float yMax, bool relative, int agentClass)
 Sets the dimensions of the bounding box. More...
 

Protected Member Functions

virtual ~ClearAABBCondition ()
 Virtual destructor.
 

Protected Attributes

bool _relative
 Indicates whether the box is defined relative to the agent's position (true) or not (false).
 
size_t _agentClass
 The agent class this transition operates on. If -1, all agent classes are tested.
 
AABBShape _baseBox
 The definition of the underlying AABB.
 

Friends

class ClearAABBCondFactory
 

Detailed Description

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

Constructor & Destructor Documentation

Aircraft::ClearAABBCondition::ClearAABBCondition ( const ClearAABBCondition cond)

Copy constructor.

Parameters
condThe condition to copy from.

Member Function Documentation

bool Aircraft::ClearAABBCondition::conditionMet ( Agents::BaseAgent *  agent,
const BFSM::Goal *  goal 
)
virtual

The AutoCondition is always met – it is a tautology.

Parameters
agentThe agent to test the transition for.
goalThe agent's goal (although this may be ignored).
Returns
True if the condition has been met, false otherwise.
BFSM::Condition * Aircraft::ClearAABBCondition::copy ( )
virtual

Create a copy of this condition.

It is the responsibility of the caller to delete the object.

Returns
: A "deep copy" of this condition - such that there is no shared objects between this and its copy.
void Aircraft::ClearAABBCondition::setParams ( float  xMin,
float  xMax,
float  yMin,
float  yMax,
bool  relative,
int  agentClass 
)

Sets the dimensions of the bounding box.

Parameters
xMinThe minimum point on the AABB along the x-axis.
xMaxThe maximum point on the AABB along the x-axis.
yMinThe minimum point on the AABB along the y-axis.
yMaxThe maximum point on the AABB along the y-axis.
relativeSpecifies if the clear box is relative (true) to the agents current position, or absolute in the world.
agentClassThe class of the agents which are tested. If -1 all agents are considered.

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