(self, quat)
return self.verts.copy()
Set absolute (global) rotation for the hand.

    Parameters
    ----------
    quat : np.ndarray, shape [J, 4]
      Absolute rotations for each joint in quaternion.

    Returns
    -------
    np.ndarray, shape [V, 3]
      Mesh vertices after posing.
Set absolute (global) rotation for the hand.
Set absolute ( global ) rotation for the hand .
def set_abs_quat(self, quat):
    """
    Set absolute (global) rotation for the hand.

    Parameters
    ----------
    quat : np.ndarray, shape [J, 4]
      Absolute rotations for each joint in quaternion.

    Returns
    -------
    np.ndarray, shape [V, 3]
      Mesh vertices after posing.
    """
    mats = []
    for j in range(MANOHandJoints.n_joints):
      mats.append(quat2mat(quat[j]))
    mats = np.stack(mats, 0)

    pose = np.matmul(mats, self.ref_pose)
    joint_xyz = [None] * MANOHandJoints.n_joints
    for j in range(MANOHandJoints.n_joints):
      joint_xyz[j] = pose[j]
      parent = MANOHandJoints.parents[j]
      if parent is not None:
        joint_xyz[j] += joint_xyz[parent]
    joint_xyz = np.stack(joint_xyz, 0)[..., 0]

    T = np.matmul(np.expand_dims(mats, 0), self.ref_T)[..., 0]
    self.verts = [None] * MANOHandJoints.n_joints
    for j in range(MANOHandJoints.n_joints):
      self.verts[j] = T[:, j]
      parent = MANOHandJoints.parents[j]
      if parent is not None:
        self.verts[j] += joint_xyz[parent]
    self.verts = np.stack(self.verts, 1)
    self.verts = np.sum(self.verts * self.weights, 1)

    return self.verts.copy()
def set_abs_quat ( self , quat ) : mats = [ ] for j in range ( MANOHandJoints . n_joints ) : mats . append ( quat2mat ( quat [ j ] ) ) mats = np . stack ( mats , 0 ) pose = np . matmul ( mats , self . ref_pose ) joint_xyz = [ None ] * MANOHandJoints . n_joints for j in range ( MANOHandJoints . n_joints ) : joint_xyz [ j ] = pose [ j ] parent = MANOHandJoints . parents [ j ] if parent is not None : joint_xyz [ j ] += joint_xyz [ parent ] joint_xyz = np . stack ( joint_xyz , 0 ) [ ... , 0 ] T = np . matmul ( np . expand_dims ( mats , 0 ) , self . ref_T ) [ ... , 0 ] self . verts = [ None ] * MANOHandJoints . n_joints for j in range ( MANOHandJoints . n_joints ) : self . verts [ j ] = T [ : , j ] parent = MANOHandJoints . parents [ j ] if parent is not None : self . verts [ j ] += joint_xyz [ parent ] self . verts = np . stack ( self . verts , 1 ) self . verts = np . sum ( self . verts * self . weights , 1 ) return self . verts . copy ( )