pub trait Quarternion:
Clone
+ Copy
+ Default
+ Debug
+ 'static {
type S: Scalar;
type Vec3: Vector3D<S = Self::S>;
type Vec4: Vector4D<S = Self::S>;
// Required methods
fn identity() -> Self;
fn from_rotation_arc(from: Self::Vec3, to: Self::Vec3) -> Self;
fn from_axis_angle(axis: Self::Vec3, angle: Self::S) -> Self;
fn axis_angle(&self) -> (Self::Vec3, Self::S);
fn vec4(&self) -> Self::Vec4;
}Expand description
Trait for quarternions.
Required Associated Types§
Required Methods§
Sourcefn from_rotation_arc(from: Self::Vec3, to: Self::Vec3) -> Self
fn from_rotation_arc(from: Self::Vec3, to: Self::Vec3) -> Self
Returns a rotation from a rotation arc.
Sourcefn from_axis_angle(axis: Self::Vec3, angle: Self::S) -> Self
fn from_axis_angle(axis: Self::Vec3, angle: Self::S) -> Self
Returns a rotation from an axis and an angle.
Sourcefn axis_angle(&self) -> (Self::Vec3, Self::S)
fn axis_angle(&self) -> (Self::Vec3, Self::S)
Returns the axis and angle of the rotation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.