2/27/2024 0 Comments Return a null vector unity![]() Use crossProduct() to compute the cross-product of v1 and v2 if you do not need the result to be normalized to a unit vector. Returns the unit normal vector of a plane spanned by vectors v1 and v2, which must not be parallel to one another. QVector3D QVector3D:: normal( QVector3D v1, QVector3D v2) 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, y, and z coordinates are set to 0.0, otherwise returns false. float QVector3D:: dotProduct( QVector3D v1, QVector3D v2) See also distanceToPlane() and distanceToLine(). Returns the distance from this vertex to a point defined by the vertex point. float QVector3D:: distanceToPoint( QVector3D point) const The two vectors that define the plane are plane2 - plane1 and plane3 - plane1. Returns the distance from this vertex to a plane defined by the vertices plane1, plane2 and plane3. float QVector3D:: distanceToPlane( QVector3D plane1, QVector3D plane2, QVector3D plane3) const The return value will be negative if the vertex is below the plane, or zero if it is on the plane. The normal parameter is assumed to have been normalized to a unit vector. Returns the distance from this vertex to a plane defined by the vertex plane and a normal unit vector. ![]() float QVector3D:: distanceToPlane( QVector3D plane, QVector3D normal) 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 QVector3D:: distanceToLine( QVector3D point, QVector3D direction) const It will be zero if the two vectors are parallel. Returns the cross-product of vectors v1 and v2, which is normal to the plane spanned by v1 and v2. QVector3D QVector3D:: crossProduct( QVector3D v1, QVector3D v2) QVector3D:: QVector3D( QVector4D vector)Ĭonstructs a 3D vector from the specified 4D vector. The z coordinate is set to zpos, which must be finite. QVector3D:: QVector3D( QVector2D vector, float zpos)Ĭonstructs a 3D vector from the specified 2D vector. QVector3D:: QVector3D( QVector2D vector)Ĭonstructs a 3D vector from the specified 2D vector. QVector3D:: QVector3D( QPointF point)Ĭonstructs a vector with x and y coordinates from a 2D point, and a z coordinate of 0. QVector3D:: QVector3D( QPoint point)Ĭonstructs a vector with x and y coordinates from a 2D point, and a z coordinate of 0. QVector3D:: QVector3D( float xpos, float ypos, float zpos)Ĭonstructs a vector with coordinates ( xpos, ypos, zpos). Member Function Documentation QVector3D:: QVector3D()Ĭonstructs a null vector, i.e. Unproject(const QMatrix4x4 & modelView, const QMatrix4x4 & projection, const QRect & viewport) const Project(const QMatrix4x4 & modelView, const QMatrix4x4 & projection, const QRect & viewport) const ![]() QVector3D(float xpos, float ypos, float zpos)ĭistanceToLine(QVector3D point, QVector3D direction) constĭistanceToPlane(QVector3D plane, QVector3D normal) constĭistanceToPlane(QVector3D plane1, QVector3D plane2, QVector3D plane3) const
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |