|
| constexpr | LPointTemplate () noexcept |
| | Initializes the vector with (0,0).
|
| |
| constexpr | LPointTemplate (T x, T y) noexcept |
| | Initializes the vector with (x,y).
|
| |
| constexpr | LPointTemplate (T n) noexcept |
| | Initializes the vector with (n,n).
|
| |
| template<class N > |
| constexpr | LPointTemplate (const LPointTemplate< N > &point) noexcept |
| | Copy constructor.
|
| |
| constexpr T | x () const noexcept |
| | First component of the vector.
|
| |
| constexpr T | y () const noexcept |
| | Second component of the vector.
|
| |
| constexpr T | w () const noexcept |
| | First component of the vector (equivalent to x())
|
| |
| constexpr T | h () const noexcept |
| | Second component of the vector (equivalent to y())
|
| |
| constexpr T | width () const noexcept |
| | First component of the vector (equivalent to x())
|
| |
| constexpr T | height () const noexcept |
| | Second component of the vector (equivalent to y())
|
| |
| constexpr T | area () const noexcept |
| | Product of the components (x*y)
|
| |
| constexpr void | setX (T x) noexcept |
| | Assigns the value to the first component of the vector.
|
| |
| constexpr void | setY (T y) noexcept |
| | Assigns the value to the second component of the vector.
|
| |
| constexpr void | setW (T x) noexcept |
| | Assigns the value to the first component of the vector (equivalent to setX())
|
| |
| constexpr void | setH (T y) noexcept |
| | Assigns the value to the second component of the vector (equivalent to setY())
|
| |
| constexpr void | setWidth (T x) noexcept |
| | Assigns the value to the first component of the vector (equivalent to setX())
|
| |
| constexpr void | setHeight (T y) noexcept |
| | Assigns the value to the second component of the vector (equivalent to setY())
|
| |
| template<class N > |
| constexpr LPointTemplate< T > | constrainedToHeight (N size) const noexcept |
| | Assigns the second component while maintaining proportion with the first.
|
| |
| template<class N > |
| constexpr T | distanceFrom (const LPointTemplate< N > &point) const noexcept |
| | Distance from another point.
|
| |
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.