|
bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
|
class GenericLine. Represents a generic line with vertex VertexType The equation of a linein l=Ax + By + C More...
#include <generic_line.h>

Public Types | |
| typedef GeomPoint< dim > | vertex_type |
Public Member Functions | |
| GenericLine () | |
| Constructor. | |
| GenericLine (const vertex_type &p1, const vertex_type &p2) | |
| Constructor. | |
| GenericLine (const vertex_type &p1, const vertex_type &p2, uint_t id) | |
| Constructor. | |
| const vertex_type & | get_vertex (uint_t v) const |
| Returns the v-th vertex of the segment. | |
| vertex_type & | get_vertex (uint_t v) |
| Returns the v-th vertex of the segment. | |
| bool | has_valid_id () const noexcept |
| Returns true iff id_ != rlenvscpp::consts::INVALID_ID. | |
| uint_t | get_id () const noexcept |
| Returns the id of the line. | |
| void | set_id (uint_t id) noexcept |
| Set the id of the line. | |
| real_t | slope () const |
| The slope of the line. | |
| real_t | factor () const |
| Returns the constant factor. | |
| real_t | distance (const vertex_type &n) const |
| Returns the perpendicular distance from the line to the node. | |
| real_t | length () const |
| Calculate the length of the line. | |
| real_t | distance (const GenericLine< 2 >::vertex_type &n) const |
Static Public Attributes | |
| static const int | dimension = dim |
class GenericLine. Represents a generic line with vertex VertexType The equation of a linein l=Ax + By + C
| bitrl::utils::geom::GenericLine< dim >::GenericLine | ( | ) |
Constructor.
| bitrl::utils::geom::GenericLine< dim >::GenericLine | ( | const vertex_type & | p1, |
| const vertex_type & | p2 | ||
| ) |
Constructor.
| bitrl::utils::geom::GenericLine< dim >::GenericLine | ( | const vertex_type & | p1, |
| const vertex_type & | p2, | ||
| uint_t | id | ||
| ) |
Constructor.
| real_t bitrl::utils::geom::GenericLine< 2 >::distance | ( | const GenericLine< 2 >::vertex_type & | n | ) | const |
| real_t bitrl::utils::geom::GenericLine< dim >::distance | ( | const vertex_type & | n | ) | const |
Returns the perpendicular distance from the line to the node.
| real_t bitrl::utils::geom::GenericLine< dim >::factor | ( | ) | const |
Returns the constant factor.
|
inlinenoexcept |
Returns the id of the line.
| GenericLine< dim >::vertex_type & bitrl::utils::geom::GenericLine< dim >::get_vertex | ( | uint_t | v | ) |
Returns the v-th vertex of the segment.
| const GenericLine< dim >::vertex_type & bitrl::utils::geom::GenericLine< dim >::get_vertex | ( | uint_t | v | ) | const |
Returns the v-th vertex of the segment.
|
inlinenoexcept |
Returns true iff id_ != rlenvscpp::consts::INVALID_ID.
|
inline |
Calculate the length of the line.
|
inlinenoexcept |
Set the id of the line.
| real_t bitrl::utils::geom::GenericLine< dim >::slope | ( | ) | const |
The slope of the line.