The invisible, but highly necessary, automaton which drives your *game entity/graphical representation's motion. Getters and Setters are provided, *however it will always be easier to just use the data - since it is all public.
More...
|
| Agent () |
| Default constructor.
|
|
| Agent (steer::Vector2 position, float radius, steer::Vector2 velocity, steer::Vector2 heading, steer::Vector2 side, float mass, float maxSpeed, float maxForce, float maxTurnRate) |
| Construct agent from values.
|
|
| Agent (steer::BehaviorParameters *params) |
| Construct agent from struct of parameters.
|
|
virtual | ~Agent () |
| Destructor.
|
|
steer::Vector2 | getPosition () const |
| Gets the position of the entity.
|
|
void | setPosition (steer::Vector2 newPosition) |
| Sets the position of the entity.
|
|
float | getBoundingRadius () const |
| Gets the bounding radius of the entity.
|
|
void | setBoundingRadius (float radius) |
| Sets the bounding radius of the entity.
|
|
bool | taggedInGroup () const |
| Gets the tagged status (tagged in a group) of the entity.
|
|
void | Tag () |
| Tags the entity for an action.
|
|
void | unTag () |
| Untags the entity.
|
|
steer::Vector2 | getScale () const |
| Returns the entity's scale.
|
|
void | setScale (steer::Vector2 val) |
| Sets the entity's scale from an steer::Vector2.
|
|
void | setScale (float val) |
| Sets the entity's scale from a float.
|
|
steer::Vector2 | getVelocity () const |
| Gets the velocity of the agent.
|
|
float | getMass () const |
| Gets the mass of the agent. Mass is set on construction of the agent only.
|
|
steer::Vector2 | getSide () const |
| Gets the side vector (vector perpendicular to the direction the agent is heading) of the agent.
Side is set on construction of the agent only.
|
|
void | setSide (const steer::Vector2 side) |
| Sets the side vector (vector perpendicular to the direction the agent is heading) of the agent.
Side is set on construction of the agent only.
|
|
float | getMaxSpeed () const |
| Gets the max speed of the agent.
|
|
void | setMaxSpeed (float newSpeed) |
| Sets the velocity of the agent.
|
|
float | getMaxForce () const |
| Gets the max force of the agent.
|
|
void | setMaxForce (float maxForce) |
| Sets the max force of the agent.
|
|
steer::Vector2 | getForce () const |
| Convenience method, gets the current steering force for the owner agent. Force is public data used for calculating steering force, therefore there is no setter.
|
|
bool | speedMaxedOut () const |
| Determines if the speed of the agent is maxed out or not.
|
|
float | getSpeed () const |
| Gets the speed of the agent.
|
|
float | getSpeedSquared () const |
| Gets the speed squared of the agent.
|
|
steer::Vector2 | getHeading () const |
| Gets the heading of the agent.
|
|
void | setHeading (steer::Vector2 newHeading) |
| Sets the heading of the agent.
|
|
bool | rotateHeadingToFacePosition (steer::Vector2 target) |
| Returns true when the heading is rotated to the target position, returns false otherwise.
|
|
float | getMaxTurnRate () const |
| Gets the max turn rate of the agent.
|
|
void | setMaxTurnRate (float maxTurnRate) |
| Sets the max turn rate of the agent.
|
|
float | getForwardComponent () |
| Calculates the component of the steering force that is parallel with the vehicle heading.
|
|
float | getSideComponent () |
| Calculates the component of the steering force that is perpendicular with the vehicle heading.
|
|
void | setTarget (const steer::Vector2 target) |
| Sets the current target for the owner agent.
|
|
steer::Vector2 | getTarget () const |
| Gets the current target for the owner agent.
|
|
void | setThreatRange (const float range) |
| Set the value of the range the object of interest must be in to trigger evasive action.
|
|
float | getThreatRange () const |
| Get the value of the range the object of interest must be in to trigger evasive action.
|
|
void | setDecelerationTweaker (const float deceleration) |
| Set the value for tweaking deceleration for the arrive component.
|
|
float | getDecelerationTweaker () const |
| Get the value for tweaking deceleration for the arrive component.
|
|
void | setWanderTarget (const steer::Vector2 target) |
| Set the wander target.
|
|
steer::Vector2 | getWanderTarget () const |
| Get the wander target.
|
|
void | setWanderJitter (const float jitter) |
| Set the wander jitter.
|
|
float | getWanderJitter () const |
| Get the wander jitter.
|
|
void | setWanderRadius (const float radius) |
| Set the radius that the agent will wander toward.
|
|
float | getWanderRadius () const |
| Get the radius the agent is wandering toward.
|
|
void | setWanderDistance (const float distance) |
| Set the distance the agent will wander.
|
|
float | getWanderDistance () const |
| Get the distance the agent will wander.
|
|
void | setDistanceBuffer (const float buffer) |
| Set the value for the buffer which dictates the minimum distance from a given area (for example, a hiding spot behind an obstacle).
|
|
float | getDistanceBuffer () const |
| Get the value for the distance buffer (minimum distance between self and a given area).
|
|
void | setOffset (const steer::Vector2 offset) |
| Sets the current steering offset for the owner agent - used for tweaking steering force.
|
|
steer::Vector2 | getOffset () const |
| Gets the current steering offset for the owner agent -.
|
|
void | createFeelers () |
| A method for creating the feelers used for obstacle and wall avoidance;.
|
|
float | boxLength () const |
| Returns the value of box length used for obstacle and wall avoidance;.
|
|
void | setBoxLength (const float length) |
| Returns the value of box length used for obstacle and wall avoidance;.
|
|
const std::vector
< steer::Vector2 > & | getFeelers () const |
| Returns a reference to the feelers used for obstacle and wall avoidance;.
|
|
virtual bool | on (steer::behaviorType behavior)=0 |
| This pure virtual function tests if a specific bit of m_iFlags is set using bitwise operations. Must be overridden in derived classes.
|
|
virtual void | setSummingMethod (Uint32 sumMethod) |
| A virtual method used for setting the summing method for steering forces.
|
|
virtual bool | accumulateForce (steer::Vector2 &startingForce, steer::Vector2 forceToAdd) |
| A virtual method used to accumulate forces from a combination of behaviors. Does nothing, override and implement in derived classes.
|
|
virtual steer::Vector2 | calculateWeightedSum () |
|
virtual steer::Vector2 | calculatePrioritized () |
|
virtual steer::Vector2 | Calculate ()=0 |
| A pure virtual method for calculating the steering vector.
|
|
float | getElapsedTime () |
| Get the time elapsed since the last frame.
|
|
float | setElapsedTime (float e) |
| Set the time elapsed since the last frame.
|
|
The invisible, but highly necessary, automaton which drives your *game entity/graphical representation's motion. Getters and Setters are provided, *however it will always be easier to just use the data - since it is all public.