44 #ifndef __GOAL_AABB_H__
45 #define __GOAL_AABB_H__
71 virtual float squaredDistance(
const Vector2 & pt )
const;
103 virtual Vector2 getTargetPoint(
const Vector2 & q,
float r )
const;
108 virtual Vector2 getCentroid()
const;
116 inline void setMinimum(
float x,
float y ) { _minPt.set( x, y ); }
146 inline void setSize(
float w,
float h ) { _size.set( w, h ); }
159 virtual void drawGLGeometry()
const;
190 virtual const char *
name()
const {
return "AABB"; }
200 return "An agent goal consisting of an axis-aligned bounding box in two-dimensional space";
223 virtual bool setFromXML(
Goal * goal, TiXmlElement * node,
const std::string & behaveFldr )
const;
247 #endif // __GOAL_AABB_H__
size_t _maxYID
The identifier for the "max_y" float attribute.
Definition: GoalAABB.h:243
void setMaximum(float x, float y)
Set the AABB's maximum point.
Definition: GoalAABB.h:131
A class for parsing the xml description of a goal and instantiating particular instances.
Definition: GoalFactory.h:62
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.
virtual const char * name() const
The name of the goal type.
Definition: GoalAABB.h:190
void setSize(const Vector2 &size)
Set the AABB's size.
Definition: GoalAABB.h:153
Vector2 _minPt
The minimum point in the box region.
Definition: GoalAABB.h:164
Defines the goal classes for agent behaviors.
The base, abstract class defining goals.
Definition: Goal.h:110
Vector2 _size
The size of the box region beyond the minimum point.
Definition: GoalAABB.h:169
virtual const char * description() const
A description of the goal.
Definition: GoalAABB.h:199
size_t _minXID
The identifier for the "min_x" float attribute.
Definition: GoalAABB.h:228
Goal * instance() const
Create an instance of this class's goal.
Definition: GoalAABB.h:209
void setMaximum(const Vector2 &p)
Set the AABB's maximum point.
Definition: GoalAABB.h:138
void setSize(float w, float h)
Set the AABB's size.
Definition: GoalAABB.h:146
A axis-aligned bounding box goal region with uniform probability.
Definition: GoalAABB.h:58
The namespace contains the Behavior Finite State Machine (BFSM) definition.
Collection of convenient pre-compiler information for fsm definitions.
void setMinimum(const Vector2 &p)
Set the AABB's minimum point.
Definition: GoalAABB.h:123
The definition of a preferred velocity.
Definition: PrefVelocity.h:68
void setMinimum(float x, float y)
Set the AABB's minimum point.
Definition: GoalAABB.h:116
size_t _maxXID
The identifier for the "max_x" float attribute.
Definition: GoalAABB.h:238
Factory for the AABBGoal.
Definition: GoalAABB.h:175
size_t _minYID
The identifier for the "min_y" float attribute.
Definition: GoalAABB.h:233
The factory for parsing xml data and instantiating goals.