src/bvhtoolbox/convert/bvh2xaf_helpers.py
def string2affine(xaf_string, translation_str=None):
    """Converts a string representation of a quaternion (xyzw) to an affine matrix (4x4).
    
    :param xaf_string: space delimited xyzw quaternion
    :type xaf_string: str
    :param translation_str: translation string with x y z components
    :type translation_str: str
    :return: affine matrix with scaling 1. (4x4)
    :rtype: numpy.ndarray
    """
    if not translation_str:
        t = np.zeros(0)
    else:
        t = np.fromstring(translation_str, sep=' ')
    rot_mat = string2mat(xaf_string)
    affine = mat2affine(rot_mat, t)
    return affine
Converts a string representation of a quaternion (xyzw) to an affine matrix (4x4).
    
    :param xaf_string: space delimited xyzw quaternion
    :type xaf_string: str
    :param translation_str: translation string with x y z components
    :type translation_str: str
    :return: affine matrix with scaling 1. (4x4)
    :rtype: numpy.ndarray
    
Converts a string representation of a quaternion (xyzw) to an affine matrix (4x4).
Converts a string representation of a quaternion ( xyzw ) to an affine matrix ( 4x4 ) .
def string2affine(xaf_string, translation_str=None):
    if not translation_str:
        t = np.zeros(0)
    else:
        t = np.fromstring(translation_str, sep=' ')
    rot_mat = string2mat(xaf_string)
    affine = mat2affine(rot_mat, t)
    return affine
def string2affine ( xaf_string , translation_str = None ) : if not translation_str : t = np . zeros ( 0 ) else : t = np . fromstring ( translation_str , sep = ' ' ) rot_mat = string2mat ( xaf_string ) affine = mat2affine ( rot_mat , t ) return affine
Converts a string representation of a quaternion (xyzw) to an affine matrix (4x4).
Converts a string representation of a quaternion ( xyzw ) to an affine matrix ( 4x4 ) .
"""Converts a string representation of a quaternion (xyzw) to an affine matrix (4x4).
    
    :param xaf_string: space delimited xyzw quaternion
    :type xaf_string: str
    :param translation_str: translation string with x y z components
    :type translation_str: str
    :return: affine matrix with scaling 1. (4x4)
    :rtype: numpy.ndarray
    """
affine matrix with scaling 1. (4x4)
affine matrix with scaling 1 . ( 4x4 )
numpy.ndarray
xaf_string
space delimited xyzw quaternion
space delimited xyzw quaternion
translation_str
translation string with x y z components
translation string with x y z components