#include <ped_waypoint.h>
List of all members.
Public Member Functions |
| | Twaypoint () |
| | Twaypoint (double x, double y, double r) |
| virtual | ~Twaypoint () |
| virtual Tvector | getForce (double myx, double myy, double fromx, double fromy, bool *reached) |
| virtual Tvector | normalpoint (double p1, double p2, double oc11, double oc12, double oc21, double oc22) |
|
void | setType (int t) |
|
void | setx (double px) |
|
void | sety (double py) |
|
void | setr (double pr) |
|
void | settype (int t) |
|
int | getid () const |
|
int | gettype () const |
|
double | getx () const |
|
double | gety () const |
|
double | getr () const |
Detailed Description
The waypoint classs
- Author:
- chgloor
- Date:
- 2012-01-07
- Examples:
-
example.cpp.
Constructor & Destructor Documentation
| Ped::Twaypoint::Twaypoint |
( |
| ) |
|
Default Constructor - sets the most basic parameters.
- Date:
- 2012-01-07
| Ped::Twaypoint::Twaypoint |
( |
double |
px, |
|
|
double |
py, |
|
|
double |
pr |
|
) |
| |
Constructor: Sets some intial values. The agent has to pass within the give radius.
- Date:
- 2012-01-07
- Parameters:
-
| px | The x coordinate of the waypoint |
| py | The y coordinate of the waypoint |
| pr | The radius of the waypoint |
| Ped::Twaypoint::~Twaypoint |
( |
| ) |
[virtual] |
Default Destructor
- Author:
- chgloor
- Date:
- 2012-02-04
Member Function Documentation
| Ped::Tvector Ped::Twaypoint::getForce |
( |
double |
myx, |
|
|
double |
myy, |
|
|
double |
fromx, |
|
|
double |
fromy, |
|
|
bool * |
reached |
|
) |
| [virtual] |
Returns the force into the direction of the waypoint
- Date:
- 2012-01-10
- Parameters:
-
| myx | The x coordinate of the current position of the agent |
| myy | The y coordinate of the current position of the agent |
| fromx | The x coordinate of the last assigned waypoint, i.e. where the agent is coming from |
| fromy | The y coordinate of the last assigned waypoint, i.e. where the agent is coming from |
| *reached | Set to true if the agent has reached the waypoint in this call. |
- Returns:
- Tvector The calculated force
| Ped::Tvector Ped::Twaypoint::normalpoint |
( |
double |
p1, |
|
|
double |
p2, |
|
|
double |
oc11, |
|
|
double |
oc12, |
|
|
double |
oc21, |
|
|
double |
oc22 |
|
) |
| [virtual] |
Calculates the point that is on the given line and normal to the give position. If it is not inside the line, the start or end point of the line is returned.
- Date:
- 2012-01-10
- Parameters:
-
| p1 | The x coordinate of the point outside the obstacle |
| p2 | The y coordinate of the point outside the obstacle |
| oc11 | The x coordinate of the first corner of the obstacle |
| oc12 | The y coordinate of the first corner of the obstacle |
| oc21 | The x coordinate of the second corner of the obstacle |
| oc22 | The y coordinate of the second corner of the obstacle |
- Returns:
- Tvector The calculated point
The documentation for this class was generated from the following files: