QSFML
|
Compatibility layer sf::Vector2<N> ↔ QPoint; QSize. More...
#include <qvector2.hpp>
Public Member Functions | |
QVector2 () | |
Default constructor. More... | |
QVector2 (N x, N y) | |
Two-parameter constructor. More... | |
QVector2 (sf::Vector2< N > vec) | |
Constructor copying sf::Vector2<N> More... | |
QVector2 (QPoint Qp) | |
Constructor copying QPoint. More... | |
QVector2 (QSize Qp) | |
Constructor copying QSize. More... | |
operator QPoint const () | |
QPoint cast operator. More... | |
operator QSize const () | |
QSize cast operator. More... | |
Compatibility layer sf::Vector2<N> ↔ QPoint; QSize.
One Vector2 to rule them all.
Inherits sf::Vector2<N>, so it can be used everywhere, where original vector can.
Supports casting (non-explicit) to both QPoint and QSize.
Sample usage:
|
inline |
Default constructor.
Just calls default constructor of sf::Vector2<N>().
|
inline |
Two-parameter constructor.
[in] | x | – Point position on X axis |
[in] | y | – Point position on Y axis |
Calls sf::Vector2<N>(x, y).
|
inline |
Constructor copying sf::Vector2<N>
[in] | vec | – Vector to copy |
Calls sf::Vector2<N>(vec.x, vec.y).
|
inline |
Constructor copying QPoint.
[in] | Qp | – QPoint instance |
Calls sf::Vector2<N>(Qp.x(), Qp.y()).
|
inline |
Constructor copying QSize.
[in] | Qp | – QSize instance |
Calls sf::Vector2<N>(Qp.x(), Qp.y()).
|
inline |
QPoint cast operator.
Casts qsf::Vector2 to a QPoint.
Sample usage:
|
inline |
QSize cast operator.