libcrn
3.9.5
A document image processing library
|
A 2D point class. More...
#include <CRNPoint2D.h>
Classes | |
struct | Comparer |
Functor to compare points. More... | |
Public Types | |
using | value_type = T |
The value type. More... | |
Public Member Functions | |
Point2D () noexcept(noexcept(T{0})) | |
Default constructor (sets coordinates to 0) More... | |
Point2D (T x, T y) noexcept(std::is_nothrow_copy_constructible< T >::value) | |
Constructor from values. More... | |
Point2D (const Point2D &)=default | |
Point2D (Point2D &&)=default | |
virtual | ~Point2D () override=default |
Destructor. More... | |
String | ToString () const |
Converts object to string. More... | |
template<typename U > | |
Point2D< U > | Convert () const noexcept(noexcept(U{X})) |
Converts to another type of Point. More... | |
Point2D & | operator= (const Point2D &)=default |
Point2D & | operator= (Point2D &&)=default |
bool | operator== (const Point2D &p) const noexcept |
Point2D< T > & | operator+= (const Point2D< T > &p) noexcept |
Translation. More... | |
Point2D< T > & | operator-= (const Point2D< T > &p) noexcept |
Translation. More... | |
![]() | |
virtual | ~Object ()=default |
Public Attributes | |
value_type | X |
value_type | Y |
A 2D point class.
Convenience 2D point class.
Definition at line 45 of file CRNPoint2D.h.
using crn::Point2D< T >::value_type = T |
The value type.
Definition at line 49 of file CRNPoint2D.h.
|
inlinenoexcept |
Default constructor (sets coordinates to 0)
Definition at line 52 of file CRNPoint2D.h.
|
inlinenoexcept |
Constructor from values.
Definition at line 54 of file CRNPoint2D.h.
|
default |
|
default |
|
overridevirtualdefault |
Destructor.
|
inlinenoexcept |
Converts to another type of Point.
Definition at line 66 of file CRNPoint2D.h.
|
inlinenoexcept |
Translation.
Definition at line 73 of file CRNPoint2D.h.
|
inlinenoexcept |
Translation.
Definition at line 75 of file CRNPoint2D.h.
|
default |
|
default |
|
inlinenoexcept |
Definition at line 71 of file CRNPoint2D.h.
|
inline |
Converts object to string.
Definition at line 61 of file CRNPoint2D.h.
value_type crn::Point2D< T >::X |
Definition at line 63 of file CRNPoint2D.h.
value_type crn::Point2D< T >::Y |
The coordinates
Definition at line 63 of file CRNPoint2D.h.