bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
line_segment_link.h
Go to the documentation of this file.
4
5namespace bitrl
6{
7namespace utils
8{
9namespace trajectory
10{
11
16template <int dim, typename NodeData, typename SegmentData>
18{
19 public:
20 static const int dimension = dim;
24
30
35
40 const segment_data_type &data);
41
46
50 bool is_active() const { return is_active_; }
51
55 void deactivate() { is_active_ = false; }
56
60 void make_active() { is_active_ = true; }
61
62 private:
65 std::vector<w_point_type> internal_points_;
66
69
71 bool is_active_;
72};
73
74template <int dim, typename NodeData, typename SegmentData>
76 : bitrl::utils::geom::GenericLine<dim>(w_point_type(), w_point_type(),
77 bitrl::consts::INVALID_ID),
78 internal_points_(), data_(), is_active_(false)
79{
80}
81
82template <int dim, typename NodeData, typename SegmentData>
87 : bitrl::utils::geom::GenericLine<dim>(v1, v2, id), internal_points_(), data_(data),
88 is_active_(true)
89{
90}
91
92template <int dim, typename NodeData, typename SegmentData>
96 : LineSegmentLink<dim, NodeData, SegmentData>(
97 v1, v2, id, typename LineSegmentLink<dim, NodeData, SegmentData>::segment_data_type())
98{
99}
100
101} // namespace trajectory
102} // namespace utils
103} // namespace bitrl
class GenericLine. Represents a generic line with vertex VertexType The equation of a linein l=Ax + B...
Definition generic_line.h:25
uint_t get_id() const noexcept
Returns the id of the line.
Definition generic_line.h:64
const vertex_type & get_vertex(uint_t v) const
Returns the v-th vertex of the segment.
Definition generic_line.h:116
void set_id(uint_t id) noexcept
Set the id of the line.
Definition generic_line.h:69
bool has_valid_id() const noexcept
Returns true iff id_ != rlenvscpp::consts::INVALID_ID.
Definition generic_line.h:59
real_t length() const
Calculate the length of the line.
Definition generic_line.h:90
Helper class to represent a waypoint.
Definition waypoint.h:20
OutT resolve(const std::string &name, const std::map< std::string, std::any > &input)
Definition std_map_utils.h:25
Definition bitrl_consts.h:14
std::size_t uint_t
uint_t
Definition bitrl_types.h:43