#[repr(transparent)]pub struct Euler { /* private fields */ }
Expand description
Describe a rotation using Euler angles.
The contents of the Euler
structure are private
and should never be accessed directly.
Implementations§
source§impl Euler
impl Euler
pub fn as_ptr(&self) -> *mut graphene_euler_t
sourcepub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const graphene_euler_t) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const graphene_euler_t) -> &'a Self
Borrows the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow_mut<'a>(
ptr: *mut graphene_euler_t
) -> &'a mut Self
pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut graphene_euler_t ) -> &'a mut Self
Borrows the underlying C value mutably.
source§impl Euler
impl Euler
sourcepub fn order(&self) -> EulerOrder
pub fn order(&self) -> EulerOrder
Retrieves the order used to apply the rotations described in the
Euler
structure, when converting to and from other
structures, like Quaternion
and Matrix
.
This function does not return the EulerOrder::Default
enumeration value; it will return the effective order of rotation
instead.
Returns
the order used to apply the rotations
sourcepub fn reorder(&self, order: EulerOrder) -> Euler
pub fn reorder(&self, order: EulerOrder) -> Euler
sourcepub fn to_matrix(&self) -> Matrix
pub fn to_matrix(&self) -> Matrix
Converts a Euler
into a transformation matrix expressing
the extrinsic composition of rotations described by the Euler angles.
The rotations are applied over the reference frame axes in the order
associated with the Euler
; for instance, if the order
used to initialize self
is EulerOrder::Xyz
:
- the first rotation moves the body around the X axis with an angle φ
- the second rotation moves the body around the Y axis with an angle of ϑ
- the third rotation moves the body around the Z axis with an angle of ψ
The rotation sign convention is right-handed, to preserve compatibility between Euler-based, quaternion-based, and angle-axis-based rotations.
Returns
res
return location for a Matrix
sourcepub fn to_quaternion(&self) -> Quaternion
pub fn to_quaternion(&self) -> Quaternion
source§impl Euler
impl Euler
sourcepub fn from_matrix(m: Option<&Matrix>, order: EulerOrder) -> Self
pub fn from_matrix(m: Option<&Matrix>, order: EulerOrder) -> Self
sourcepub fn from_quaternion(q: Option<&Quaternion>, order: EulerOrder) -> Self
pub fn from_quaternion(q: Option<&Quaternion>, order: EulerOrder) -> Self
Initializes a Euler
using the given normalized quaternion.
If the Quaternion
q
is None
, the Euler
will
be initialized with all angles set to 0.
q
a normalized Quaternion
order
the order used to apply the rotations
Returns
the initialized Euler
sourcepub fn from_radians(x: f32, y: f32, z: f32, order: EulerOrder) -> Self
pub fn from_radians(x: f32, y: f32, z: f32, order: EulerOrder) -> Self
sourcepub fn from_vec3(v: Option<&Vec3>, order: EulerOrder) -> Self
pub fn from_vec3(v: Option<&Vec3>, order: EulerOrder) -> Self
sourcepub fn with_order(x: f32, y: f32, z: f32, order: EulerOrder) -> Self
pub fn with_order(x: f32, y: f32, z: f32, order: EulerOrder) -> Self
Trait Implementations§
source§impl HasParamSpec for Euler
impl HasParamSpec for Euler
source§impl PartialEq<Euler> for Euler
impl PartialEq<Euler> for Euler
source§impl StaticType for Euler
impl StaticType for Euler
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Copy for Euler
impl Eq for Euler
Auto Trait Implementations§
impl RefUnwindSafe for Euler
impl Send for Euler
impl Sync for Euler
impl Unpin for Euler
impl UnwindSafe for Euler
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
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> IntoClosureReturnValue for Twhere
T: Into<Value>,
impl<T> IntoClosureReturnValue for Twhere T: Into<Value>,
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere T: Send + ToValue + ?Sized,
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.