69 point* extrapolate(
double idx)
const;
Base class for different types of trajectories.
Definition trajectory.h:26
virtual point * operator[](int idx) const =0
Get a point by integer index.
virtual point * current()=0
Get the current point of the trajectory.
virtual point * operator[](double idx) const =0
Get a point by interpolating a floating-point index.
Represents a point in time for a vehicle in a traffic simulation.
Definition point.h:23
Represents a static trajectory for a fixed object on the road.
Definition trajectory.h:138
point * operator[](double idx) const override
Retrieves the point by floating-point index (always returns the static position).
point * current() override
Returns the current position of the static object.
static_trajectory(point *pos)
Constructs a static trajectory with a fixed position.
point * operator[](int idx) const override
Retrieves the point by integer index (always returns the static position).
Represents a dynamic trajectory of a moving object.
Definition trajectory.h:59
point * add(point *newPoint)
Adds a point and returns it.
point * current() override
Gets the current position of the vehicle in the trajectory.
point * operator[](double idx) const override
Retrieves a point by floating-point index using interpolation.
point * operator[](int idx) const override
Retrieves a point by integer index.
point * get(int i)
Retrieves a point at the specified index.
int length()
Returns the length of the trajectory.
void push_back(point *p)
Adds a point to the trajectory.
trajectory(point *_point)
Constructs a trajectory with an initial starting point.
File for the clock class definition (short description).
File for the point class definition.