pub struct BoneRigger {
pub skeleton: BoneSkeleton,
pub mode: RiggerMode,
pub selected: Option<BoneId>,
pub hovered: Option<BoneId>,
pub show_axes: bool,
pub show_envelopes: bool,
pub show_ik: bool,
pub show_weights: bool,
pub mirror_x: bool,
pub degrees_mode: bool,
pub pending_name: String,
pub pending_role: BoneRole,
/* private fields */
}Expand description
Full bone rigging tool state.
Fields§
§skeleton: BoneSkeleton§mode: RiggerMode§selected: Option<BoneId>§hovered: Option<BoneId>§show_axes: boolWhether to show bone axes gizmos.
show_envelopes: boolWhether to show envelope capsules.
show_ik: boolWhether to show IK target spheres.
show_weights: boolWhether to show weight colours on surface.
mirror_x: boolWhether X-axis mirror mode is on (mirrors bone placement).
degrees_mode: boolDisplay roll angle in degrees vs radians.
pending_name: StringCurrent pending bone name for placement.
pending_role: BoneRoleCurrent pending bone role.
Implementations§
Source§impl BoneRigger
impl BoneRigger
pub fn new() -> Self
Sourcepub fn surface_click(&mut self, surface_p: Vec3)
pub fn surface_click(&mut self, surface_p: Vec3)
User clicks on the SDF surface — advance the placement state machine.
pub fn select_nearest( &mut self, ray_origin: Vec3, ray_dir: Vec3, ) -> Option<BoneId>
pub fn undo(&mut self)
pub fn status_line(&self) -> String
Trait Implementations§
Source§impl Debug for BoneRigger
impl Debug for BoneRigger
Auto Trait Implementations§
impl Freeze for BoneRigger
impl RefUnwindSafe for BoneRigger
impl Send for BoneRigger
impl Sync for BoneRigger
impl Unpin for BoneRigger
impl UnsafeUnpin for BoneRigger
impl UnwindSafe for BoneRigger
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.