SkeletonHelper
SkeletonHelper ⟵ Object3D
A helper class for visualizing entire skeletons with bone
helpers.
SkeletonHelper creates a visual representation of an entire skeleton
using BoneHelper objects for each bone.
This provides a complete visualization of the bone hierarchy similar to
3D modeling software like 3ds Max, Blender, etc.
Methods
SkeletonHelper(Skeleton* skeleton, f32 boneSize, const Color& rootColor, const Color& childColor)
Constructor with skeleton and visualization parameters
| skeleton | Skeleton to visualize | nullptr |
| boneSize | Size of bone octahedrons | 0.3f |
| rootColor | Color for root bones | 0xFF0000FF |
| childColor | Color for child bones | 0x00FF00FF |
void setSkeleton(Skeleton* skeleton)
Sets the skeleton to visualize
| skeleton | Skeleton to visualize |
Skeleton* getSkeleton() const
Gets the skeleton being visualized
void setBoneSize(f32 size)
Sets the size of all bone octahedrons
| size | Size of bone octahedrons |
f32 getBoneSize() const
Gets the size of bone octahedrons
void setRootColor(const Color& color)
Sets the color for root bones
| color | Color for root bones |
Color getRootColor() const
Gets the color for root bones
void setChildColor(const Color& color)
Sets the color for child bones
| color | Color for child bones |
Color getChildColor() const
Gets the color for child bones
void update()
Updates all bone helpers to match the skeleton's current state
void rebuild()
Rebuilds the bone helper hierarchy from the skeleton
BoneHelper* getBoneHelper(Bone* bone) const
Gets the bone helper for a specific bone
| bone | Bone to find helper for |
vector<BoneHelper*> getBoneHelpers() const
Gets all bone helpers
virtual Object3D* clone(bool recursive = true) const override
Creates a copy of this skeleton helper
| recursive | Whether to clone children |
virtual void copy(const Object3D& object, bool recursive = true) override
Copies properties from another object
| object | Source object to copy from | |
| recursive | Whether to copy children |
Properties
| enabled | bool | Active/inactive |
| id | u32 | Unique identifier |
| isSkeletonHelper | bool | Read-only tag |
| name | string | Optional display name |
| uuid | string | UUID string |
| version | u32 | Bumps on change |