44 #ifndef __GOAL_OBB_H__
45 #define __GOAL_OBB_H__
76 virtual float squaredDistance(
const Vector2 & pt )
const;
108 virtual Vector2 getTargetPoint(
const Vector2 & q,
float r )
const;
113 virtual Vector2 getCentroid()
const;
121 inline void setPivot(
float x,
float y ) { _pivot.set( x, y ); }
136 inline void setSize(
float w,
float h ) { _size.set( w, h ); }
150 void setRotation(
float angle );
156 virtual void drawGLGeometry()
const;
201 virtual const char *
name()
const {
return "OBB"; }
211 return "An agent goal consisting of an oriented bounding box in two-dimensional space";
234 virtual bool setFromXML(
Goal * goal, TiXmlElement * node,
const std::string & behaveFldr )
const;
264 #endif // __GOAL_OBB_H__
virtual const char * description() const
A description of the goal.
Definition: GoalOBB.h:210
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.
void setSize(float w, float h)
Set the AABB's size.
Definition: GoalOBB.h:136
Vector2 _rot0
The first column of the rotation matrix A point, p, can be rotated to the box's orientation as: Vecto...
Definition: GoalOBB.h:173
Defines the goal classes for agent behaviors.
The base, abstract class defining goals.
Definition: Goal.h:110
Vector2 _rot1
The second column of the rotation matrix A point, p, can be rotated to the box's orientation as: Vect...
Definition: GoalOBB.h:180
virtual const char * name() const
The name of the goal type.
Definition: GoalOBB.h:201
size_t _yID
The identifier for the "y" float attribute.
Definition: GoalOBB.h:244
size_t _wID
The identifier for the "width" float attribute.
Definition: GoalOBB.h:249
Factory for the OBBGoal.
Definition: GoalOBB.h:186
Vector2 _size
The size of the box region beyond the minimum point.
Definition: GoalOBB.h:166
size_t _hID
The identifier for the "height" float attribute.
Definition: GoalOBB.h:254
void setPivot(const Vector2 &p)
Set the OBB's pivot point.
Definition: GoalOBB.h:128
The namespace contains the Behavior Finite State Machine (BFSM) definition.
Collection of convenient pre-compiler information for fsm definitions.
An oriented bounding box goal region with uniform probability.
Definition: GoalOBB.h:63
void setSize(const Vector2 &size)
Set the AABB's size.
Definition: GoalOBB.h:143
The definition of a preferred velocity.
Definition: PrefVelocity.h:68
void setPivot(float x, float y)
Set the OBB's pivot point.
Definition: GoalOBB.h:121
Goal * instance() const
Create an instance of this class's goal.
Definition: GoalOBB.h:220
size_t _aID
The identifier for the "angle" float attribute.
Definition: GoalOBB.h:259
size_t _xID
The identifier for the "x" float attribute.
Definition: GoalOBB.h:239
Vector2 _pivot
The minimum point in the box region.
Definition: GoalOBB.h:161
The factory for parsing xml data and instantiating goals.