O --- O
libPEDSIM Documentation
[HOME] [EXAMPLES] [ECOSYSTEM] [DOCUMENTATION] [DOWNLOAD]
O --- O
ped_waypoint.h
1 //
2 // pedsim - A microscopic pedestrian simulation system.
3 // Copyright (c) by Christian Gloor
4 //
5 
6 #ifndef _ped_waypoint_h_
7 #define _ped_waypoint_h_ 1
8 
9 //disable warnings on 255 char debug symbols
10 #pragma warning (disable : 4786)
11 //disable warnings on extern before template instantiation
12 #pragma warning (disable : 4231)
13 
14 #ifdef _WIN32
15 #ifdef _DLL
16 # define LIBEXPORT __declspec(dllexport)
17 # define EXPIMP_TEMPLATE
18 #else
19 # define LIBEXPORT __declspec(dllimport)
20 # define EXPIMP_TEMPLATE extern
21 #endif
22 #else
23 # define LIBEXPORT
24 # define EXPIMP_TEMPLATE
25 #endif
26 
27 #include "ped_vector.h"
28 #include <cstddef>
29 
30 using namespace std;
31 
32 namespace Ped {
33 
37  class LIBEXPORT Twaypoint {
38  public:
39  enum WaypointType {
40  TYPE_NORMAL = 0,
41  TYPE_POINT = 1
42  };
43 
44  public:
45  Twaypoint();
46  Twaypoint(double x, double y, double r);
47  virtual ~Twaypoint();
48 
49  virtual Tvector getForce(double myx, double myy, double fromx, double fromy, bool *reached = NULL) const;
50  virtual Tvector normalpoint(const Tvector& p, const Tvector& obstacleStart, const Tvector& obstacleEnd) const;
51  virtual Tvector normalpoint(double p1, double p2, double oc11, double oc12, double oc21, double oc22) const;
52 
53  void setx(double px) { x = px; };
54  void sety(double py) { y = py; };
55  void setr(double pr) { r = pr; };
56  void settype(WaypointType t) { type = t; };
57 
58  int getid() const { return id; };
59  int gettype() const { return type; };
60  double getx() const { return x; };
61  double gety() const { return y; };
62  double getr() const { return r; };
63 
64  protected:
65  int id;
66  double x;
67  double y;
68  double r;
69  WaypointType type;
70  };
71 }
72 
73 #endif
double x
position of the waypoint
Definition: ped_waypoint.h:66
WaypointType type
type of the waypoint
Definition: ped_waypoint.h:69
double y
position of the waypoint
Definition: ped_waypoint.h:67
double r
position of the waypoint
Definition: ped_waypoint.h:68
O --- O

⁠(c) Christian Gloor [ c|h|g|l|o|o|r|@|s|i|l|m|a|r|i|l|.|o|r|g| ]