formZ SDK | 5.0 API Reference | System | Math

# fz_math_4x4_multiply_mat_unit_vec

Description

Transforms a 3d unit vector by a 4x4 matrix.
If no_scale is TRUE, it assumes the matrix contains translation and rotation only and the result vector is not normalized again.
If no_scale is set to FALSE, the result vector is normalized.
If in doubt whether the matix contains a scale factor, set no_scale to FALSE.

Plugin Prototype

fzrt_error_td fz_math_4x4_multiply_mat_unit_vec(

fz_mat4x4_td * | mat,
fz_xyz_td * | unit_vec,
fzrt_boolean | no_scale )

Parameters

mat [Input]

4x4 matrix

unit_vec [Input, Result]

3d unit vector

no_scale [Input]

TRUE if matrix doesn't contain a scale factor, FALSE if matrix does contain a scale factor

Returns

Error codes

Availability

5.0.0.0

Example Files

util_math_matrix.fsl

See Also

, fz_math_4x4_multiply_mat_xyz_xyzw_array, , fz_math_4x4_multiply_mat_xyzw_array, ,, , fz_math_4x4_multiply_mat_xy_array, fz_math_3x3_multiply_mat_unit_vec

Function Set

fz_math_fset

Defined in

fz_math_api.h