formZ SDK | 5.0 API Reference | System | Math

# fz_math_3d_vec_rotation_xyz

Description

Given two 3d vectors (which must be perpendicular to each other), finds the three rotation angles, which will rotate the world xaxis (1,0,0) and yaxis (0,1,0) into the given vectors.
The angles must be applied in z x y order. Likewise when the angles are applied in y x z order to the given vectors, they result as the xaxis and yaxis.
This is the inverse function of fz_math_3d_xyz_rotation_vec.

Plugin Prototype

fzrt_error_td fz_math_3d_vec_rotation_xyz(

fz_xyz_td * | xaxis,
fz_xyz_td * | yaxis,
fz_xyz_td * | angles )

Parameters

xaxis [Input]

x axis (must be perpendicular to yaxis)

yaxis [Input]

y axis (must be perpendicular to xaxis)

angles [Result]

rotation angles

Returns

Error codes

Availability

5.0.0.0

Example Files

util_math_3d.fsl

See Also

fz_math_3d_xyz_rotation_vec

Function Set

fz_math_fset

Defined in

fz_math_api.h