Autopysta
Loading...
Searching...
No Matches
point.h
Go to the documentation of this file.
1
11#ifndef _POINT
12#define _POINT
13
14#include<string>
15#include<sstream>
16
23class point{
24private:
25 double t;
26 double x;
27 double v;
28 double a;
29 int lane;
30
31public:
44 point (double _t, double _x, double _v, double _a, int _lane);
45
54
63 std::string to_str();
64
72 void set_accel(double _a);
73
81 void set_velocity(double _v);
82
90 void set_x(double _x);
91
99 void set_lane(int _lane);
100
107
115 double T();
116
124 double X();
125
133 double V();
134
142 double A();
143
151 int LANE();
152};
153
154#endif
Represents a point in time for a vehicle in a traffic simulation.
Definition point.h:23
void set_velocity(double _v)
Sets the velocity of the point.
std::string to_str()
Converts the point object to a string representation.
double V()
Gets the velocity value.
void reset_time()
Resets the time of the point to zero.
void set_accel(double _a)
Sets the acceleration of the point.
double T()
Gets the time value.
point(point *p)
Copy constructor for the point class.
point(double _t, double _x, double _v, double _a, int _lane)
Constructor for the point class.
int LANE()
Gets the lane value.
double X()
Gets the position value.
void set_x(double _x)
Sets the position of the point.
void set_lane(int _lane)
Sets the lane of the point.
double A()
Gets the acceleration value.