105 : id_(id), start_(
p1), end_(
p2)
128 throw std::logic_error(
"Invalid vertex index. Index not in [0,1]");
143 throw std::logic_error(
"Invalid vertex index. Index not in [0,1]");
148 return (end_[1] - start_[1]) / (end_[0] - start_[0]);
154 return start_[1] -
slope_ * start_[0];
167 return std::fabs(
A *
n[0] + B *
n[1] +
C) /
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
real_t slope() const
The slope of the line.
Definition generic_line.h:146
void set_id(uint_t id) noexcept
Set the id of the line.
Definition generic_line.h:69
real_t factor() const
Returns the constant factor.
Definition generic_line.h:151
bool has_valid_id() const noexcept
Returns true iff id_ != rlenvscpp::consts::INVALID_ID.
Definition generic_line.h:59
GeomPoint< dim > vertex_type
Definition generic_line.h:29
real_t length() const
Calculate the length of the line.
Definition generic_line.h:90
static const int dimension
Definition generic_line.h:27
real_t distance(const vertex_type &n) const
Returns the perpendicular distance from the line to the node.
GenericLine()
Constructor.
Definition generic_line.h:99
A class that describes a point with spacedim spatial dimension space.
Definition geom_point.h:22
T distance(const GeomPoint &) const
Get the distance from the given point.
Definition geom_point.h:321
const uint_t INVALID_ID
Invalid id.
Definition bitrl_consts.h:21
T sqr(const T &v)
Definition math_utils.h:61
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
double real_t
real_t
Definition bitrl_types.h:23
std::size_t uint_t
uint_t
Definition bitrl_types.h:43