1#ifndef BITSIM_TRAJECTORY_LINE_SEGMENT_LINK_H
2#define BITSIM_TRAJECTORY_LINE_SEGMENT_LINK_H
17template <
int dim,
typename NodeData,
typename SegmentData>
79 std::vector<w_point_type> internal_points_;
88template <
int dim,
typename NodeData,
typename SegmentData>
92 internal_points_(), data_(), is_active_(false)
96template <
int dim,
typename NodeData,
typename SegmentData>
101 :
bitsim::
geometry::GenericLine<dim>(v1, v2, id), internal_points_(), data_(data),
106template <
int dim,
typename NodeData,
typename SegmentData>
110 : LineSegmentLink<dim, NodeData, SegmentData>(
111 v1, v2, id, typename LineSegmentLink<dim, NodeData, SegmentData>::segment_data_type())
class GenericLine. Represents a generic line with vertex VertexType The equation of a linein l=Ax + B...
Definition generic_line.h:24
bool has_valid_id() const noexcept
Returns true iff id_ != rlenvscpp::consts::INVALID_ID.
Definition generic_line.h:58
GenericLine()
Constructor.
Definition generic_line.h:103
uint_t get_id() const noexcept
Returns the id of the line.
Definition generic_line.h:63
real_t segment_distance(const vertex_type &n) const
The distance of the point from the segment between the two vertices.
void set_id(uint_t id) noexcept
Set the id of the line.
Definition generic_line.h:68
const vertex_type & get_vertex(uint_t v) const
Returns the v-th vertex of the segment.
Definition generic_line.h:120
real_t length() const
Calculate the length of the line.
Definition generic_line.h:94
A class that describes a point with spacedim spatial dimension space.
Definition geom_point.h:22
const segment_data_type & get_data() const noexcept
The data of the segment.
Definition line_segment_link.h:59
WayPoint< dim, NodeData > w_point_type
Definition line_segment_link.h:24
real_t distance(const bitsim::geometry::GeomPoint< dim > &p) const
The distance of the point from the segment, for WaypointTrajectory::distance.
Definition line_segment_link.h:51
LineSegmentLink(const w_point_type &v1, const w_point_type &v2, uint_t id)
Constructor.
static const int dimension
Definition line_segment_link.h:21
NodeData node_data_type
Definition line_segment_link.h:22
LineSegmentLink()
Default ctor.
Definition line_segment_link.h:89
bool is_active() const
Returns true if the segment is active.
Definition line_segment_link.h:64
SegmentData segment_data_type
Definition line_segment_link.h:23
LineSegmentLink(const w_point_type &v1, const w_point_type &v2, uint_t id, const segment_data_type &data)
Constructor.
void make_active()
Activate the segment.
Definition line_segment_link.h:74
void deactivate()
deactive the segment
Definition line_segment_link.h:69
Helper class to represent a waypoint.
Definition waypoint.h:18
Definition bitsim_consts.cpp:10
Definition generic_line.h:16
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
double real_t
real_t
Definition bitsim_types.h:20