Antkeeper
0.0.1
|
Cyclic Coordinate Descent (CCD) IK solver. More...
#include <ccd-ik-solver.hpp>
Public Member Functions | |
ccd_ik_solver (ik_rig &ik_rig, bone_index_type root_bone_index, bone_index_type effector_bone_index) | |
Constructs a CCD IK solver. More... | |
Solving | |
void | solve () override |
Sets the maximum number of solving iterations. More... | |
void | set_max_iterations (std::size_t iterations) noexcept |
Sets the maximum number of solving iterations. More... | |
std::size_t | get_max_iterations () const noexcept |
Returns the maximum number of solving iterations. More... | |
Effector | |
void | set_effector_position (const math::fvec3 &position) noexcept |
Sets the position of the end effector. More... | |
const math::fvec3 & | get_effector_position () const |
Returns the position of the end effector, relative to the tip bone. More... | |
Goal | |
void | set_goal_center (const math::fvec3 ¢er) noexcept |
Sets the center of the IK goal. More... | |
void | set_goal_radius (float radius) noexcept |
Sets the radius of the IK goal. More... | |
const math::fvec3 & | get_goal_center () const |
Returns the center of the IK goal, in world-space. More... | |
Cyclic Coordinate Descent (CCD) IK solver.
Definition at line 32 of file ccd-ik-solver.hpp.
ccd_ik_solver::ccd_ik_solver | ( | ik_rig & | ik_rig, |
bone_index_type | root_bone_index, | ||
bone_index_type | effector_bone_index | ||
) |
Constructs a CCD IK solver.
ik_rig | IK rig with which to associate this IK solver. |
root_bone_index | Index of the first bone in the bone chain. |
effector_bone_index | Index of the last bone in the bone chain. |
chain_length | Number of bones in the IK chain. |
Definition at line 25 of file ccd-ik-solver.cpp.
|
inline |
Returns the position of the end effector, relative to the tip bone.
Definition at line 82 of file ccd-ik-solver.hpp.
|
inline |
Returns the center of the IK goal, in world-space.
Definition at line 113 of file ccd-ik-solver.hpp.
|
inlinenoexcept |
Returns the maximum number of solving iterations.
Definition at line 61 of file ccd-ik-solver.hpp.
|
inlinenoexcept |
Sets the position of the end effector.
position | Position of the end effector, relative to the tip bone. |
Definition at line 76 of file ccd-ik-solver.hpp.
|
inlinenoexcept |
Sets the center of the IK goal.
center | IK goal center, in world-space. |
Definition at line 97 of file ccd-ik-solver.hpp.
|
inlinenoexcept |
Sets the radius of the IK goal.
radius | IK goal radius. |
Definition at line 107 of file ccd-ik-solver.hpp.
|
inlinenoexcept |
Sets the maximum number of solving iterations.
iterations | Maximum number of solving iterations. |
Definition at line 55 of file ccd-ik-solver.hpp.
|
overridevirtual |
Sets the maximum number of solving iterations.
iterations | Maximum number of solving iterations. |
Implements ik_solver.
Definition at line 53 of file ccd-ik-solver.cpp.