|
| constexpr | Rectangle (Interval< T > xcoord, Interval< T > ycoord) noexcept |
| | Construct a new Rectangle object.
|
| |
| constexpr | Rectangle (Point< Interval< T > > base) noexcept |
| | Construct a new Rectangle object from the base object (implicitly)
|
| |
| constexpr auto | ll () const -> Point< T > |
| | lower left corner
|
| |
| constexpr auto | ur () const -> Point< T > |
| | upper right corner
|
| |
| constexpr auto | area () const -> T |
| | area
|
| |
| constexpr | Point () |
| | Default constructor.
|
| |
| constexpr | Point (Interval< T > xcoord, Interval< T > ycoord) noexcept |
| | Construct a new Point object.
|
| |
| constexpr auto | xcoord () const -> const Interval< 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 >, Interval< T > > |
| | flip_xy according to xcoord-ycoord diagonal line
|
| |
| constexpr auto | flip_y () const -> Point< Interval< 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< Interval< T >, Interval< T > > |
| | Rotate the point by 45 degrees (used for ManhattanArc).
|
| |
| constexpr auto | inv_rotates () const -> Point< Interval< 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.
|
| |
template<typename T>
struct recti::Rectangle< T >
Rectangle (Rectilinear)
The struct Rectangle is inheriting from the Point<Interval<T>> class. This means that Rectangle will have all the member variables and member functions of Point<Interval<T>>. It is using the Interval<T> template parameter to define the type of the x and y coordinates of the rectangle.
+-----------------------+
| Recti |
+-----------------------+
| |
| +----------+ |
| | | | with functions to get
|
ll()----->o--------+ corners, and calculate
area
| | |
+-----------------------+ |
|
+-----------------------+ |
| at
lower-left corner | |
+-----------------------+ |
|
+-----------------------+ |
| at
upper-right corner | |
+-----------------------+ |
|
+-----------------------+ |
| Calculates rectangle | |
|
area using length() | |
+-----------------------+
Point.
Definition point.hpp:30
constexpr auto lower(const U &obj)
Calculates the lower corner of an object.
Definition generic.hpp:281
constexpr auto upper(const U &obj)
Calculates the upper corner of an object.
Definition generic.hpp:299
Rectangle (Rectilinear)
Definition recti.hpp:61
constexpr auto area() const -> T
area
Definition recti.hpp:115
constexpr auto ll() const -> Point< T >
lower left corner
Definition recti.hpp:91
constexpr auto ur() const -> Point< T >
upper right corner
Definition recti.hpp:105
- Template Parameters
-