Skeletal Animation Multithread Face
Classes | Public Member Functions | Private Attributes | List of all members
AnimatedHand Class Reference

#include <animated_hand.h>

Classes

struct  EulerID
 
struct  HandMap
 

Public Member Functions

 AnimatedHand ()
 
std::vector< EulerIDget_hand_angles (const std::vector< double > &joint_angles)
 
std::vector< int > get_hand_idx_iterator (void)
 

Private Attributes

std::vector< HandMapm_hand_map
 
int m_hand_frames_num = 9
 
std::vector< int > m_hand_idx_iter = {0, 19, 11, 7, 16, 18, 5, 17, 8}
 

Detailed Description

Definition at line 9 of file animated_hand.h.

Constructor & Destructor Documentation

◆ AnimatedHand()

AnimatedHand::AnimatedHand ( )
inline

Definition at line 13 of file animated_hand.h.

13{};

Member Function Documentation

◆ get_hand_angles()

std::vector< AnimatedHand::EulerID > AnimatedHand::get_hand_angles ( const std::vector< double > &  joint_angles)

Definition at line 4 of file animated_hand.cpp.

6{
7 // Initialize eulerid
8 std::vector<AnimatedHand::EulerID> eul_id(m_hand_frames_num);
9
10 for (size_t i = 0; i < joint_angles.size(); i++)
11 {
12 // Get config i
13 auto config_i = m_hand_map.at(i);
14
15 // Set frame id
16 eul_id.at(config_i.frame_idx).frame_id = config_i.frame_id;
17
18 // Set euler angles
19 eul_id.at(config_i.frame_idx).euler_angles.at(config_i.rot_type) =
20 config_i.rot_dir * joint_angles.at(i);
21 }
22
23 return eul_id;
24}
std::vector< HandMap > m_hand_map
Definition: animated_hand.h:50
int m_hand_frames_num
Definition: animated_hand.h:66
Here is the caller graph for this function:

◆ get_hand_idx_iterator()

std::vector< int > AnimatedHand::get_hand_idx_iterator ( void  )
inline

Definition at line 46 of file animated_hand.h.

46{ return m_hand_idx_iter; }
std::vector< int > m_hand_idx_iter
Definition: animated_hand.h:69
Here is the caller graph for this function:

Member Data Documentation

◆ m_hand_frames_num

int AnimatedHand::m_hand_frames_num = 9
private

Definition at line 66 of file animated_hand.h.

◆ m_hand_idx_iter

std::vector<int> AnimatedHand::m_hand_idx_iter = {0, 19, 11, 7, 16, 18, 5, 17, 8}
private

Definition at line 69 of file animated_hand.h.

◆ m_hand_map

std::vector<HandMap> AnimatedHand::m_hand_map
private
Initial value:
{
HandMap{0, 0, 2, -1},
HandMap{0, 0, 0, 1},
HandMap{1, 19, 0, 1},
HandMap{2, 11, 0, 1},
HandMap{3, 7, 2, -1},
HandMap{3, 7, 0, 1},
HandMap{4, 16, 0, 1},
HandMap{5, 18, 0, 1},
HandMap{6, 5, 1, 1},
HandMap{6, 5, 0, 1},
HandMap{6, 5, 2, -1},
HandMap{7, 17, 2, -1},
HandMap{8, 8, 2, -1}}

Definition at line 50 of file animated_hand.h.


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