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
impl Joint
Sourcepub fn validate(&self) -> Result<()>
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.
Sourcepub fn transform_mut(&mut self) -> &mut Transform
pub fn transform_mut(&mut self) -> &mut Transform
Mutable access to the animated local transform.
Sourcepub fn set_orientation(&mut self, orientation: Quat) -> Result<()>
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.
Sourcepub fn orientation(&self) -> Quat
pub fn orientation(&self) -> Quat
Stored joint orientation.
Sourcepub fn set_scale_orientation(&mut self, orientation: Quat) -> Result<()>
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.
Sourcepub fn scale_orientation(&self) -> Quat
pub fn scale_orientation(&self) -> Quat
Stored scale orientation.
Sourcepub fn set_segment_scale_compensate(&mut self, enabled: bool)
pub fn set_segment_scale_compensate(&mut self, enabled: bool)
Enable or disable parent-scale compensation.
Sourcepub fn segment_scale_compensate(&self) -> bool
pub fn segment_scale_compensate(&self) -> bool
Whether parent-scale compensation applies.
Sourcepub fn set_rotation_order(&mut self, order: RotationOrder)
pub fn set_rotation_order(&mut self, order: RotationOrder)
Euler decomposition order retained as metadata.
Sourcepub fn rotation_order(&self) -> RotationOrder
pub fn rotation_order(&self) -> RotationOrder
Stored rotation order.
Sourcepub fn set_degrees_of_freedom(
&mut self,
degrees_of_freedom: JointDegreesOfFreedom,
)
pub fn set_degrees_of_freedom( &mut self, degrees_of_freedom: JointDegreesOfFreedom, )
Degrees-of-freedom flags.
Sourcepub fn degrees_of_freedom(&self) -> JointDegreesOfFreedom
pub fn degrees_of_freedom(&self) -> JointDegreesOfFreedom
Stored degrees-of-freedom flags.
Sourcepub fn set_rotation_limits(&mut self, limits: JointRotationLimits) -> Result<()>
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.
Sourcepub fn rotation_limits(&self) -> JointRotationLimits
pub fn rotation_limits(&self) -> JointRotationLimits
Stored rotation limits.
Sourcepub fn set_preferred_angles(&mut self, degrees: Vec3) -> Result<()>
pub fn set_preferred_angles(&mut self, degrees: Vec3) -> Result<()>
Sourcepub fn preferred_angles(&self) -> Vec3
pub fn preferred_angles(&self) -> Vec3
Stored preferred angles in degrees.
Sourcepub fn set_stiffness(&mut self, stiffness: Vec3) -> Result<()>
pub fn set_stiffness(&mut self, stiffness: Vec3) -> Result<()>
Sourcepub fn oriented_rotation(&self) -> Quat
pub fn oriented_rotation(&self) -> Quat
Animated rotation expressed in joint orientation space:
orientation * transform.rotation, normalized.
Sourcepub fn clamp_rotation_degrees(&self, degrees: Vec3) -> Result<Vec3>
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.
Sourcepub fn matrix(&self, parent_scale: Vec3) -> Result<Mat4>
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.