116 Goal():
Element(),_weight(1.f),_capacity(MAX_CAPACITY),_id(-1),_goalSet(0x0),_population(0){}
131 virtual float squaredDistance(
const Vector2 & pt )
const = 0;
165 virtual Vector2 getTargetPoint(
const Vector2 & q,
float r )
const = 0;
170 virtual Vector2 getCentroid()
const = 0;
177 bool hasCapacity()
const;
229 inline void setWeight(
float weight ) { _weight = weight; }
243 inline void setCapacity(
size_t capacity ) { _capacity = capacity; }
257 inline void setID(
size_t id ) { _id = id; }
264 inline size_t getID()
const {
return _id; }
269 virtual void drawGL()
const;
327 Goal * parseGoal( TiXmlElement * node,
const std::string & behaveFldr );
void setGoalSet(GoalSet *goalSet)
Sets this goal's goal set.
Definition: Goal.h:196
size_t getCapacity() const
Returns this goal's capacity.
Definition: Goal.h:250
void setID(size_t id)
Sets the id of the goal.
Definition: Goal.h:257
void setWeight(float weight)
Sets the goal's weight.
Definition: Goal.h:229
size_t _capacity
The maximum capacity of this goal.
Definition: Goal.h:292
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
Sets up the proper compiler directives for platform and dll export/import.
GoalFatalException()
Default constructor.
Definition: Goal.h:95
A set of goals. Maps integer identifiers to instances of goals.
Definition: GoalSet.h:63
GoalException()
Default constructor.
Definition: Goal.h:75
GoalSet * _goalSet
The goal set to which this goal belongs.
Definition: Goal.h:302
The base, abstract class defining goals.
Definition: Goal.h:110
ReadersWriterLock _lock
The lock to maintain readers-writer access to the structure which control available goals...
Definition: Goal.h:316
The definition of a readers-writer lock.
Definition: ReadersWriterLock.h:62
GoalException(const std::string &s)
Constructor with message.
Definition: Goal.h:82
virtual void drawGLGeometry() const
Draws the goal geometry.
Definition: Goal.h:282
The base definition for exceptions in Menge.
Base class for all Menge elements.
The basic interface of extendible Menge Elements.
Definition: Element.h:67
const GoalSet * getGoalSet() const
Returns a const pointer to this agent's goal set.
Definition: Goal.h:222
GoalSet * getGoalSet()
Returns a pointer to this agent's goal set.
Definition: Goal.h:209
Base exception class for menge operations.
Definition: MengeException.h:58
static const size_t MAX_CAPACITY
The maximum capacity any goal can hold.
Definition: Goal.h:274
The definition of a readers-writer lock.
void setCapacity(size_t capacity)
Sets the goal's capacity.
Definition: Goal.h:243
Base class for fatal exceptions.
Definition: MengeException.h:99
The namespace contains the Behavior Finite State Machine (BFSM) definition.
float getWeight() const
Retrieves the goal's weight.
Definition: Goal.h:236
Collection of convenient pre-compiler information for fsm definitions.
GoalFatalException(const std::string &s)
Constructor with message.
Definition: Goal.h:102
Goal()
Basic constructor.
Definition: Goal.h:116
float _weight
The relative weight of this goal.
Definition: Goal.h:287
Exception thrown when the goal has an error which cannot be recovered from.
Definition: Goal.h:90
The definition of a preferred velocity.
Definition: PrefVelocity.h:68
Defines the basic agent properties and functionality that all simulation agents share.
Definition: BaseAgent.h:123
The namespace that contains the basic simulation mechanisms.
size_t getID() const
Gets the id of the goal.
Definition: Goal.h:264
size_t _population
The current "population" of this goal.
Definition: Goal.h:310
size_t _id
The id of this goal in its goal set.
Definition: Goal.h:297
Exception class for BFSM goals.
Definition: Goal.h:70
virtual ~Goal()
Destructor.
Definition: Goal.h:122