44 #ifndef __PREF_VELOCITY_H__
45 #define __PREF_VELOCITY_H__
47 #include "mengeCommon.h"
152 inline void setSpeed(
float speed ) { _speed = speed; }
191 inline bool hasArea()
const {
return _left * _right < 1.f; }
232 #endif // __PREF_VELOCITY_H__
Vector2 getLeft() const
Returns the left extent of the span.
Definition: PrefVelocity.h:115
void setSpeed(float speed)
Sets the speed.
Definition: PrefVelocity.h:152
void setTarget(const Vector2 &target)
Sets the target of the preferred velocity.
Definition: PrefVelocity.h:173
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
Vector2 _preferred
The preferred direction. All directions in the span may be topologically equivalent, but this direction is the "best". This value must lie within the span (i.e., det( right, preferred ) > 0 and det( preferred, left) > 0).
Definition: PrefVelocity.h:219
Vector2 getTarget() const
Gets the target of the preferred velocity.
Definition: PrefVelocity.h:166
void setSingle(const Vector2 &dir)
Sets the preferred velocity to be a single velocity.
Definition: PrefVelocity.h:159
Vector2 _right
The "right" extent of the preferred velocity span (i.e. det( right, left ) >= 0). This direction has ...
Definition: PrefVelocity.h:206
Vector2 getRight() const
Returns the right extent of the span.
Definition: PrefVelocity.h:122
Vector2 _left
The "left" extent of the preferred velocity span (i.e. det( right, left ) >= 0). This direction has u...
Definition: PrefVelocity.h:199
bool hasArea() const
Reports if the arc spans more than a single direction (by reporting whether the arc has area...
Definition: PrefVelocity.h:191
Vector2 getPreferredVel() const
Returns the preferred *velocity" of the span. This is the preferred direction at the velocity's speed...
Definition: PrefVelocity.h:138
Vector2 _target
The immediate goal point – this corresponds to the preferred direction.
Definition: PrefVelocity.h:225
The definition of a preferred velocity.
Definition: PrefVelocity.h:68
float getSpeed() const
Returns the speed of the preferred velocity.
Definition: PrefVelocity.h:145
Vector2 getPreferred() const
Returns the preferred direction of the span.
Definition: PrefVelocity.h:129
The namespace that contains the basic simulation mechanisms.
float _speed
The preferred speed (also the radius of the arc.
Definition: PrefVelocity.h:211