Skip to main content

Joint

Struct Joint 

Source
pub struct Joint { /* private fields */ }
Expand description

Locked skeletal-joint transform value.

Donor: oa::Joint. Setters that the donor guards with contract aborts return Result here instead.

Implementations§

Source§

impl Joint

Source

pub fn validate(&self) -> Result<()>

Validate the complete authoring state.

§Errors

Returns an error for a non-finite transform or orientation, an inverted enabled limit pair, non-finite preferred angles, or non-finite/negative stiffness.

Source

pub fn transform(&self) -> &Transform

Animated local transform.

Source

pub fn transform_mut(&mut self) -> &mut Transform

Mutable access to the animated local transform.

Source

pub fn set_orientation(&mut self, orientation: Quat) -> Result<()>

Joint orientation (Maya jointOrient); normalized on assignment.

§Errors

Returns an error for a non-finite or zero quaternion.

Source

pub fn orientation(&self) -> Quat

Stored joint orientation.

Source

pub fn set_scale_orientation(&mut self, orientation: Quat) -> Result<()>

Scale orientation (Maya rotateAxis); normalized on assignment.

§Errors

Returns an error for a non-finite or zero quaternion.

Source

pub fn scale_orientation(&self) -> Quat

Stored scale orientation.

Source

pub fn set_segment_scale_compensate(&mut self, enabled: bool)

Enable or disable parent-scale compensation.

Source

pub fn segment_scale_compensate(&self) -> bool

Whether parent-scale compensation applies.

Source

pub fn set_rotation_order(&mut self, order: RotationOrder)

Euler decomposition order retained as metadata.

Source

pub fn rotation_order(&self) -> RotationOrder

Stored rotation order.

Source

pub fn set_degrees_of_freedom( &mut self, degrees_of_freedom: JointDegreesOfFreedom, )

Degrees-of-freedom flags.

Source

pub fn degrees_of_freedom(&self) -> JointDegreesOfFreedom

Stored degrees-of-freedom flags.

Source

pub fn set_rotation_limits(&mut self, limits: JointRotationLimits) -> Result<()>

Rotation limits in degrees.

§Errors

Returns an error for non-finite bounds or an axis whose enabled minimum exceeds its enabled maximum.

Source

pub fn rotation_limits(&self) -> JointRotationLimits

Stored rotation limits.

Source

pub fn set_preferred_angles(&mut self, degrees: Vec3) -> Result<()>

Preferred rest angles in degrees.

§Errors

Returns an error for non-finite angles.

Source

pub fn preferred_angles(&self) -> Vec3

Stored preferred angles in degrees.

Source

pub fn set_stiffness(&mut self, stiffness: Vec3) -> Result<()>

Per-axis stiffness in [0, ∞).

§Errors

Returns an error for non-finite or negative stiffness.

Source

pub fn stiffness(&self) -> Vec3

Stored stiffness.

Source

pub fn oriented_rotation(&self) -> Quat

Animated rotation expressed in joint orientation space: orientation * transform.rotation, normalized.

Source

pub fn clamp_rotation_degrees(&self, degrees: Vec3) -> Result<Vec3>

Clamp rotation angles in degrees to the enabled limits.

§Errors

Returns an error for non-finite input.

Source

pub fn matrix(&self, parent_scale: Vec3) -> Result<Mat4>

Compose the joint matrix in Maya factor order: S*Shear * SO * R * O * P^-1 * T under the row-vector convention.

When segment-scale compensation is enabled, parent_scale must be finite and non-zero on every axis.

§Errors

Returns an error when the joint state is invalid, parent_scale is non-finite, or compensation needs a zero parent-scale axis.

Trait Implementations§

Source§

impl Clone for Joint

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Joint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Joint

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<Transform> for Joint

Source§

fn from(transform: Transform) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Joint

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Joint

Auto Trait Implementations§

§

impl Forget for Joint

§

impl Freeze for Joint

§

impl Move for Joint

§

impl RefUnwindSafe for Joint

§

impl Send for Joint

§

impl Sync for Joint

§

impl Unpin for Joint

§

impl UnsafeUnpin for Joint

§

impl UnwindSafe for Joint

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.