Skeletal Animation Multithread Face
|
#include <hand.h>
Classes | |
struct | PngImage |
Public Member Functions | |
Hand (Exoskeleton *exo_handler, AnimatedHand *anim_hand, const std::string &mesh_name, const std::string &graph_name, const std::string &texture_name, bool type, const Eigen::Vector3d &origin) | |
Constructor. More... | |
void | update (const std::vector< AnimatedHand::EulerID > &euler_id) |
Updates the hand. More... | |
Eigen::MatrixXd | get_vertices (void) |
Returns the vertices of the hand. More... | |
Eigen::MatrixXi | get_surface_indices (void) |
Private Attributes | |
Eigen::MatrixXd | m_vol_mesh_vert |
Volume mesh Vertices (V) More... | |
Eigen::MatrixXd | m_vol_mesh_vert_init |
Eigen::MatrixXi | m_tetr_indices |
Volume mesh tetrahedral indices(T) and surface element indices(F) More... | |
Eigen::MatrixXi | m_surf_indices |
Eigen::MatrixXi | m_bone_edges_indices |
Bone-edges skeleton indices (BE) More... | |
Eigen::VectorXi | m_point_handles |
Point handles list (P) More... | |
Eigen::MatrixXd | m_vertex_pos |
List of vertex positions (C) More... | |
Eigen::VectorXi | m_boundary_indices |
List of boundary indices (b) More... | |
Eigen::MatrixXd | m_boundary_conditions |
List of boundary conditions of each weight function (bc) More... | |
igl::BBWData | m_bbw_data |
BBW weights matrix (bbw_data) More... | |
Eigen::MatrixXd | m_weights |
List of weights (W) More... | |
Eigen::MatrixXd | m_g_weights |
Global weights (M) More... | |
Exoskeleton * | m_exo_handler |
Exoskeleton handler pointer. More... | |
AnimatedHand * | m_anim_hand |
Animated hand pointer. More... | |
std::vector< int > | m_hand_idx_iter |
Hand index iterator. More... | |
RotationList | m_anim_pose |
Animation pose. More... | |
int | m_pose_size = 20 |
Pose size. More... | |
PngImage | m_texture |
Texture image. More... | |
bool | m_hand_type |
Hand type. More... | |
Eigen::Vector3d | m_origin |
Hand origin. More... | |
Class Hand.
This class defines the hand and performs all the kinematics and the skinning of the hand. For this it uses the tecnique of Bounded Biharmonic Weights (BBW). See https://www.youtube.com/watch?v=P9fqm8vgdB8&ab_channel=AlecJacobson. libigl exposes a lot of functions for doing this. See https://github.com/libigl/libigl/blob/main/tutorial/403_BoundedBiharmonicWeights/main.cpp.
Hand::Hand | ( | Exoskeleton * | exo_handler, |
AnimatedHand * | anim_hand, | ||
const std::string & | mesh_name, | ||
const std::string & | graph_name, | ||
const std::string & | texture_name, | ||
bool | type, | ||
const Eigen::Vector3d & | origin | ||
) |
Constructor.
Construct a new Hand:: Hand object.
exo_handler | Pointer to the Exoskeleton object. |
anim_hand | Pointer to the AnimatedHand object. |
mesh_name | The name of the mesh file. |
graph_name | The name of the graph file (contains the conections between the bones aka the kinematic model). |
texture_name | The name of the texture file. |
type | Bool the define whether the hand is left(0) or right(1). |
origin | The origin of the hand. |
Definition at line 15 of file hand.cpp.
|
inline |
|
inline |
void Hand::update | ( | const std::vector< AnimatedHand::EulerID > & | euler_id | ) |
Updates the hand.
It updates the hand vertices based on the euler angles for its skeleton joints. These are fed throught the AnimatedHand::EulerID struct. Based on the defined mapping it performs the forward kinematics and calcualtes all the hand vertices.
euler_id | The custom EulerID structure as described in AnimatedHand::EulerID. |
Definition at line 87 of file hand.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Exoskeleton handler pointer.
|
private |
|
private |
|
private |
|
private |
|
private |