Struct euler::DQuat [−][src]
Double-precision quaternion.
Fields
x: f64
y: f64
z: f64
s: f64
Methods
impl DQuat
[src]
impl DQuat
pub fn new(x: f64, y: f64, z: f64, s: f64) -> Self
[src]
pub fn new(x: f64, y: f64, z: f64, s: f64) -> Self
Full constructor.
pub fn identity() -> Self
[src]
pub fn identity() -> Self
Identity constructor.
pub fn euler(angles: DVec3) -> Self
[src]
pub fn euler(angles: DVec3) -> Self
Constructor for a rotation defined by a set of Euler angles
The rotation order is Z, then X, then Y. From the point of the
object, this is equivalent to a yaw in angles.y
, a pitch in
angles.x
, and a roll in angles.z
.
pub fn axis_angle(axis: DVec3, angle: f64) -> Self
[src]
pub fn axis_angle(axis: DVec3, angle: f64) -> Self
Constructor for a rotation around axis
by angle
radians.
axis
need not be normalized.
pub fn rotate(&self, vector: DVec3) -> DVec3
[src]
pub fn rotate(&self, vector: DVec3) -> DVec3
Return the application of the rotation represented by this quaternion to the vector argument.
Trait Implementations
impl Clone for DQuat
[src]
impl Clone for DQuat
fn clone(&self) -> DQuat
[src]
fn clone(&self) -> DQuat
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for DQuat
[src]
impl Copy for DQuat
impl Debug for DQuat
[src]
impl Debug for DQuat
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for DQuat
[src]
impl PartialEq for DQuat
fn eq(&self, other: &DQuat) -> bool
[src]
fn eq(&self, other: &DQuat) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &DQuat) -> bool
[src]
fn ne(&self, other: &DQuat) -> bool
This method tests for !=
.
impl Display for DQuat
[src]
impl Display for DQuat
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Mul<DQuat> for DQuat
[src]
impl Mul<DQuat> for DQuat
type Output = DQuat
The resulting type after applying the *
operator.
fn mul(self, rhs: DQuat) -> DQuat
[src]
fn mul(self, rhs: DQuat) -> DQuat
Performs the *
operation.
impl MulAssign<DQuat> for DQuat
[src]
impl MulAssign<DQuat> for DQuat
fn mul_assign(&mut self, rhs: DQuat)
[src]
fn mul_assign(&mut self, rhs: DQuat)
Performs the *=
operation.
impl Default for DQuat
[src]
impl Default for DQuat
impl AsRef<[f64; 4]> for DQuat
[src]
impl AsRef<[f64; 4]> for DQuat
impl From<[f64; 4]> for DQuat
[src]
impl From<[f64; 4]> for DQuat
impl Into<[f64; 4]> for DQuat
[src]
impl Into<[f64; 4]> for DQuat
impl ApproxEq for DQuat
[src]
impl ApproxEq for DQuat
type Epsilon = <Quaternion<f64> as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
[src]
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.