O --- O
libpedsim Documentation [HOME] [EXAMPLES] [DEMO APP] [DOCUMENTATION] [DOWNLOAD]
|
O --- O
|

Ped::Twaypoint Class Reference

#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:
pxThe x coordinate of the waypoint
pyThe y coordinate of the waypoint
prThe 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:
myxThe x coordinate of the current position of the agent
myyThe y coordinate of the current position of the agent
fromxThe x coordinate of the last assigned waypoint, i.e. where the agent is coming from
fromyThe y coordinate of the last assigned waypoint, i.e. where the agent is coming from
*reachedSet 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:
p1The x coordinate of the point outside the obstacle
p2The y coordinate of the point outside the obstacle
oc11The x coordinate of the first corner of the obstacle
oc12The y coordinate of the first corner of the obstacle
oc21The x coordinate of the second corner of the obstacle
oc22The 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:
O --- O




(c) 1995-2012 by Christian Gloor [contact]