Class providing the necessary structure for path following behavior.
More...
#include <Path.hpp>
|
| Path () |
| Default constructor.
|
|
| Path (int NumWaypoints, std::list< steer::Vector2 > &waypoints) |
| Constructor used for creating a path from a list of waypoints.
|
|
| Path (int NumWaypoints, float MinX, float MinY, float MaxX, float MaxY, bool looped) |
| Constructor for creating a path with initial random waypoints. MinX/Y & MaxX/Y define the bounding box of the path.
|
|
| ~Path () |
| Destructor.
|
|
steer::Vector2 | currentWaypoint () const |
| Returns the current waypoint.
|
|
bool | finished () |
| Returns true if the end of the list has been reached.
|
|
void | setNextWaypoint () |
| Moves the iterator on to the next waypoint in the list.
|
|
std::list< steer::Vector2 > | createRandomPath (int NumWaypoints, float MinX, float MinY, float MaxX, float MaxY) |
| Creates a random path which is bound by rectangle described by the min/max values.
|
|
void | loopOn () |
| Turn on the loop option for the path so the path meets the first waypoint.
|
|
void | loopOff () |
| Turn off the loop option for the path so the path ends on the last waypoint.
|
|
void | set (std::list< steer::Vector2 > newPath) |
| Method for setting the path with list of vectors.
|
|
void | set (const Path &path) |
| Method for setting the path with a previously defined Path.
|
|
void | clear () |
| Clears all waypoints in the path std::vector.
|
|
std::list< steer::Vector2 > | getPath () const |
| Returns the std::vector of waypoints in the path.
|
|
Class providing the necessary structure for path following behavior.
steer::Path::Path |
( |
int |
NumWaypoints, |
|
|
std::list< steer::Vector2 > & |
waypoints |
|
) |
| |
Constructor used for creating a path from a list of waypoints.
- Parameters
-
NumWaypoints | - a plain old int. |
waypoints | - a std::list of steer::Vector2. |
steer::Path::Path |
( |
int |
NumWaypoints, |
|
|
float |
MinX, |
|
|
float |
MinY, |
|
|
float |
MaxX, |
|
|
float |
MaxY, |
|
|
bool |
looped |
|
) |
| |
Constructor for creating a path with initial random waypoints. MinX/Y & MaxX/Y define the bounding box of the path.
- Parameters
-
NumWaypoints | - a plain old int. |
MinX | - a plain old float. |
MinY | - a plain old float. |
MaxX | - a plain old float. |
MaxY | - a plain old float. |
looped | - a plain old bool. |
std::list< Vector2 > steer::Path::createRandomPath |
( |
int |
NumWaypoints, |
|
|
float |
MinX, |
|
|
float |
MinY, |
|
|
float |
MaxX, |
|
|
float |
MaxY |
|
) |
| |
Creates a random path which is bound by rectangle described by the min/max values.
- Parameters
-
NumWaypoints | - a plain old int. |
MinX | - a plain old float. |
MinY | - a plain old float. |
MaxX | - a plain old float. |
MaxY | - a plain old float. |
Method for setting the path with list of vectors.
- Parameters
-
steer::Path::set |
( |
const Path & |
path | ) |
|
|
inline |
Method for setting the path with a previously defined Path.
- Parameters
-
The documentation for this class was generated from the following files:
- include/steeriously/Path.hpp
- src/steeriously/Path.cpp