Autopysta
Loading...
Searching...
No Matches
fixed_object Class Reference

Class representing a fixed object on the road. More...

#include <vehicle.h>

Inheritance diagram for fixed_object:
road_object

Public Member Functions

 fixed_object (point *pos)
 Constructor for the fixed_object class.
 
pointcurrent () override
 Get the current position of the fixed object.
 
void update (road_object *ro) override
 Update the state of the fixed object.
 
- Public Member Functions inherited from road_object
virtual ~road_object ()
 Virtual destructor for the road_object class.
 

Additional Inherited Members

- Public Attributes inherited from road_object
modelm = nullptr
 Pointer to the model associated with the object (optional).
 
generalized_trajectorytraj = nullptr
 Object's trajectory, which defines its movement and positions over time.
 
std::queue< point * > defined_t
 A queue of defined trajectory points provided by the user.
 

Detailed Description

Class representing a fixed object on the road.

The fixed_object class models a static object on the road, such as a roadblock or a parked vehicle. It remains stationary and has a fixed position in the simulation.

Constructor & Destructor Documentation

◆ fixed_object()

fixed_object::fixed_object ( point * pos)

Constructor for the fixed_object class.

Initializes the object with a fixed position on the road.

Parameters
posA pointer to the position of the object.

Member Function Documentation

◆ current()

point * fixed_object::current ( )
overridevirtual

Get the current position of the fixed object.

Since the object is fixed, this method always returns the same position.

Returns
A pointer to the object's current position.

Implements road_object.

◆ update()

void fixed_object::update ( road_object * ro)
overridevirtual

Update the state of the fixed object.

Since the object is fixed, this method does nothing. It is provided to satisfy the interface.

Parameters
roA pointer to another road object (unused in this context).

Implements road_object.


The documentation for this class was generated from the following file: