bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData > Class Template Reference

class LineSegmentLink. Represents a straight line link between two waypoints. More...

#include <line_segment_link.h>

Inheritance diagram for bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >:
Collaboration diagram for bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >:

Public Types

using node_data_type = NodeData
using segment_data_type = SegmentData
using w_point_type = WayPoint<dim, NodeData>

Public Member Functions

 LineSegmentLink ()
 Default ctor.
 LineSegmentLink (const w_point_type &v1, const w_point_type &v2, uint_t id, const segment_data_type &data)
 Constructor.
 LineSegmentLink (const w_point_type &v1, const w_point_type &v2, uint_t id)
 Constructor.
real_t distance (const bitsim::geometry::GeomPoint< dim > &p) const
 The distance of the point from the segment, for WaypointTrajectory::distance.
const segment_data_type & get_data () const noexcept
 The data of the segment.
bool is_active () const
 Returns true if the segment is active.
void deactivate ()
 deactive the segment
void make_active ()
 Activate the segment.

Static Public Attributes

static const int dimension = dim

Detailed Description

template<int dim, typename NodeData, typename SegmentData>
class bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >

class LineSegmentLink. Represents a straight line link between two waypoints.

Member Typedef Documentation

◆ node_data_type

template<int dim, typename NodeData, typename SegmentData>
using bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::node_data_type = NodeData

◆ segment_data_type

template<int dim, typename NodeData, typename SegmentData>
using bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::segment_data_type = SegmentData

◆ w_point_type

template<int dim, typename NodeData, typename SegmentData>
using bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::w_point_type = WayPoint<dim, NodeData>

Constructor & Destructor Documentation

◆ LineSegmentLink() [1/3]

template<int dim, typename NodeData, typename SegmentData>
bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::LineSegmentLink ( )

Default ctor.

◆ LineSegmentLink() [2/3]

template<int dim, typename NodeData, typename SegmentData>
bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::LineSegmentLink ( const w_point_type & v1,
const w_point_type & v2,
uint_t id,
const segment_data_type & data )

Constructor.

◆ LineSegmentLink() [3/3]

template<int dim, typename NodeData, typename SegmentData>
bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::LineSegmentLink ( const w_point_type & v1,
const w_point_type & v2,
uint_t id )

Constructor.

Member Function Documentation

◆ deactivate()

template<int dim, typename NodeData, typename SegmentData>
void bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::deactivate ( )
inline

deactive the segment

◆ distance()

template<int dim, typename NodeData, typename SegmentData>
real_t bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::distance ( const bitsim::geometry::GeomPoint< dim > & p) const
inline

The distance of the point from the segment, for WaypointTrajectory::distance.

◆ get_data()

template<int dim, typename NodeData, typename SegmentData>
const segment_data_type & bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::get_data ( ) const
inlinenoexcept

The data of the segment.

◆ is_active()

template<int dim, typename NodeData, typename SegmentData>
bool bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::is_active ( ) const
inline

Returns true if the segment is active.

◆ make_active()

template<int dim, typename NodeData, typename SegmentData>
void bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::make_active ( )
inline

Activate the segment.

Member Data Documentation

◆ dimension

template<int dim, typename NodeData, typename SegmentData>
const int bitsim::trajectory::LineSegmentLink< dim, NodeData, SegmentData >::dimension = dim
static

The documentation for this class was generated from the following file: