Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
Menge::Element Class Reference

The basic interface of extendible Menge Elements. More...

#include <Element.h>

Inheritance diagram for Menge::Element:
Menge::AgentPropertyManipulator Menge::Agents::AgentGenerator Menge::Agents::Elevation Menge::Agents::ObstacleSet Menge::Agents::ProfileSelector Menge::Agents::SpatialQuery Menge::Agents::StateSelector Menge::BFSM::Action Menge::BFSM::Condition Menge::BFSM::Goal Menge::BFSM::GoalSelector Menge::BFSM::Task Menge::BFSM::TransitionTarget Menge::BFSM::VelComponent Menge::BFSM::VelModifier Menge::EventEffect Menge::EventTarget Menge::EventTrigger

Public Member Functions

void destroy ()
 This supplants the destructor. More...
virtual BFSM::TaskgetTask ()
 Return an optional task associated with this element. More...
virtual SceneGraph::GLNodegetSGNode ()
 Returns an optional visualization element associated with the element. More...

Detailed Description

The basic interface of extendible Menge Elements.

A Menge element is a component of the Menge framework. A particular crowd simulator is defined by the instantiation of various types of elements.

Member Function Documentation

void Menge::Element::destroy ( )

This supplants the destructor.

In order to avoid potential problems in windows when dlls do not share the same c-runtime library, the destructor is held to be protected. To garbage collect a Condition, the destroy method should be called (which in turn, will call the destructor from its own memory space, averting run-time crashes).

Once this has been called, the TransitionTarget no longer exists. Calling methods or accessing members will produce indetermine behavior (most likely errors).

virtual SceneGraph::GLNode* Menge::Element::getSGNode ( )

Returns an optional visualization element associated with the element.

This element will simply be added to the scene graph and will be destroyed by the scene graph. It should not be used if the visualization is context dependent.

A pointer to the scene graph node element.
virtual BFSM::Task* Menge::Element::getTask ( )

Return an optional task associated with this element.

An element can have an accompanying Task for performing synchronized work. Most element implementations will not have a task. If a task is required, override this function to return an appropriate instance of the required task.

A pointer to the required task. It is the responsibility of the caller to free the memory of the provided task by calling its destroy method.

Reimplemented in Menge::Agents::NavMeshSpatialQuery, Menge::BFSM::NavMeshVelComponent, Menge::Agents::NavMeshElevation, Menge::BFSM::FarthestNMGoalSelector, and Menge::BFSM::NearestNMGoalSelector.

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