O --- O
libPEDSIM Documentation
[HOME] [EXAMPLES] [ECOSYSTEM] [DOCUMENTATION] [DOWNLOAD]
O --- O
ped_obstacle.h
1 //
2 // pedsim - A microscopic pedestrian simulation system.
3 // Copyright (c) by Christian Gloor
4 //
5 
6 #ifndef _ped_obstacle_h_
7 #define _ped_obstacle_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 
29 namespace Ped {
30 
34  class LIBEXPORT Tobstacle {
35  public:
36  Tobstacle();
37  Tobstacle(double ax, double ay, double bx, double by);
38  Tobstacle(const Tvector& startIn, const Tvector& endIn);
39  virtual ~Tobstacle();
40 
41  int getid() const { return id; };
42  int gettype() const { return type; };
43  double getax() const { return ax; };
44  double getay() const { return ay; };
45  double getbx() const { return bx; };
46  double getby() const { return by; };
47  Tvector getStartPoint() const;
48  Tvector getEndPoint() const;
49 
50  virtual void setPosition(double ax, double ay, double bx, double by);
51  virtual void setPosition(const Tvector& startIn, const Tvector& endIn);
52  virtual void setStartPoint(const Tvector& startIn);
53  virtual void setEndPoint(const Tvector& endIn);
54  virtual void setType(int t) { type = t; };
55 
56  virtual Tvector closestPoint(double p1, double p2) const;
57  virtual Tvector closestPoint(const Tvector& pointIn) const;
58  virtual void rotate(double x, double y, double phi);
59 
60  protected:
61  int id;
62  double ax;
63  double ay;
64  double bx;
65  double by;
66  int type;
67  };
68 }
69 
70 #endif
double bx
Position of the obstacle.
Definition: ped_obstacle.h:64
double ay
Position of the obstacle.
Definition: ped_obstacle.h:63
double by
Position of the obstacle.
Definition: ped_obstacle.h:65
int id
Obstacle number.
Definition: ped_obstacle.h:61
double ax
Position of the obstacle.
Definition: ped_obstacle.h:62
O --- O

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