45 #include <QtCore/qpoint.h> 46 #include <QtCore/qmetatype.h> 58 #ifndef QT_NO_VECTOR3D 67 #ifndef QT_NO_VECTOR2D 71 #ifndef QT_NO_VECTOR4D 86 qreal lengthSquared()
const;
119 #ifndef QT_NO_VECTOR2D 122 #ifndef QT_NO_VECTOR4D 134 QVector3D(
float xpos,
float ypos,
float zpos,
int dummy);
138 #ifndef QT_NO_MATRIX4X4 211 return v1.
xp == v2.
xp && v1.
yp == v2.
yp && v1.
zp == v2.
zp;
216 return v1.
xp != v2.
xp || v1.
yp != v2.
yp || v1.
zp != v2.
zp;
231 return QVector3D(vector.
xp * factor, vector.
yp * factor, vector.
zp * factor, 1);
236 return QVector3D(vector.
xp * factor, vector.
yp * factor, vector.
zp * factor, 1);
251 return QVector3D(vector.
xp / divisor, vector.
yp / divisor, vector.
zp / divisor, 1);
271 #ifndef QT_NO_DEBUG_STREAM 275 #ifndef QT_NO_DATASTREAM The QVariant class acts like a union for the most common Qt data types.
The QDebug class provides an output stream for debugging information.
The QVector3D class represents a vector or vertex in 3D space.
QVector3D & operator-=(const QVector3D &vector)
Subtracts the given vector from this vector and returns a reference to this vector.
QVector3D & operator+=(const QVector3D &vector)
Adds the given vector to this vector and returns a reference to this vector.
#define QT_END_NAMESPACE
This macro expands to.
The QVector4D class represents a vector or vertex in 4D space.
The QPointF class defines a point in the plane using floating point precision.
bool qFuzzyCompare(const QVector3D &v1, const QVector3D &v2)
const QVector3D operator/(const QVector3D &vector, qreal divisor)
friend bool operator==(const QVector3D &v1, const QVector3D &v2)
Returns true if v1 is equal to v2; otherwise returns false.
bool operator!=(const QVector3D &v1, const QVector3D &v2)
QVector3D()
Constructs a null vector, i.
qreal x() const
Returns the x coordinate of this point.
static bool qIsNull(double d)
Q_DECLARE_TYPEINFO(QVector3D, Q_MOVABLE_TYPE)
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool operator==(const QVector3D &v1, const QVector3D &v2)
QPoint toPoint() const
Returns the QPoint form of this 3D vector.
QDataStream & operator>>(QDataStream &stream, QVector3D &vector)
Reads a 3D vector from the given stream into the given vector and returns a reference to the stream...
void setX(qreal x)
Sets the x coordinate of this point to the given x coordinate.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
QVector3D & operator/=(qreal divisor)
Divides this vector's coordinates by the given divisor, and returns a reference to this vector...
The QVector2D class represents a vector or vertex in 2D space.
QVector3D & operator*=(qreal factor)
Multiplies this vector's coordinates by the given factor, and returns a reference to this vector...
QPointF toPointF() const
Returns the QPointF form of this 3D vector.
friend const QVector3D operator+(const QVector3D &v1, const QVector3D &v2)
Returns a QVector3D object that is the sum of the given vectors, v1 and v2; each component is added s...
QDataStream & operator<<(QDataStream &stream, const QVector3D &vector)
Writes the given vector to the given stream and returns a reference to the stream.
qreal z() const
Returns the z coordinate of this point.
const QVector3D operator-(const QVector3D &v1, const QVector3D &v2)
bool isNull() const
Returns true if the x, y, and z coordinates are set to 0.
const QVector3D operator+(const QVector3D &v1, const QVector3D &v2)
const QVector3D operator*(qreal factor, const QVector3D &vector)
void setZ(qreal z)
Sets the z coordinate of this point to the given z coordinate.
The QPoint class defines a point in the plane using integer precision.
qreal y() const
Returns the y coordinate of this point.
friend const QVector3D operator/(const QVector3D &vector, qreal divisor)
Returns the QVector3D object formed by dividing all three components of the given vector by the given...
The QDataStream class provides serialization of binary data to a QIODevice.
friend const QVector3D operator-(const QVector3D &v1, const QVector3D &v2)
Returns a QVector3D object that is formed by subtracting v2 from v1; each component is subtracted sep...
timeval & operator+=(timeval &t1, const timeval &t2)
static void normalize(double &x, double &y)
friend bool qFuzzyCompare(const QVector3D &v1, const QVector3D &v2)
Returns true if v1 and v2 are equal, allowing for a small fuzziness factor for floating-point compari...
friend bool operator!=(const QVector3D &v1, const QVector3D &v2)
Returns true if v1 is not equal to v2; otherwise returns false.
void setY(qreal y)
Sets the y coordinate of this point to the given y coordinate.
Q_DECL_CONSTEXPR int qRound(qreal d)
friend const QVector3D operator*(qreal factor, const QVector3D &vector)
static bool isNull(const QVariant::Private *d)
Qt::LayoutDirection direction