|
constexpr | LPointTemplate () noexcept |
| Initializes the vector with (0,0). More...
|
|
constexpr | LPointTemplate (T x, T y) noexcept |
| Initializes the vector with (x,y). More...
|
|
constexpr | LPointTemplate (T n) noexcept |
| Initializes the vector with (n,n). More...
|
|
template<class N > |
constexpr | LPointTemplate (const LPointTemplate< N > &point) noexcept |
| Copy constructor. More...
|
|
constexpr T | x () const noexcept |
| First component of the vector. More...
|
|
constexpr T | y () const noexcept |
| Second component of the vector. More...
|
|
constexpr T | w () const noexcept |
| First component of the vector (equivalent to x()) More...
|
|
constexpr T | h () const noexcept |
| Second component of the vector (equivalent to y()) More...
|
|
constexpr T | width () const noexcept |
| First component of the vector (equivalent to x()) More...
|
|
constexpr T | height () const noexcept |
| Second component of the vector (equivalent to y()) More...
|
|
constexpr T | area () const noexcept |
| Product of the components (x*y) More...
|
|
constexpr void | setX (T x) noexcept |
| Assigns the value to the first component of the vector. More...
|
|
constexpr void | setY (T y) noexcept |
| Assigns the value to the second component of the vector. More...
|
|
constexpr void | setW (T x) noexcept |
| Assigns the value to the first component of the vector (equivalent to setX()) More...
|
|
constexpr void | setH (T y) noexcept |
| Assigns the value to the second component of the vector (equivalent to setY()) More...
|
|
constexpr void | setWidth (T x) noexcept |
| Assigns the value to the first component of the vector (equivalent to setX()) More...
|
|
constexpr void | setHeight (T y) noexcept |
| Assigns the value to the second component of the vector (equivalent to setY()) More...
|
|
template<class N > |
constexpr LPointTemplate< T > | constrainedToHeight (N size) const noexcept |
| Assigns the second component while maintaining proportion with the first. More...
|
|
template<class N > |
constexpr T | distanceFrom (const LPointTemplate< N > &point) const noexcept |
| Distance from another point. More...
|
|
template<class T>
class Louvre::LPointTemplate< T >
Template for 2D vectors.
The LPointTemplate class is a template for creating two-dimensional vectors.
The library uses this template to generate the LPoint and LSize classes, which work with 32-bit integers, and LPointF and LSizeF, which work with 32-bit floating-point numbers.