Multiplies this vector's coordinates by the given finite factor and returns a reference to this vector. QVector2D &QVector2D:: operator*=( float factor) QVariant QVector2D:: operator QVariant() const Returns the 4D form of this 2D vector, with the z and w coordinates set to zero. Returns the 3D form of this 2D vector, with the z coordinate set to zero. Returns the QPointF form of this 2D vector. Each coordinate is rounded to the nearest integer. Returns the QPoint form of this 2D vector. Sets the y coordinate of this point to the given finite y coordinate. Sets the x coordinate of this point to the given finite x coordinate. Otherwise the normalized form of the vector of length 1 will be returned. If the length of the vector is very close to 1, then the vector will be returned as-is. If this vector is null, then a null vector is returned. Returns the normalized unit vector form of this vector. Nothing happens if this vector is a null vector or the length of the vector is very close to 1. This is equivalent to the dot product of the vector with itself. Returns the squared length of the vector from the origin. See also lengthSquared() and normalized(). Returns the length of the vector from the origin. Returns true if the x and y coordinates are set to 0.0, otherwise returns false. float QVector2D:: dotProduct( QVector2D v1, QVector2D v2) Returns the distance from this vertex to a point defined by the vertex point. float QVector2D:: distanceToPoint( QVector2D point) const In that case, the distance from point to this vertex is returned. If direction is a null vector, then it does not define a line. Returns the distance that this vertex is from a line defined by point and the unit vector direction. float QVector2D:: distanceToLine( QVector2D point, QVector2D direction) const QVector2D:: QVector2D()Ĭonstructs a null vector, i.e. QVector2D:: QVector2D( float xpos, float ypos)Ĭonstructs a vector with coordinates ( xpos, ypos). QVector2D:: QVector2D( QPoint point)Ĭonstructs a vector with x and y coordinates from a 2D point. QVector2D:: QVector2D( QPointF point)Ĭonstructs a vector with x and y coordinates from a 2D point. QVector2D:: QVector2D( QVector3D vector)Ĭonstructs a vector with x and y coordinates from a 3D vector. The z and w coordinates of vector are dropped. Member Function Documentation QVector2D:: QVector2D( QVector4D vector)Ĭonstructs a vector with x and y coordinates from a 3D vector.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |