src/bvhtoolbox/convert/bvh2xaf_helpers.py
def mat2affine(rot_mat, translation=None):
    """Converts a rotation matrix to string representation of a quaternion (xyzw).
    
    :param rot_mat: rotation matrix (3x3)
    :type rot_mat: numpy.ndarray
    :param translation: translation with x,y,z components
    :type translation: numpy.ndarray
    :return: affine matrix with scaling 1. (4x4)
    :rtype: numpy.ndarray
    """
    if not translation:
        translation = np.zeros(3)
    affine = t3d.affines.compose(translation, rot_mat, np.ones(3))
    return affine
Converts a rotation matrix to string representation of a quaternion (xyzw).
    
    :param rot_mat: rotation matrix (3x3)
    :type rot_mat: numpy.ndarray
    :param translation: translation with x,y,z components
    :type translation: numpy.ndarray
    :return: affine matrix with scaling 1. (4x4)
    :rtype: numpy.ndarray
    
Converts a rotation matrix to string representation of a quaternion (xyzw).
Converts a rotation matrix to string representation of a quaternion ( xyzw ) .
def mat2affine(rot_mat, translation=None):
    if not translation:
        translation = np.zeros(3)
    affine = t3d.affines.compose(translation, rot_mat, np.ones(3))
    return affine
def mat2affine ( rot_mat , translation = None ) : if not translation : translation = np . zeros ( 3 ) affine = t3d . affines . compose ( translation , rot_mat , np . ones ( 3 ) ) return affine
Converts a rotation matrix to string representation of a quaternion (xyzw).
Converts a rotation matrix to string representation of a quaternion ( xyzw ) .
"""Converts a rotation matrix to string representation of a quaternion (xyzw).
    
    :param rot_mat: rotation matrix (3x3)
    :type rot_mat: numpy.ndarray
    :param translation: translation with x,y,z components
    :type translation: numpy.ndarray
    :return: affine matrix with scaling 1. (4x4)
    :rtype: numpy.ndarray
    """
affine matrix with scaling 1. (4x4)
affine matrix with scaling 1 . ( 4x4 )
numpy.ndarray
rot_mat
rotation matrix (3x3)
rotation matrix ( 3x3 )
translation
translation with x,y,z components
translation with x y z components