#include <ped_waypoint.h>

enum  WaypointType { TYPE_NORMAL = 0,
TYPE_POINT = 1
} 


 Twaypoint () 

 Twaypoint (double x, double y, double r) 

virtual  ~Twaypoint () 

virtual Tvector  getForce (double myx, double myy, double fromx, double fromy, bool *reached=NULL) const 

virtual Tvector  normalpoint (const Tvector &p, const Tvector &obstacleStart, const Tvector &obstacleEnd) const 

virtual Tvector  normalpoint (double p1, double p2, double oc11, double oc12, double oc21, double oc22) const 

void  setx (double px) 

void  sety (double py) 

void  setr (double pr) 

void  settype (WaypointType t) 

int  getid () const 

int  gettype () const 

double  getx () const 

double  gety () const 

double  getr () const 


int  id 
 waypoint number


double  x 
 position of the waypoint


double  y 
 position of the waypoint


double  r 
 position of the waypoint


WaypointType  type 
 type of the waypoint


Ped::Twaypoint::Twaypoint 
( 
 ) 

Constructor  sets the most basic parameters.
 Date
 20120107
Definition at line 25 of file ped_waypoint.cpp.
Ped::Twaypoint::Twaypoint 
( 
double 
px, 


double 
py, 


double 
pr 

) 
 
Constructor: Sets some intial values. The agent has to pass within the given radius.
 Date
 20120107
 Parameters

px  The x coordinate of the waypoint 
py  The y coordinate of the waypoint 
pr  The radius of the waypoint 
Definition at line 16 of file ped_waypoint.cpp.
Ped::Twaypoint::~Twaypoint 
( 
 ) 


virtual 
Default Destructor
 Author
 chgloor
 Date
 20120204
Definition at line 34 of file ped_waypoint.cpp.
Ped::Tvector Ped::Twaypoint::getForce 
( 
double 
agentX, 


double 
agentY, 


double 
fromx, 


double 
fromy, 


bool * 
reached = NULL 

) 
 const 

virtual 
Returns the force into the direction of the waypoint
 Date
 20120110
 Parameters

agentX  The x coordinate of the current position of the agent 
agentY  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
Definition at line 81 of file ped_waypoint.cpp.
Calculates the point that is on the given line and normal to the given position. If it is not inside the line, the start or end point of the line is returned.
 Date
 20120110
 Parameters

p  The point outside the obstacle 
normalLineStart  The first corner of the normal line 
normalLineEnd  The second corner of the normal line 
 Returns
 Tvector The calculated point
Definition at line 44 of file ped_waypoint.cpp.
Ped::Tvector Ped::Twaypoint::normalpoint 
( 
double 
p1, 


double 
p2, 


double 
oc11, 


double 
oc12, 


double 
oc21, 


double 
oc22 

) 
 const 

virtual 
Calculates the point that is on the given line and normal to the given position. If it is not inside the line, the start or end point of the line is returned.
 Date
 20120110
 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
Definition at line 68 of file ped_waypoint.cpp.
The documentation for this class was generated from the following files: