20 #ifndef ANTKEEPER_ANIMATION_IK_RIG_HPP
21 #define ANTKEEPER_ANIMATION_IK_RIG_HPP
46 return *m_skeletal_mesh;
50 return *m_skeletal_mesh;
78 return m_constraints[index].get();
82 return m_constraints[index].get();
101 void add_solver(std::shared_ptr<ik_solver> solver);
112 std::vector<std::shared_ptr<ik_constraint>> m_constraints;
113 std::vector<std::shared_ptr<ik_solver>> m_solvers;
std::uint16_t bone_index_type
Bone index type.
Abstract base class for IK joint constraints.
scene::skeletal_mesh & get_skeletal_mesh() noexcept
Returns the skeleton with which the IK rig is associated.
void clear_constraints()
Removes all constraints from the IK rig.
void remove_solvers()
Removes all solvers from the IK rig.
ik_constraint * get_constraint(bone_index_type index)
Sets the IK constraint of a bone.
const ik_constraint * get_constraint(bone_index_type index) const
Returns the IK constraint of a bone.
const scene::skeletal_mesh & get_skeletal_mesh() const noexcept
Returns the skeleton with which the IK rig is associated.
void add_solver(std::shared_ptr< ik_solver > solver)
Adds a solver to the IK rig.
void solve()
Solves each solver in the IK rig.
void set_constraint(bone_index_type index, std::shared_ptr< ik_constraint > constraint)
Sets the IK constraint of a bone.
ik_rig(scene::skeletal_mesh &skeletal_mesh)
Constructs an IK rig.