#include <recti/recti.hpp>
template<typename T>
HSegment struct
Horizontal Line Segment.
Template parameters | |
---|---|
T |
The struct HSegment
is defining a horizontal line segment in a rectilinear coordinate system. It is inheriting from the Point<Interval<T>, T>
class, which means that it will have all the member variables and member functions of Point<Interval<T>, T>
. The Interval<T>
template parameter is used to define the type of the x-coordinate of the line segment, and the T
template parameter is used to define the type of the y-coordinate of the line segment.
Base classes
-
template<typename T1 = int, typename T2 = T1>class Point<Interval<T>, T>
- Point.
Constructors, destructors, conversion operators
- HSegment(Interval<T>&& xcoord, T&& ycoord) constexpr noexcept
- Construct a new HSegment object.
- HSegment(const Interval<T>& xcoord, const T& ycoord) constexpr
- Construct a new HSegment object.
- HSegment(Point<Interval<T>, T>&& base) constexpr noexcept
- Construct a new HSegment object from the base object (implicitly)
- HSegment(const Point<Interval<T>, T>& base) explicit constexpr
- Construct a new HSegment object from the base object (implicitly)
Function documentation
template<typename T>
recti:: HSegment<T>:: HSegment(Interval<T>&& xcoord,
T&& ycoord) constexpr noexcept
Construct a new HSegment object.
Parameters | |
---|---|
xcoord in | |
ycoord in |
This is a constructor for the HSegment
struct. It takes two parameters, xcoord
and ycoord
, which are both rvalue references. The noexcept
specifier indicates that this constructor will not throw any exceptions.