src/bvhtoolbox/convert/bvh2xaf_helpers.py
def euler_str2quat(euler_string, in_order='zxy', conversion_order='rzxz'):
    """Takes a space delinmited string of Euler angles and converts it to quaternion representation.
    
    :param euler_string: 3 space delimited values for angles
    :param in_order: Channel order in BVH file. The order of the values coming in.
    :param conversion_order: The order that the angles are meant to represent, e.g. 'rzxz'.
    :return: quaternion (wxyz)
    :rtype: numpy.ndarray
    """
    eulers_deg = np.fromstring(euler_string, sep=' ')
    eulers_xyz = np.array([eulers_deg[in_order.lower().index(i)] for i in 'xyz'])
    ordered_euler = reorder_axes(eulers_xyz, axes=conversion_order[1:])
    eulers_rad = np.radians(ordered_euler)
    quat = t3d.euler.euler2quat(*eulers_rad, axes=conversion_order)
    return quat
Takes a space delinmited string of Euler angles and converts it to quaternion representation.
    
    :param euler_string: 3 space delimited values for angles
    :param in_order: Channel order in BVH file. The order of the values coming in.
    :param conversion_order: The order that the angles are meant to represent, e.g. 'rzxz'.
    :return: quaternion (wxyz)
    :rtype: numpy.ndarray
    
Takes a space delinmited string of Euler angles and converts it to quaternion representation.
Takes a space delinmited string of Euler angles and converts it to quaternion representation .
def euler_str2quat(euler_string, in_order='zxy', conversion_order='rzxz'):
    eulers_deg = np.fromstring(euler_string, sep=' ')
    eulers_xyz = np.array([eulers_deg[in_order.lower().index(i)] for i in 'xyz'])
    ordered_euler = reorder_axes(eulers_xyz, axes=conversion_order[1:])
    eulers_rad = np.radians(ordered_euler)
    quat = t3d.euler.euler2quat(*eulers_rad, axes=conversion_order)
    return quat
def euler_str2quat ( euler_string , in_order = 'zxy' , conversion_order = 'rzxz' ) : eulers_deg = np . fromstring ( euler_string , sep = ' ' ) eulers_xyz = np . array ( [ eulers_deg [ in_order . lower ( ) . index ( i ) ] for i in 'xyz' ] ) ordered_euler = reorder_axes ( eulers_xyz , axes = conversion_order [ 1 : ] ) eulers_rad = np . radians ( ordered_euler ) quat = t3d . euler . euler2quat ( * eulers_rad , axes = conversion_order ) return quat
Takes a space delinmited string of Euler angles and converts it to quaternion representation.
Takes a space delinmited string of Euler angles and converts it to quaternion representation .
"""Takes a space delinmited string of Euler angles and converts it to quaternion representation.
    
    :param euler_string: 3 space delimited values for angles
    :param in_order: Channel order in BVH file. The order of the values coming in.
    :param conversion_order: The order that the angles are meant to represent, e.g. 'rzxz'.
    :return: quaternion (wxyz)
    :rtype: numpy.ndarray
    """
None
numpy.ndarray
euler_string
3 space delimited values for angles
3 space delimited values for angles
in_order
Channel order in BVH file. The order of the values coming in.
Channel order in BVH file . The order of the values coming in .
conversion_order
The order that the angles are meant to represent, e.g.
The order that the angles are meant to represent e . g .