3#ifndef GDK_GRAPHICS_EXT_ANIMATION_PROFILE_H
4#define GDK_GRAPHICS_EXT_ANIMATION_PROFILE_H
6#include <gdk/graphics/ext/animation/skeleton.h>
12namespace gdk::graphics::animation {
28 std::vector<role> roles;
34 [[nodiscard]]
const role *
find(std::string_view aName)
const;
41 [[nodiscard]]
int bone_for(std::string_view aRole)
const;
47 [[nodiscard]] std::size_t
placed()
const;
50 [[nodiscard]] std::size_t
bone_count()
const {
return m_BoneCount; }
61 std::vector<int> m_Bones;
63 std::size_t m_BoneCount = 0;
70 [[nodiscard]]
const rig_profile &humanoid_profile();
73 [[nodiscard]] std::vector<int> map_by_profile(
const rig_binding &aSource,
a profile resolved against one particular skeleton.
Definition profile.h:38
std::size_t placed() const
how many of the profile's roles this rig actually fills
rig_binding(rig_profile aProfile, std::vector< int > aBones, const std::size_t aBoneCount)
std::vector< std::size_t > ground_contact_bones() const
the bones filling the profile's ground contacts, skipping any the rig does not have
int bone_for(std::string_view aRole) const
the bone filling a role, or -1
std::size_t bone_count() const
how many bones the skeleton this was bound against has
Definition profile.h:50
std::vector< std::string > aliases
names a rig might use for this role instead.
Definition profile.h:22
std::string name
the canonical name, and what a mapping is keyed on
Definition profile.h:19
std::string mirror
the role this one mirrors to, or empty if it mirrors to itself.
Definition profile.h:25
const role * find(std::string_view aName) const
the role of that name, or nullptr
std::vector< std::string > ground_contacts
the roles that touch the ground, for foot planting.
Definition profile.h:31
std::string name
what this profile describes for messages. eg: "humanoid", "quadruped"
Definition profile.h:15
a chain of bones in bind pose.
Definition skeleton.h:16
a target's limits
Definition profile.h:18