![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qquickvaluetypes_p.h>
Public Member Functions | |
Q_INVOKABLE | QQuickVector4DValueType ()=default |
Q_INVOKABLE | QQuickVector4DValueType (const QVector4D &vector4d) |
Q_INVOKABLE QString | toString () const |
qreal | x () const |
qreal | y () const |
qreal | z () const |
qreal | w () const |
void | setX (qreal) |
void | setY (qreal) |
void | setZ (qreal) |
void | setW (qreal) |
Q_INVOKABLE qreal | dotProduct (const QVector4D &vec) const |
Q_INVOKABLE QVector4D | times (const QVector4D &vec) const |
Q_INVOKABLE QVector4D | times (const QMatrix4x4 &m) const |
Q_INVOKABLE QVector4D | times (qreal scalar) const |
Q_INVOKABLE QVector4D | plus (const QVector4D &vec) const |
Q_INVOKABLE QVector4D | minus (const QVector4D &vec) const |
Q_INVOKABLE QVector4D | normalized () const |
Q_INVOKABLE qreal | length () const |
Q_INVOKABLE QVector2D | toVector2d () const |
Q_INVOKABLE QVector3D | toVector3d () const |
Q_INVOKABLE bool | fuzzyEquals (const QVector4D &vec, qreal epsilon) const |
Q_INVOKABLE bool | fuzzyEquals (const QVector4D &vec) const |
Public Member Functions inherited from QVector4D | |
constexpr | QVector4D () noexcept |
Constructs a null vector, i.e. | |
QVector4D (Qt::Initialization) noexcept | |
constexpr | QVector4D (float xpos, float ypos, float zpos, float wpos) noexcept |
Constructs a vector with coordinates (xpos, ypos, zpos, wpos). | |
constexpr | QVector4D (QPoint point) noexcept |
Constructs a vector with x and y coordinates from a 2D point, and z and w coordinates of 0. | |
constexpr | QVector4D (QPointF point) noexcept |
Constructs a vector with x and y coordinates from a 2D point, and z and w coordinates of 0. | |
constexpr | QVector4D (QVector2D vector) noexcept |
Constructs a 4D vector from the specified 2D vector. | |
constexpr | QVector4D (QVector2D vector, float zpos, float wpos) noexcept |
Constructs a 4D vector from the specified 2D vector. | |
constexpr | QVector4D (QVector3D vector) noexcept |
Constructs a 4D vector from the specified 3D vector. | |
constexpr | QVector4D (QVector3D vector, float wpos) noexcept |
Constructs a 4D vector from the specified 3D vector. | |
constexpr bool | isNull () const noexcept |
Returns true if the x, y, z, and w coordinates are set to 0.0, otherwise returns false . | |
constexpr float | x () const noexcept |
Returns the x coordinate of this point. | |
constexpr float | y () const noexcept |
Returns the y coordinate of this point. | |
constexpr float | z () const noexcept |
Returns the z coordinate of this point. | |
constexpr float | w () const noexcept |
Returns the w coordinate of this point. | |
constexpr void | setX (float x) noexcept |
Sets the x coordinate of this point to the given finite x coordinate. | |
constexpr void | setY (float y) noexcept |
Sets the y coordinate of this point to the given finite y coordinate. | |
constexpr void | setZ (float z) noexcept |
Sets the z coordinate of this point to the given finite z coordinate. | |
constexpr void | setW (float w) noexcept |
Sets the w coordinate of this point to the given finite w coordinate. | |
constexpr float & | operator[] (int i) |
constexpr float | operator[] (int i) const |
float | length () const noexcept |
Returns the length of the vector from the origin. | |
constexpr float | lengthSquared () const noexcept |
Returns the squared length of the vector from the origin. | |
QVector4D | normalized () const noexcept |
Returns the normalized unit vector form of this vector. | |
void | normalize () noexcept |
Normalizes the current vector in place. | |
constexpr QVector4D & | operator+= (QVector4D vector) noexcept |
Adds the given vector to this vector and returns a reference to this vector. | |
constexpr QVector4D & | operator-= (QVector4D vector) noexcept |
Subtracts the given vector from this vector and returns a reference to this vector. | |
constexpr QVector4D & | operator*= (float factor) noexcept |
Multiplies this vector's coordinates by the given finite factor, and returns a reference to this vector. | |
constexpr QVector4D & | operator*= (QVector4D vector) noexcept |
Multiplies each component of this vector by the corresponding component of vector and returns a reference to this vector. | |
constexpr QVector4D & | operator/= (float divisor) |
Divides this vector's coordinates by the given divisor, and returns a reference to this vector. | |
constexpr QVector4D & | operator/= (QVector4D vector) |
constexpr QVector2D | toVector2D () const noexcept |
Returns the 2D vector form of this 4D vector, dropping the z and w coordinates. | |
constexpr QVector2D | toVector2DAffine () const noexcept |
Returns the 2D vector form of this 4D vector, dividing the x and y coordinates by the w coordinate and dropping the z coordinate. | |
constexpr QVector3D | toVector3D () const noexcept |
Returns the 3D vector form of this 4D vector, dropping the w coordinate. | |
constexpr QVector3D | toVector3DAffine () const noexcept |
Returns the 3D vector form of this 4D vector, dividing the x, y, and z coordinates by the w coordinate. | |
constexpr QPoint | toPoint () const noexcept |
Returns the QPoint form of this 4D vector. | |
constexpr QPointF | toPointF () const noexcept |
Returns the QPointF form of this 4D vector. | |
Q_GUI_EXPORT | operator QVariant () const |
Returns the 4D vector as a QVariant. |
Static Public Member Functions | |
static QVariant | create (const QJSValue ¶ms) |
Static Public Member Functions inherited from QVector4D | |
static constexpr float | dotProduct (QVector4D v1, QVector4D v2) noexcept |
Returns the dot product of v1 and v2. |
Properties | |
qreal | x |
qreal | y |
qreal | z |
qreal | w |
Additional Inherited Members | |
Related Symbols inherited from QVector4D | |
QDataStream & | operator<< (QDataStream &stream, QVector4D vector) |
Writes the given vector to the given stream and returns a reference to the stream. | |
QDataStream & | operator>> (QDataStream &stream, QVector4D &vector) |
Reads a 4D vector from the given stream into the given vector and returns a reference to the stream. |
Definition at line 167 of file qquickvaluetypes_p.h.
|
default |
|
inline |
Definition at line 184 of file qquickvaluetypes_p.h.
Definition at line 400 of file qquickvaluetypes.cpp.
Definition at line 461 of file qquickvaluetypes.cpp.
bool QQuickVector4DValueType::fuzzyEquals | ( | const QVector4D & | vec | ) | const |
Definition at line 525 of file qquickvaluetypes.cpp.
Definition at line 511 of file qquickvaluetypes.cpp.
qreal QQuickVector4DValueType::length | ( | ) | const |
Definition at line 496 of file qquickvaluetypes.cpp.
Definition at line 486 of file qquickvaluetypes.cpp.
QVector4D QQuickVector4DValueType::normalized | ( | ) | const |
Definition at line 491 of file qquickvaluetypes.cpp.
Definition at line 481 of file qquickvaluetypes.cpp.
Definition at line 456 of file qquickvaluetypes.cpp.
Definition at line 441 of file qquickvaluetypes.cpp.
Definition at line 446 of file qquickvaluetypes.cpp.
Definition at line 451 of file qquickvaluetypes.cpp.
QVector4D QQuickVector4DValueType::times | ( | const QMatrix4x4 & | m | ) | const |
Definition at line 471 of file qquickvaluetypes.cpp.
Definition at line 466 of file qquickvaluetypes.cpp.
Definition at line 476 of file qquickvaluetypes.cpp.
QString QQuickVector4DValueType::toString | ( | ) | const |
Definition at line 415 of file qquickvaluetypes.cpp.
QVector2D QQuickVector4DValueType::toVector2d | ( | ) | const |
Definition at line 501 of file qquickvaluetypes.cpp.
QVector3D QQuickVector4DValueType::toVector3d | ( | ) | const |
Definition at line 506 of file qquickvaluetypes.cpp.
qreal QQuickVector4DValueType::w | ( | ) | const |
Definition at line 436 of file qquickvaluetypes.cpp.
qreal QQuickVector4DValueType::x | ( | ) | const |
Definition at line 421 of file qquickvaluetypes.cpp.
qreal QQuickVector4DValueType::y | ( | ) | const |
Definition at line 426 of file qquickvaluetypes.cpp.
qreal QQuickVector4DValueType::z | ( | ) | const |
Definition at line 431 of file qquickvaluetypes.cpp.
|
readwrite |
Definition at line 172 of file qquickvaluetypes_p.h.
|
readwrite |
Definition at line 169 of file qquickvaluetypes_p.h.
|
readwrite |
Definition at line 170 of file qquickvaluetypes_p.h.
|
readwrite |
Definition at line 171 of file qquickvaluetypes_p.h.