Struct rusty_spine::TransformConstraintData
source · pub struct TransformConstraintData { /* private fields */ }
Expand description
Stores the setup pose for a TransformConstraint
.
Implementations§
source§impl TransformConstraintData
impl TransformConstraintData
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The constraint’s name, which is unique across all constraints in the skeleton of the same type.
sourcepub fn order(&self) -> i32
pub fn order(&self) -> i32
The ordinal of this constraint for the order a skeleton’s constraints will be applied by
Skeleton::update_world_transform
.
sourcepub fn skin_required(&self) -> bool
pub fn skin_required(&self) -> bool
When true,
Skeleton::update_world_transform
only
updates this constraint if the skin contains this constraint.
pub fn local(&self) -> bool
sourcepub fn mix_rotate(&self) -> f32
pub fn mix_rotate(&self) -> f32
A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.
sourcepub fn mix_scale_x(&self) -> f32
pub fn mix_scale_x(&self) -> f32
A percentage (0-1) that controls the mix between the constrained and unconstrained scale X.
sourcepub fn mix_scale_y(&self) -> f32
pub fn mix_scale_y(&self) -> f32
A percentage (0-1) that controls the mix between the constrained and unconstrained scale Y.
sourcepub fn mix_shear_y(&self) -> f32
pub fn mix_shear_y(&self) -> f32
A percentage (0-1) that controls the mix between the constrained and unconstrained shear Y.
sourcepub fn mix_x(&self) -> f32
pub fn mix_x(&self) -> f32
A percentage (0-1) that controls the mix between the constrained and unconstrained translation X.
sourcepub fn mix_y(&self) -> f32
pub fn mix_y(&self) -> f32
A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y.
sourcepub fn offset_rotation(&self) -> f32
pub fn offset_rotation(&self) -> f32
An offset added to the constrained bone rotation.
sourcepub fn offset_scale_x(&self) -> f32
pub fn offset_scale_x(&self) -> f32
An offset added to the constrained bone scale X.
sourcepub fn offset_scale_y(&self) -> f32
pub fn offset_scale_y(&self) -> f32
An offset added to the constrained bone scale Y.
sourcepub fn offset_shear_y(&self) -> f32
pub fn offset_shear_y(&self) -> f32
An offset added to the constrained bone shear Y.
pub fn relative(&self) -> bool
pub fn bones_count(&self) -> usize
pub fn bones( &self ) -> CTmpPtrIterator<'_, TransformConstraintData, BoneData, spBoneData> ⓘ
pub fn bone_at_index(&self, index: usize) -> Option<CTmpRef<'_, Self, BoneData>>
sourcepub fn target(&self) -> CTmpRef<'_, Self, BoneData>
pub fn target(&self) -> CTmpRef<'_, Self, BoneData>
The target bone whose world transform will be copied to the constrained bones.
sourcepub const fn c_ptr(&self) -> *mut spTransformConstraintData
pub const fn c_ptr(&self) -> *mut spTransformConstraintData
Get a pointer to the underlying spine-c
type.