Skip to main content

Module bone_rigger

Module bone_rigger 

Source
Expand description

Bone Rigger — click-to-place bone anchors on the SDF surface and define joint hierarchies for skeletal animation.

§Overview

The rigger owns a BoneSkeleton — a flat list of BoneDesc values wired into a tree through parent–child relationships. Each bone has:

  • a head and tail in object space (placed by clicking on the SDF surface)
  • a roll angle around the bone’s Y axis
  • optional weight envelope (capsule) parameters that control how much each surface particle is influenced by this bone
  • FK and IK flags

§Interaction flow

  1. User enters PlacingHead mode; clicks on the SDF surface → sets head.
  2. User clicks again → sets tail, finalises bone and enters Idle.
  3. With a bone selected, user can parent it to another bone.
  4. BoneSkeleton::bind_weights computes per-particle skinning weights from the envelope capsules using a dual-quaternion weighting scheme.

§IK chains

IkChain represents a chain of bones from a root to an effector tip. IkChain::solve_ccd runs the Cyclic Coordinate Descent algorithm for n iterations, pulling the tip toward the target.

Structs§

BoneConstraint
Rotation limits for a joint.
BoneDesc
Descriptor for a single bone in the skeleton.
BoneId
BoneRigger
Full bone rigging tool state.
BoneSkeleton
The full skeleton — flat map of bones plus hierarchy helpers.
IkChain
A chain of bone IDs from root to tip used for IK solving.
SkinWeight
Up to 4 bone influences per surface point.

Enums§

BoneRole
Semantic role of a bone, used by the auto-rigger.
RiggerMode