36 : mX( x ), mY( y ), mZ( z ) {}
39 bool isNull()
const {
return mX == 0 && mY == 0 && mZ == 0; }
42 double x()
const {
return mX; }
44 double y()
const {
return mY; }
46 double z()
const {
return mZ; }
49 void set(
double x,
double y,
double z )
58 return mX == other.mX && mY == other.mY && mZ == other.mZ;
68 return QgsVector3D( mX + other.mX, mY + other.mY, mZ + other.mZ );
74 return QgsVector3D( mX - other.mX, mY - other.mY, mZ - other.mZ );
78 double mX = 0, mY = 0, mZ = 0;
81 #endif // QGSVECTOR3D_H 3 Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double preci...
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
double y() const
Returns Y coordinate.
QgsVector3D operator-(const QgsVector3D &other)
Returns difference of two vectors.
double z() const
Returns Z coordinate.
bool isNull() const
Returns true if all three coordinates are zero.
bool operator==(const QgsVector3D &other) const
bool operator!=(const QgsVector3D &other) const
QgsVector3D(double x, double y, double z)
Constructs a vector from given coordinates.
QgsVector3D operator+(const QgsVector3D &other)
Returns sum of two vectors.
double x() const
Returns X coordinate.