Antkeeper  0.0.1
Public Member Functions | List of all members
ik_rig Class Reference

#include <ik-rig.hpp>

Public Member Functions

 ik_rig (scene::skeletal_mesh &skeletal_mesh)
 Constructs an IK rig. More...
 
const scene::skeletal_meshget_skeletal_mesh () const noexcept
 Returns the skeleton with which the IK rig is associated. More...
 
scene::skeletal_meshget_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_constraintget_constraint (bone_index_type index) const
 Returns the IK constraint of a bone. More...
 
ik_constraintget_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...
 

Detailed Description

Definition at line 32 of file ik-rig.hpp.

Constructor & Destructor Documentation

◆ ik_rig()

ik_rig::ik_rig ( scene::skeletal_mesh skeletal_mesh)
explicit

Constructs an IK rig.

Parameters
skeletal_meshSkeletal mesh with which to associate the IK rig.

Definition at line 22 of file ik-rig.cpp.

Member Function Documentation

◆ add_solver()

void ik_rig::add_solver ( std::shared_ptr< ik_solver solver)

Adds a solver to the IK rig.

Parameters
solverIK solver to add.

Definition at line 48 of file ik-rig.cpp.

◆ clear_constraints()

void ik_rig::clear_constraints ( )

Removes all constraints from the IK rig.

Definition at line 32 of file ik-rig.cpp.

◆ get_constraint() [1/2]

ik_constraint* ik_rig::get_constraint ( bone_index_type  index)
inline

Sets the IK constraint of a bone.

Parameters
indexIndex of a bone.
constraintIK constraint of the bone.

Definition at line 80 of file ik-rig.hpp.

◆ get_constraint() [2/2]

const ik_constraint* ik_rig::get_constraint ( bone_index_type  index) const
inline

Returns the IK constraint of a bone.

Parameters
indexIndex of a bone.
Returns
Pointer to the IK constraint of the bone, or nullptr if the bone is unconstrained.

Definition at line 76 of file ik-rig.hpp.

◆ get_skeletal_mesh() [1/2]

const scene::skeletal_mesh& ik_rig::get_skeletal_mesh ( ) const
inlinenoexcept

Returns the skeleton with which the IK rig is associated.

Definition at line 44 of file ik-rig.hpp.

◆ get_skeletal_mesh() [2/2]

scene::skeletal_mesh& ik_rig::get_skeletal_mesh ( )
inlinenoexcept

Returns the skeleton with which the IK rig is associated.

Definition at line 48 of file ik-rig.hpp.

◆ remove_solvers()

void ik_rig::remove_solvers ( )

Removes all solvers from the IK rig.

Definition at line 53 of file ik-rig.cpp.

◆ set_constraint()

void ik_rig::set_constraint ( bone_index_type  index,
std::shared_ptr< ik_constraint constraint 
)

Sets the IK constraint of a bone.

Parameters
indexIndex of a bone.
constraintIK constraint of the bone.

Definition at line 27 of file ik-rig.cpp.

◆ solve()

void ik_rig::solve ( )

Solves each solver in the IK rig.

Definition at line 40 of file ik-rig.cpp.


The documentation for this class was generated from the following files: