bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
waypoint.h
Go to the documentation of this file.
1#ifndef BITSIM_TRAJECTORY_WAYPOINT_H
2#define BITSIM_TRAJECTORY_WAYPOINT_H
3
7namespace bitsim
8{
9namespace trajectory
10{
11
12using bitsim::geometry::GeomPoint;
13
17template <int dim, typename Data> class WayPoint : public GeomPoint<dim>
18{
19 public:
20 using data_type = Data;
21
26
30 WayPoint(const GeomPoint<dim> &p, uint_t id, const data_type &data_ = data_type());
31
35 uint_t get_id() const { return id_; }
36
40 data_type &get_data() { return data_; }
41
45 const data_type &get_data() const { return data_; }
46
50 bool is_active() const { return is_active_point_; }
51
52 private:
53 uint_t id_;
54 data_type data_;
55 bool is_active_point_;
56};
57
58template <int dim, typename Data>
60 const typename WayPoint<dim, Data>::data_type &data)
61 : GeomPoint<dim>(p), id_(id), data_(data), is_active_point_(true)
62{
63}
64
65template <int dim, typename Data>
69} // namespace trajectory
70} // namespace bitsim
71
72#endif // BITSIM_TRAJECTORY_WAYPOINT_H
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
GeomPoint(T val=T())
ctor all dim data are assigned the given value
Definition geom_point.h:153
A class that describes a point with spacedim spatial dimension space.
Definition geom_point.h:22
WayPoint(const GeomPoint< dim > &p, uint_t id, const data_type &data_=data_type())
data_type & get_data()
Writable reference to the data.
Definition waypoint.h:40
NodeData data_type
Definition waypoint.h:20
WayPoint()
Definition waypoint.h:66
uint_t get_id() const
Return the id of the point.
Definition waypoint.h:35
bool is_active() const
Returns true if the waypoint is active.
Definition waypoint.h:50
const data_type & get_data() const
Read reference to the data.
Definition waypoint.h:45
Definition bitsim_consts.cpp:10
Definition line_segment_link.h:11
Definition dc_motor_backend_base.h:9
std::size_t uint_t
uint_t
Definition bitsim_types.h:40