Recti 1.2.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
recti::VSegment< T > Struct Template Reference

Vertical Line Segment. More...

#include <recti.hpp>

Inheritance diagram for recti::VSegment< T >:
Inheritance graph
[legend]
Collaboration diagram for recti::VSegment< T >:
Collaboration graph
[legend]

Public Member Functions

constexpr VSegment (T xcoord, Interval< T > ycoord) noexcept
 Construct a new VSegment object.
 
constexpr VSegment (Point< T, Interval< T > > base) noexcept
 Construct a new VSegment object from the base object (implicitly)
 
- Public Member Functions inherited from recti::Point< T, Interval< T > >
constexpr Point ()
 Default constructor.
 
constexpr Point (T xcoord, Interval< T > ycoord) noexcept
 Construct a new Point object.
 
constexpr auto xcoord () const -> const T &
 Gets the x coordinate of this Point.
 
constexpr auto ycoord () const -> const Interval< T > &
 Gets the y coordinate of this Point.
 
constexpr auto operator== (const Point< U1, U2 > &rhs) const -> bool
 Compares this Point object with another Point object for equality.
 
constexpr auto operator< (const Point< U1, U2 > &rhs) const -> bool
 Compares this Point object with another Point object to check if it is less than.
 
constexpr auto operator!= (const Point< U1, U2 > &rhs) const -> bool
 Compares this Point object with another Point object for inequality.
 
CONSTEXPR14 auto operator+= (const Vector2< U1, U2 > &right_point) -> Self &
 Adds a vector (translation) to this Point.
 
CONSTEXPR14 auto operator-= (const Vector2< U1, U2 > &right_point) -> Self &
 Subtracts a vector (translation) from this Point.
 
constexpr auto operator- (const Self &other_point) const
 Calculates the displacement vector between this point and another point.
 
constexpr auto measure () const
 measure (area, volume etc.)
 
constexpr auto flip_xy () const -> Point< Interval< T >, T >
 flip_xy according to xcoord-ycoord diagonal line
 
constexpr auto flip_y () const -> Point< T, Interval< T > >
 flip according to ycoord-axis
 
constexpr auto overlaps (const Point< U1, U2 > &other_point) const -> bool
 
constexpr auto intersect_with (const Point< U1, U2 > &other_point) const
 
constexpr auto hull_with (const Point< U1, U2 > &other_point) const
 
constexpr auto contains (const Point< U1, U2 > &other_point) const -> bool
 
constexpr auto blocks (const Point< U1, U2 > &other_point) const -> bool
 
constexpr auto min_dist_with (const Point< U1, U2 > &other_point) const
 minimum distance between this point and another point
 
constexpr auto min_dist_change_with (Point< U1, U2 > &other_point)
 minimum distance between this point and another point
 
constexpr auto enlarge_with (const T &value) const
 Enlarge the point by value
 
constexpr auto nearest_to (const Point< U1, U2 > &other_point) const
 
constexpr auto rotates () const -> Point< T, Interval< T > >
 Rotate the point by 45 degrees (used for ManhattanArc).
 
constexpr auto inv_rotates () const -> Point< T, Interval< T > >
 Inverse rotate the point (used for ManhattanArc).
 
constexpr auto get_center () const
 Calculate the center of the point.
 
constexpr auto lower_corner () const
 Calculate the lower corner of the point.
 
constexpr auto upper_corner () const
 Calculate the upper corner of the point.
 

Additional Inherited Members

- Public Types inherited from recti::Point< T, Interval< T > >
using value_type = T
 
- Protected Member Functions inherited from recti::Point< T, Interval< T > >
CONSTEXPR14 auto get_xcoord () -> T &
 Returns a mutable reference to the x-coordinate of the point.
 
constexpr auto get_xcoord () const -> const T &
 Returns a const reference to the x-coordinate of the point.
 
CONSTEXPR14 auto get_ycoord () -> Interval< T > &
 Returns a mutable reference to the y-coordinate of the point.
 
constexpr auto get_ycoord () const -> const Interval< T > &
 Returns a const reference to the y-coordinate of the point.
 

Detailed Description

template<typename T>
struct recti::VSegment< T >

Vertical Line Segment.

The struct VSegment is defining a vertical line segment in a rectilinear coordinate system. It is inheriting from the Point<T, Interval<T>> class, which means that it will have all the member variables and member functions of Point<T, Interval<T>>. The Interval<T> template parameter is used to define the type of the y-coordinate of the line segment, and the T template parameter is used to define the type of the x-coordinate of the line segment.

Template Parameters
T

Constructor & Destructor Documentation

◆ VSegment() [1/2]

template<typename T >
constexpr recti::VSegment< T >::VSegment ( xcoord,
Interval< T >  ycoord 
)
inlineconstexprnoexcept

Construct a new VSegment object.

Parameters
[in]xcoord
[in]ycoord

◆ VSegment() [2/2]

template<typename T >
constexpr recti::VSegment< T >::VSegment ( Point< T, Interval< T > >  base)
inlineconstexprnoexcept

Construct a new VSegment object from the base object (implicitly)

Parameters
[in]base

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