Struct qt_gui::QQuaternion
source · #[repr(C)]pub struct QQuaternion { /* private fields */ }
Expand description
The QQuaternion class represents a quaternion consisting of a vector and scalar.
C++ class: QQuaternion
.
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Quaternions are used to represent rotations in 3D space, and consist of a 3D rotation axis specified by the x, y, and z coordinates, and a scalar representing the rotation angle.
Implementations§
source§impl QQuaternion
impl QQuaternion
sourcepub unsafe fn add_assign(
&self,
quaternion: impl CastInto<Ref<QQuaternion>>
) -> Ref<QQuaternion>
pub unsafe fn add_assign( &self, quaternion: impl CastInto<Ref<QQuaternion>> ) -> Ref<QQuaternion>
Adds the given quaternion to this quaternion and returns a reference to this quaternion.
Calls C++ function: QQuaternion& QQuaternion::operator+=(const QQuaternion& quaternion)
.
Adds the given quaternion to this quaternion and returns a reference to this quaternion.
See also operator-=().
sourcepub unsafe fn conjugate(&self) -> CppBox<QQuaternion>
pub unsafe fn conjugate(&self) -> CppBox<QQuaternion>
Use conjugated() instead.
Calls C++ function: QQuaternion QQuaternion::conjugate() const
.
Use conjugated() instead.
sourcepub unsafe fn conjugated(&self) -> CppBox<QQuaternion>
pub unsafe fn conjugated(&self) -> CppBox<QQuaternion>
Returns the conjugate of this quaternion, which is (-x, -y, -z, scalar).
Calls C++ function: QQuaternion QQuaternion::conjugated() const
.
Returns the conjugate of this quaternion, which is (-x, -y, -z, scalar).
This function was introduced in Qt 5.5.
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QQuaternion>>
) -> Ref<QQuaternion>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QQuaternion>> ) -> Ref<QQuaternion>
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Calls C++ function: QQuaternion& QQuaternion::operator=(const QQuaternion& other)
.
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Quaternions are used to represent rotations in 3D space, and consist of a 3D rotation axis specified by the x, y, and z coordinates, and a scalar representing the rotation angle.
sourcepub unsafe fn div_assign(&self, divisor: c_float) -> Ref<QQuaternion>
pub unsafe fn div_assign(&self, divisor: c_float) -> Ref<QQuaternion>
Divides this quaternion's components by the given divisor, and returns a reference to this quaternion.
Calls C++ function: QQuaternion& QQuaternion::operator/=(float divisor)
.
Divides this quaternion’s components by the given divisor, and returns a reference to this quaternion.
See also operator*=().
sourcepub unsafe fn dot_product(
q1: impl CastInto<Ref<QQuaternion>>,
q2: impl CastInto<Ref<QQuaternion>>
) -> c_float
pub unsafe fn dot_product( q1: impl CastInto<Ref<QQuaternion>>, q2: impl CastInto<Ref<QQuaternion>> ) -> c_float
Returns the dot product of q1 and q2.
Calls C++ function: static float QQuaternion::dotProduct(const QQuaternion& q1, const QQuaternion& q2)
.
sourcepub unsafe fn from_axes(
x_axis: impl CastInto<Ref<QVector3D>>,
y_axis: impl CastInto<Ref<QVector3D>>,
z_axis: impl CastInto<Ref<QVector3D>>
) -> CppBox<QQuaternion>
pub unsafe fn from_axes( x_axis: impl CastInto<Ref<QVector3D>>, y_axis: impl CastInto<Ref<QVector3D>>, z_axis: impl CastInto<Ref<QVector3D>> ) -> CppBox<QQuaternion>
Constructs the quaternion using 3 axes (xAxis, yAxis, zAxis).
Calls C++ function: static QQuaternion QQuaternion::fromAxes(const QVector3D& xAxis, const QVector3D& yAxis, const QVector3D& zAxis)
.
Constructs the quaternion using 3 axes (xAxis, yAxis, zAxis).
Note: The axes are assumed to be orthonormal.
This function was introduced in Qt 5.5.
See also getAxes() and fromRotationMatrix().
sourcepub unsafe fn from_axis_and_angle_2a(
axis: impl CastInto<Ref<QVector3D>>,
angle: c_float
) -> CppBox<QQuaternion>
pub unsafe fn from_axis_and_angle_2a( axis: impl CastInto<Ref<QVector3D>>, angle: c_float ) -> CppBox<QQuaternion>
Creates a normalized quaternion that corresponds to rotating through angle degrees about the specified 3D axis.
Calls C++ function: static QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, float angle)
.
Creates a normalized quaternion that corresponds to rotating through angle degrees about the specified 3D axis.
See also getAxisAndAngle().
sourcepub unsafe fn from_axis_and_angle_4a(
x: c_float,
y: c_float,
z: c_float,
angle: c_float
) -> CppBox<QQuaternion>
pub unsafe fn from_axis_and_angle_4a( x: c_float, y: c_float, z: c_float, angle: c_float ) -> CppBox<QQuaternion>
Creates a normalized quaternion that corresponds to rotating through angle degrees about the 3D axis (x, y, z).
Calls C++ function: static QQuaternion QQuaternion::fromAxisAndAngle(float x, float y, float z, float angle)
.
Creates a normalized quaternion that corresponds to rotating through angle degrees about the 3D axis (x, y, z).
See also getAxisAndAngle().
sourcepub unsafe fn from_direction(
direction: impl CastInto<Ref<QVector3D>>,
up: impl CastInto<Ref<QVector3D>>
) -> CppBox<QQuaternion>
pub unsafe fn from_direction( direction: impl CastInto<Ref<QVector3D>>, up: impl CastInto<Ref<QVector3D>> ) -> CppBox<QQuaternion>
Constructs the quaternion using specified forward direction direction and upward direction up. If the upward direction was not specified or the forward and upward vectors are collinear, a new orthonormal upward direction will be generated.
Calls C++ function: static QQuaternion QQuaternion::fromDirection(const QVector3D& direction, const QVector3D& up)
.
Constructs the quaternion using specified forward direction direction and upward direction up. If the upward direction was not specified or the forward and upward vectors are collinear, a new orthonormal upward direction will be generated.
This function was introduced in Qt 5.5.
See also fromAxes() and rotationTo().
sourcepub unsafe fn from_euler_angles_1a(
euler_angles: impl CastInto<Ref<QVector3D>>
) -> CppBox<QQuaternion>
pub unsafe fn from_euler_angles_1a( euler_angles: impl CastInto<Ref<QVector3D>> ) -> CppBox<QQuaternion>
This is an overloaded function.
Calls C++ function: static QQuaternion QQuaternion::fromEulerAngles(const QVector3D& eulerAngles)
.
This is an overloaded function.
Creates a quaternion that corresponds to a rotation of eulerAngles: eulerAngles.z() degrees around the z axis, eulerAngles.x() degrees around the x axis, and eulerAngles.y() degrees around the y axis (in that order).
This function was introduced in Qt 5.5.
See also toEulerAngles().
sourcepub unsafe fn from_euler_angles_3a(
pitch: c_float,
yaw: c_float,
roll: c_float
) -> CppBox<QQuaternion>
pub unsafe fn from_euler_angles_3a( pitch: c_float, yaw: c_float, roll: c_float ) -> CppBox<QQuaternion>
Creates a quaternion that corresponds to a rotation of roll degrees around the z axis, pitch degrees around the x axis, and yaw degrees around the y axis (in that order).
Calls C++ function: static QQuaternion QQuaternion::fromEulerAngles(float pitch, float yaw, float roll)
.
Creates a quaternion that corresponds to a rotation of roll degrees around the z axis, pitch degrees around the x axis, and yaw degrees around the y axis (in that order).
This function was introduced in Qt 5.5.
See also getEulerAngles().
sourcepub unsafe fn get_axes(
&self,
x_axis: impl CastInto<Ptr<QVector3D>>,
y_axis: impl CastInto<Ptr<QVector3D>>,
z_axis: impl CastInto<Ptr<QVector3D>>
)
pub unsafe fn get_axes( &self, x_axis: impl CastInto<Ptr<QVector3D>>, y_axis: impl CastInto<Ptr<QVector3D>>, z_axis: impl CastInto<Ptr<QVector3D>> )
Returns the 3 orthonormal axes (xAxis, yAxis, zAxis) defining the quaternion.
Calls C++ function: void QQuaternion::getAxes(QVector3D* xAxis, QVector3D* yAxis, QVector3D* zAxis) const
.
Returns the 3 orthonormal axes (xAxis, yAxis, zAxis) defining the quaternion.
This function was introduced in Qt 5.5.
See also fromAxes() and toRotationMatrix().
sourcepub unsafe fn get_axis_and_angle_2a(
&self,
axis: impl CastInto<Ptr<QVector3D>>,
angle: *mut c_float
)
pub unsafe fn get_axis_and_angle_2a( &self, axis: impl CastInto<Ptr<QVector3D>>, angle: *mut c_float )
This is an overloaded function.
Calls C++ function: void QQuaternion::getAxisAndAngle(QVector3D* axis, float* angle) const
.
This is an overloaded function.
Extracts a 3D axis axis and a rotating angle angle (in degrees) that corresponds to this quaternion.
This function was introduced in Qt 5.5.
See also fromAxisAndAngle().
sourcepub unsafe fn get_axis_and_angle_4a(
&self,
x: *mut c_float,
y: *mut c_float,
z: *mut c_float,
angle: *mut c_float
)
pub unsafe fn get_axis_and_angle_4a( &self, x: *mut c_float, y: *mut c_float, z: *mut c_float, angle: *mut c_float )
Extracts a 3D axis (x, y, z) and a rotating angle angle (in degrees) that corresponds to this quaternion.
Calls C++ function: void QQuaternion::getAxisAndAngle(float* x, float* y, float* z, float* angle) const
.
Extracts a 3D axis (x, y, z) and a rotating angle angle (in degrees) that corresponds to this quaternion.
This function was introduced in Qt 5.5.
See also fromAxisAndAngle().
sourcepub unsafe fn get_euler_angles(
&self,
pitch: *mut c_float,
yaw: *mut c_float,
roll: *mut c_float
)
pub unsafe fn get_euler_angles( &self, pitch: *mut c_float, yaw: *mut c_float, roll: *mut c_float )
Calculates roll, pitch, and yaw Euler angles (in degrees) that corresponds to this quaternion.
Calls C++ function: void QQuaternion::getEulerAngles(float* pitch, float* yaw, float* roll) const
.
Calculates roll, pitch, and yaw Euler angles (in degrees) that corresponds to this quaternion.
This function was introduced in Qt 5.5.
See also fromEulerAngles().
sourcepub unsafe fn inverted(&self) -> CppBox<QQuaternion>
pub unsafe fn inverted(&self) -> CppBox<QQuaternion>
Returns the inverse of this quaternion. If this quaternion is null, then a null quaternion is returned.
Calls C++ function: QQuaternion QQuaternion::inverted() const
.
sourcepub unsafe fn is_identity(&self) -> bool
pub unsafe fn is_identity(&self) -> bool
Returns true
if the x, y, and z components of this quaternion are set to 0.0, and the scalar component is set to 1.0; otherwise returns false
.
Calls C++ function: bool QQuaternion::isIdentity() const
.
Returns true
if the x, y, and z components of this quaternion are set to 0.0, and the scalar component is set to 1.0; otherwise returns false
.
sourcepub unsafe fn is_null(&self) -> bool
pub unsafe fn is_null(&self) -> bool
Returns true
if the x, y, z, and scalar components of this quaternion are set to 0.0; otherwise returns false
.
Calls C++ function: bool QQuaternion::isNull() const
.
Returns true
if the x, y, z, and scalar components of this quaternion are set to 0.0; otherwise returns false
.
sourcepub unsafe fn length(&self) -> c_float
pub unsafe fn length(&self) -> c_float
Returns the length of the quaternion. This is also called the "norm".
Calls C++ function: float QQuaternion::length() const
.
Returns the length of the quaternion. This is also called the “norm”.
See also lengthSquared(), normalized(), and dotProduct().
sourcepub unsafe fn length_squared(&self) -> c_float
pub unsafe fn length_squared(&self) -> c_float
Returns the squared length of the quaternion.
Calls C++ function: float QQuaternion::lengthSquared() const
.
Returns the squared length of the quaternion.
See also length() and dotProduct().
sourcepub unsafe fn mul_assign_float(&self, factor: c_float) -> Ref<QQuaternion>
pub unsafe fn mul_assign_float(&self, factor: c_float) -> Ref<QQuaternion>
Multiplies this quaternion's components by the given factor, and returns a reference to this quaternion.
Calls C++ function: QQuaternion& QQuaternion::operator*=(float factor)
.
Multiplies this quaternion’s components by the given factor, and returns a reference to this quaternion.
See also operator/=().
sourcepub unsafe fn mul_assign_q_quaternion(
&self,
quaternion: impl CastInto<Ref<QQuaternion>>
) -> Ref<QQuaternion>
pub unsafe fn mul_assign_q_quaternion( &self, quaternion: impl CastInto<Ref<QQuaternion>> ) -> Ref<QQuaternion>
Multiplies this quaternion by quaternion and returns a reference to this quaternion.
Calls C++ function: QQuaternion& QQuaternion::operator*=(const QQuaternion& quaternion)
.
Multiplies this quaternion by quaternion and returns a reference to this quaternion.
sourcepub unsafe fn neg(&self) -> CppBox<QQuaternion>
pub unsafe fn neg(&self) -> CppBox<QQuaternion>
Calls C++ function: QQuaternion operator-(const QQuaternion& quaternion)
.
sourcepub unsafe fn new_0a() -> CppBox<QQuaternion>
pub unsafe fn new_0a() -> CppBox<QQuaternion>
Constructs an identity quaternion (1, 0, 0, 0), i.e. with the vector (0, 0, 0) and scalar 1.
Calls C++ function: [constructor] void QQuaternion::QQuaternion()
.
Constructs an identity quaternion (1, 0, 0, 0), i.e. with the vector (0, 0, 0) and scalar 1.
sourcepub unsafe fn new_4a(
scalar: c_float,
xpos: c_float,
ypos: c_float,
zpos: c_float
) -> CppBox<QQuaternion>
pub unsafe fn new_4a( scalar: c_float, xpos: c_float, ypos: c_float, zpos: c_float ) -> CppBox<QQuaternion>
Constructs a quaternion with the vector (xpos, ypos, zpos) and scalar.
Calls C++ function: [constructor] void QQuaternion::QQuaternion(float scalar, float xpos, float ypos, float zpos)
.
Constructs a quaternion with the vector (xpos, ypos, zpos) and scalar.
sourcepub unsafe fn new_2a(
scalar: c_float,
vector: impl CastInto<Ref<QVector3D>>
) -> CppBox<QQuaternion>
pub unsafe fn new_2a( scalar: c_float, vector: impl CastInto<Ref<QVector3D>> ) -> CppBox<QQuaternion>
Constructs a quaternion vector from the specified vector and scalar.
Calls C++ function: [constructor] void QQuaternion::QQuaternion(float scalar, const QVector3D& vector)
.
sourcepub unsafe fn new_1a(
vector: impl CastInto<Ref<QVector4D>>
) -> CppBox<QQuaternion>
pub unsafe fn new_1a( vector: impl CastInto<Ref<QVector4D>> ) -> CppBox<QQuaternion>
Constructs a quaternion from the components of vector.
Calls C++ function: [constructor] void QQuaternion::QQuaternion(const QVector4D& vector)
.
Constructs a quaternion from the components of vector.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QQuaternion>>
) -> CppBox<QQuaternion>
pub unsafe fn new_copy( other: impl CastInto<Ref<QQuaternion>> ) -> CppBox<QQuaternion>
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Calls C++ function: [constructor] void QQuaternion::QQuaternion(const QQuaternion& other)
.
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Quaternions are used to represent rotations in 3D space, and consist of a 3D rotation axis specified by the x, y, and z coordinates, and a scalar representing the rotation angle.
sourcepub unsafe fn nlerp(
q1: impl CastInto<Ref<QQuaternion>>,
q2: impl CastInto<Ref<QQuaternion>>,
t: c_float
) -> CppBox<QQuaternion>
pub unsafe fn nlerp( q1: impl CastInto<Ref<QQuaternion>>, q2: impl CastInto<Ref<QQuaternion>>, t: c_float ) -> CppBox<QQuaternion>
Interpolates along the shortest linear path between the rotational positions q1 and q2. The value t should be between 0 and 1, indicating the distance to travel between q1 and q2. The result will be normalized().
Calls C++ function: static QQuaternion QQuaternion::nlerp(const QQuaternion& q1, const QQuaternion& q2, float t)
.
Interpolates along the shortest linear path between the rotational positions q1 and q2. The value t should be between 0 and 1, indicating the distance to travel between q1 and q2. The result will be normalized().
If t is less than or equal to 0, then q1 will be returned. If t is greater than or equal to 1, then q2 will be returned.
The nlerp() function is typically faster than slerp() and will give approximate results to spherical interpolation that are good enough for some applications.
See also slerp().
sourcepub unsafe fn normalize(&self)
pub unsafe fn normalize(&self)
Normalizes the current quaternion in place. Nothing happens if this is a null quaternion or the length of the quaternion is very close to 1.
Calls C++ function: void QQuaternion::normalize()
.
Normalizes the current quaternion in place. Nothing happens if this is a null quaternion or the length of the quaternion is very close to 1.
See also length() and normalized().
sourcepub unsafe fn normalized(&self) -> CppBox<QQuaternion>
pub unsafe fn normalized(&self) -> CppBox<QQuaternion>
Returns the normalized unit form of this quaternion.
Calls C++ function: QQuaternion QQuaternion::normalized() const
.
Returns the normalized unit form of this quaternion.
If this quaternion is null, then a null quaternion is returned. If the length of the quaternion is very close to 1, then the quaternion will be returned as-is. Otherwise the normalized form of the quaternion of length 1 will be returned.
See also normalize(), length(), and dotProduct().
sourcepub unsafe fn rotated_vector(
&self,
vector: impl CastInto<Ref<QVector3D>>
) -> CppBox<QVector3D>
pub unsafe fn rotated_vector( &self, vector: impl CastInto<Ref<QVector3D>> ) -> CppBox<QVector3D>
Rotates vector with this quaternion to produce a new vector in 3D space. The following code:
Calls C++ function: QVector3D QQuaternion::rotatedVector(const QVector3D& vector) const
.
Rotates vector with this quaternion to produce a new vector in 3D space. The following code:
QVector3D result = q.rotatedVector(vector);
is equivalent to the following:
QVector3D result = (q QQuaternion(0, vector) q.conjugated()).vector();
sourcepub unsafe fn rotation_to(
from: impl CastInto<Ref<QVector3D>>,
to: impl CastInto<Ref<QVector3D>>
) -> CppBox<QQuaternion>
pub unsafe fn rotation_to( from: impl CastInto<Ref<QVector3D>>, to: impl CastInto<Ref<QVector3D>> ) -> CppBox<QQuaternion>
Returns the shortest arc quaternion to rotate from the direction described by the vector from to the direction described by the vector to.
Calls C++ function: static QQuaternion QQuaternion::rotationTo(const QVector3D& from, const QVector3D& to)
.
Returns the shortest arc quaternion to rotate from the direction described by the vector from to the direction described by the vector to.
This function was introduced in Qt 5.5.
See also fromDirection().
sourcepub unsafe fn scalar(&self) -> c_float
pub unsafe fn scalar(&self) -> c_float
Returns the scalar component of this quaternion.
Calls C++ function: float QQuaternion::scalar() const
.
sourcepub unsafe fn set_scalar(&self, scalar: c_float)
pub unsafe fn set_scalar(&self, scalar: c_float)
Sets the scalar component of this quaternion to scalar.
Calls C++ function: void QQuaternion::setScalar(float scalar)
.
sourcepub unsafe fn set_vector_1a(&self, vector: impl CastInto<Ref<QVector3D>>)
pub unsafe fn set_vector_1a(&self, vector: impl CastInto<Ref<QVector3D>>)
Sets the vector component of this quaternion to vector.
Calls C++ function: void QQuaternion::setVector(const QVector3D& vector)
.
sourcepub unsafe fn set_vector_3a(&self, x: c_float, y: c_float, z: c_float)
pub unsafe fn set_vector_3a(&self, x: c_float, y: c_float, z: c_float)
Sets the vector component of this quaternion to (x, y, z).
Calls C++ function: void QQuaternion::setVector(float x, float y, float z)
.
sourcepub unsafe fn set_x(&self, x: c_float)
pub unsafe fn set_x(&self, x: c_float)
Sets the x coordinate of this quaternion's vector to the given x coordinate.
Calls C++ function: void QQuaternion::setX(float x)
.
sourcepub unsafe fn set_y(&self, y: c_float)
pub unsafe fn set_y(&self, y: c_float)
Sets the y coordinate of this quaternion's vector to the given y coordinate.
Calls C++ function: void QQuaternion::setY(float y)
.
sourcepub unsafe fn set_z(&self, z: c_float)
pub unsafe fn set_z(&self, z: c_float)
Sets the z coordinate of this quaternion's vector to the given z coordinate.
Calls C++ function: void QQuaternion::setZ(float z)
.
sourcepub unsafe fn slerp(
q1: impl CastInto<Ref<QQuaternion>>,
q2: impl CastInto<Ref<QQuaternion>>,
t: c_float
) -> CppBox<QQuaternion>
pub unsafe fn slerp( q1: impl CastInto<Ref<QQuaternion>>, q2: impl CastInto<Ref<QQuaternion>>, t: c_float ) -> CppBox<QQuaternion>
Interpolates along the shortest spherical path between the rotational positions q1 and q2. The value t should be between 0 and 1, indicating the spherical distance to travel between q1 and q2.
Calls C++ function: static QQuaternion QQuaternion::slerp(const QQuaternion& q1, const QQuaternion& q2, float t)
.
Interpolates along the shortest spherical path between the rotational positions q1 and q2. The value t should be between 0 and 1, indicating the spherical distance to travel between q1 and q2.
If t is less than or equal to 0, then q1 will be returned. If t is greater than or equal to 1, then q2 will be returned.
See also nlerp().
sourcepub unsafe fn sub_assign(
&self,
quaternion: impl CastInto<Ref<QQuaternion>>
) -> Ref<QQuaternion>
pub unsafe fn sub_assign( &self, quaternion: impl CastInto<Ref<QQuaternion>> ) -> Ref<QQuaternion>
Subtracts the given quaternion from this quaternion and returns a reference to this quaternion.
Calls C++ function: QQuaternion& QQuaternion::operator-=(const QQuaternion& quaternion)
.
Subtracts the given quaternion from this quaternion and returns a reference to this quaternion.
See also operator+=().
sourcepub unsafe fn to_euler_angles(&self) -> CppBox<QVector3D>
pub unsafe fn to_euler_angles(&self) -> CppBox<QVector3D>
This is an overloaded function.
Calls C++ function: QVector3D QQuaternion::toEulerAngles() const
.
This is an overloaded function.
Calculates roll, pitch, and yaw Euler angles (in degrees) that corresponds to this quaternion.
This function was introduced in Qt 5.5.
See also fromEulerAngles().
sourcepub unsafe fn to_q_variant(&self) -> CppBox<QVariant>
pub unsafe fn to_q_variant(&self) -> CppBox<QVariant>
sourcepub unsafe fn to_vector_4d(&self) -> CppBox<QVector4D>
pub unsafe fn to_vector_4d(&self) -> CppBox<QVector4D>
Returns this quaternion as a 4D vector.
Calls C++ function: QVector4D QQuaternion::toVector4D() const
.
Returns this quaternion as a 4D vector.
sourcepub unsafe fn vector(&self) -> CppBox<QVector3D>
pub unsafe fn vector(&self) -> CppBox<QVector3D>
Returns the vector component of this quaternion.
Calls C++ function: QVector3D QQuaternion::vector() const
.
sourcepub unsafe fn x(&self) -> c_float
pub unsafe fn x(&self) -> c_float
Returns the x coordinate of this quaternion's vector.
Calls C++ function: float QQuaternion::x() const
.
Trait Implementations§
source§impl Add<Ref<QQuaternion>> for &QQuaternion
impl Add<Ref<QQuaternion>> for &QQuaternion
source§fn add(self, q2: Ref<QQuaternion>) -> CppBox<QQuaternion>
fn add(self, q2: Ref<QQuaternion>) -> CppBox<QQuaternion>
Calls C++ function: QQuaternion operator+(const QQuaternion& q1, const QQuaternion& q2)
.
§type Output = CppBox<QQuaternion>
type Output = CppBox<QQuaternion>
+
operator.source§impl CppDeletable for QQuaternion
impl CppDeletable for QQuaternion
source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Calls C++ function: [destructor] void QQuaternion::~QQuaternion()
.
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Quaternions are used to represent rotations in 3D space, and consist of a 3D rotation axis specified by the x, y, and z coordinates, and a scalar representing the rotation angle.
source§impl Div<f32> for &QQuaternion
impl Div<f32> for &QQuaternion
source§fn div(self, divisor: c_float) -> CppBox<QQuaternion>
fn div(self, divisor: c_float) -> CppBox<QQuaternion>
Calls C++ function: QQuaternion operator/(const QQuaternion& quaternion, float divisor)
.
§type Output = CppBox<QQuaternion>
type Output = CppBox<QQuaternion>
/
operator.source§impl Mul<Ref<QQuaternion>> for &QQuaternion
impl Mul<Ref<QQuaternion>> for &QQuaternion
source§fn mul(self, q2: Ref<QQuaternion>) -> CppBox<QQuaternion>
fn mul(self, q2: Ref<QQuaternion>) -> CppBox<QQuaternion>
Calls C++ function: QQuaternion operator*(const QQuaternion& q1, const QQuaternion& q2)
.
§type Output = CppBox<QQuaternion>
type Output = CppBox<QQuaternion>
*
operator.source§impl Mul<f32> for &QQuaternion
impl Mul<f32> for &QQuaternion
source§fn mul(self, factor: c_float) -> CppBox<QQuaternion>
fn mul(self, factor: c_float) -> CppBox<QQuaternion>
Calls C++ function: QQuaternion operator*(const QQuaternion& quaternion, float factor)
.
§type Output = CppBox<QQuaternion>
type Output = CppBox<QQuaternion>
*
operator.source§impl PartialEq<Ref<QQuaternion>> for QQuaternion
impl PartialEq<Ref<QQuaternion>> for QQuaternion
source§fn eq(&self, q2: &Ref<QQuaternion>) -> bool
fn eq(&self, q2: &Ref<QQuaternion>) -> bool
Returns true
if page layout lhs is equal to page layout rhs, i.e. if all the attributes are exactly equal.
Calls C++ function: bool operator==(const QQuaternion& q1, const QQuaternion& q2)
.
Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(const QPageLayout &lhs, const QPageLayout &rhs)
:
Returns true
if page layout lhs is equal to page layout rhs, i.e. if all the attributes are exactly equal.
Note that this is a strict equality, especially for page size where the QPageSize ID, name and size must exactly match, and the margins where the units must match.
See also QPageLayout::isEquivalentTo().
source§impl Sub<Ref<QQuaternion>> for &QQuaternion
impl Sub<Ref<QQuaternion>> for &QQuaternion
source§fn sub(self, q2: Ref<QQuaternion>) -> CppBox<QQuaternion>
fn sub(self, q2: Ref<QQuaternion>) -> CppBox<QQuaternion>
Calls C++ function: QQuaternion operator-(const QQuaternion& q1, const QQuaternion& q2)
.
§type Output = CppBox<QQuaternion>
type Output = CppBox<QQuaternion>
-
operator.