UAV Simulator
Loading...
Searching...
No Matches
path.h
Go to the documentation of this file.
1
5#ifndef PATH_H
6#define PATH_H
7
8#include <vector>
9#include "path_segment.h"
10#include "line_segment.h"
11#include <easy3d/core/vec.h>
12#include <easy3d/viewer/viewer.h>
13
21class Path
22{
23public:
30 void addStraightSegment(const easy3d::vec3& start, const easy3d::vec3& end);
31
38 std::vector<easy3d::vec3> generateWaypoints(float spacing) const;
39
48 void draw(easy3d::Viewer& viewer) const;
49
50private:
52 std::vector<std::unique_ptr<LineSegment>> segments;
53
54};
55
56#endif // PATH_H
Represents a sequence of connected path segments (e.g., straight lines, arcs).
Definition path.h:22
void draw(easy3d::Viewer &viewer) const
Renders the full path in the viewer.
Definition path.cpp:53
std::vector< easy3d::vec3 > generateWaypoints(float spacing) const
Generates a list of evenly spaced waypoints along the entire path.
Definition path.cpp:32
std::vector< std::unique_ptr< LineSegment > > segments
The sequence of segments (e.g., lines, arcs) that make up the full path.
Definition path.h:52
void addStraightSegment(const easy3d::vec3 &start, const easy3d::vec3 &end)
Adds a straight line segment to the path.
Definition path.cpp:19
Defines the LineSegment class for a straight path segment.
Vec< 3, float > vec3
Definition common.h:19
Abstract base class for different types of path segments.