#[repr(C)]
pub struct QVector4D { /* private fields */ }
Expand description
The QVector4D class represents a vector or vertex in 4D space.
Returns true if the x, y, z, and w coordinates are set to 0.0, otherwise returns false.
Returns the length of the vector from the origin.
Returns the squared length of the vector from the origin.
This is equivalent to the dot product of the vector with itself.
Normalizes the current vector in place. Nothing happens
if this vector is a null vector or the length of the vector is very close to 1.
Returns the normalized unit vector form of this vector.
If this vector is null, then a null vector is returned.
If the length of the vector is very close to 1, then the vector will be returned as-is.
Otherwise the normalized form of the vector of length 1 will be returned.
Sets the w coordinate of this point to the given finite w coordinate.
Sets the x coordinate of this point to the given finite x coordinate.
Sets the y coordinate of this point to the given finite y coordinate.
Sets the z coordinate of this point to the given finite z coordinate.
Returns the 2D vector form of this 4D vector,
dividing the x and y coordinates by the w coordinate and dropping the z coordinate.
Returns a null vector if w is zero.
Returns the 3D vector form of this 4D vector,
dividing the x, y, and z coordinates by the w coordinate.
Returns a null vector if w is zero.
Returns the w coordinate of this point.
Returns the x coordinate of this point.
Returns the y coordinate of this point.
Returns the z coordinate of this point.
Constructs a vector with coordinates (xpos, ypos, zpos, wpos).
All parameters must be finite.
The resulting type after applying the +
operator.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Constructs a null vector, i.e. with coordinates (0, 0, 0, 0).
Formats the value using the given formatter.
Read more
The resulting type after applying the /
operator.
A type-level representation of the type’s C++ namespace and type name.
Read more
Constructs a vector with x and y coordinates from a 2D point, and z and w coordinates of 0.
Constructs a vector with x and y coordinates from a 2D point, and z and w coordinates of 0.
Constructs a 4D vector from the specified 2D vector.
The z and w coordinates are set to zero.
Constructs a 4D vector from the specified 3D vector.
The w coordinate is set to zero.
Returns the QPoint form of this 4D vector. The z and w coordinates are dropped.
The x and y coordinates are rounded to nearest integers.
Returns the QPointF form of this 4D vector. The z and w coordinates are dropped.
Constructs a vector with x and y coordinates from a 3D vector.
The z and w coordinates of vector are dropped.
Constructs a 3D vector from the specified 4D vector.
The w coordinate is dropped.
The resulting type after applying the *
operator.
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
The resulting type after applying the -
operator.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String
.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.