UAV Simulator
Loading...
Searching...
No Matches
waypoint_list.h
Go to the documentation of this file.
1
5#ifndef WAYPOINT_LIST_H
6#define WAYPOINT_LIST_H
7
8#include <vector>
9
10#include <easy3d/core/vec.h>
11#include <easy3d/viewer/viewer.h>
12
25{
26public:
28
33 WaypointList(const std::vector<easy3d::vec3>& waypoints);
39 const easy3d::vec3& currentWaypoint() const;
44 void advanceToNext();
49 bool missionComplete() const;
54 void draw(easy3d::Viewer& viewer) const;
55
56 const std::vector<easy3d::vec3>& getWaypoints() const
57 {
58 return waypoints_;
59 }
60
61
62private:
63 std::vector<easy3d::vec3> waypoints_;
65};
66
67#endif // WAYPOINT_LIST_H
Stores and manages a list of 3D waypoints for trajectory following or mission execution.
Definition waypoint_list.h:25
WaypointList()
Definition waypoint_list.cpp:9
std::vector< easy3d::vec3 > waypoints_
List of waypoints in 3D space.
Definition waypoint_list.h:63
const std::vector< easy3d::vec3 > & getWaypoints() const
Definition waypoint_list.h:56
bool missionComplete() const
Checks whether all waypoints have been processed.
Definition waypoint_list.cpp:37
void advanceToNext()
Advances the pointer to the next waypoint. If already at the last waypoint, it will stay there.
Definition waypoint_list.cpp:28
const easy3d::vec3 & currentWaypoint() const
Returns the currently active waypoint.
Definition waypoint_list.cpp:20
size_t current_index_
Index of the current active waypoint.
Definition waypoint_list.h:64
void draw(easy3d::Viewer &viewer) const
Renders the waypoints in the provided Easy3D viewer.
Definition waypoint_list.cpp:49
Vec< 3, float > vec3
Definition common.h:19