Antkeeper
0.0.1
|
#include <ik-rig.hpp>
Public Member Functions | |
ik_rig (scene::skeletal_mesh &skeletal_mesh) | |
Constructs an IK rig. More... | |
const scene::skeletal_mesh & | get_skeletal_mesh () const noexcept |
Returns the skeleton with which the IK rig is associated. More... | |
scene::skeletal_mesh & | get_skeletal_mesh () noexcept |
Returns the skeleton with which the IK rig is associated. More... | |
Constraints | |
void | set_constraint (bone_index_type index, std::shared_ptr< ik_constraint > constraint) |
Sets the IK constraint of a bone. More... | |
void | clear_constraints () |
Removes all constraints from the IK rig. More... | |
const ik_constraint * | get_constraint (bone_index_type index) const |
Returns the IK constraint of a bone. More... | |
ik_constraint * | get_constraint (bone_index_type index) |
Sets the IK constraint of a bone. More... | |
Solvers | |
void | solve () |
Solves each solver in the IK rig. More... | |
void | add_solver (std::shared_ptr< ik_solver > solver) |
Adds a solver to the IK rig. More... | |
void | remove_solvers () |
Removes all solvers from the IK rig. More... | |
Definition at line 32 of file ik-rig.hpp.
|
explicit |
Constructs an IK rig.
skeletal_mesh | Skeletal mesh with which to associate the IK rig. |
Definition at line 22 of file ik-rig.cpp.
void ik_rig::add_solver | ( | std::shared_ptr< ik_solver > | solver | ) |
Adds a solver to the IK rig.
solver | IK solver to add. |
Definition at line 48 of file ik-rig.cpp.
void ik_rig::clear_constraints | ( | ) |
Removes all constraints from the IK rig.
Definition at line 32 of file ik-rig.cpp.
|
inline |
Sets the IK constraint of a bone.
index | Index of a bone. |
constraint | IK constraint of the bone. |
Definition at line 80 of file ik-rig.hpp.
|
inline |
Returns the IK constraint of a bone.
index | Index of a bone. |
nullptr
if the bone is unconstrained. Definition at line 76 of file ik-rig.hpp.
|
inlinenoexcept |
Returns the skeleton with which the IK rig is associated.
Definition at line 44 of file ik-rig.hpp.
|
inlinenoexcept |
Returns the skeleton with which the IK rig is associated.
Definition at line 48 of file ik-rig.hpp.
void ik_rig::remove_solvers | ( | ) |
Removes all solvers from the IK rig.
Definition at line 53 of file ik-rig.cpp.
void ik_rig::set_constraint | ( | bone_index_type | index, |
std::shared_ptr< ik_constraint > | constraint | ||
) |
Sets the IK constraint of a bone.
index | Index of a bone. |
constraint | IK constraint of the bone. |
Definition at line 27 of file ik-rig.cpp.
void ik_rig::solve | ( | ) |
Solves each solver in the IK rig.
Definition at line 40 of file ik-rig.cpp.