pub struct DQuat {
pub r: f64,
pub i: f64,
pub j: f64,
pub k: f64,
}
Expand description
a 4 part double vector often used to represent rotations. note that multiplication of quaternions is applying transformations
Fields§
§r: f64
§i: f64
§j: f64
§k: f64
Implementations§
Source§impl DQuat
impl DQuat
pub const IDENTITY: DQuat
Sourcepub fn from_x_rot(angle: f64) -> DQuat
pub fn from_x_rot(angle: f64) -> DQuat
rotation around the x axis in radians
Sourcepub fn from_y_rot(angle: f64) -> DQuat
pub fn from_y_rot(angle: f64) -> DQuat
rotation around the y axis in radians
Sourcepub fn from_z_rot(angle: f64) -> DQuat
pub fn from_z_rot(angle: f64) -> DQuat
rotation around the z axis in radians
Sourcepub fn from_axis_rot(angle: f64, axis: DVec3) -> DQuat
pub fn from_axis_rot(angle: f64, axis: DVec3) -> DQuat
rotation around the inputed axis in radians
Trait Implementations§
Source§impl AddAssign for DQuat
impl AddAssign for DQuat
Source§fn add_assign(&mut self, rhs: DQuat)
fn add_assign(&mut self, rhs: DQuat)
Performs the
+=
operation. Read moreSource§impl DivAssign<f64> for DQuat
impl DivAssign<f64> for DQuat
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/=
operation. Read moreSource§impl DivAssign for DQuat
impl DivAssign for DQuat
Source§fn div_assign(&mut self, rhs: DQuat)
fn div_assign(&mut self, rhs: DQuat)
Performs the
/=
operation. Read moreSource§impl MulAssign<f64> for DQuat
impl MulAssign<f64> for DQuat
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*=
operation. Read moreSource§impl MulAssign for DQuat
impl MulAssign for DQuat
Source§fn mul_assign(&mut self, rhs: DQuat)
fn mul_assign(&mut self, rhs: DQuat)
Performs the
*=
operation. Read moreSource§impl RemAssign<f64> for DQuat
impl RemAssign<f64> for DQuat
Source§fn rem_assign(&mut self, rhs: f64)
fn rem_assign(&mut self, rhs: f64)
Performs the
%=
operation. Read moreSource§impl SubAssign for DQuat
impl SubAssign for DQuat
Source§fn sub_assign(&mut self, rhs: DQuat)
fn sub_assign(&mut self, rhs: DQuat)
Performs the
-=
operation. Read moreimpl Copy for DQuat
impl StructuralPartialEq for DQuat
Auto Trait Implementations§
impl Freeze for DQuat
impl RefUnwindSafe for DQuat
impl Send for DQuat
impl Sync for DQuat
impl Unpin for DQuat
impl UnwindSafe for DQuat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
Source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
Prepares an output buffer, then turns this buffer into an
Owned
.
User-provided closure F
must only write to and not read from &mut Self
.Source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
Source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
Source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.