formZ SDK | 5.0 API Reference | System | Math

# fz_math_3d_normal_of_polygon

Description

Finds the normal vector for a polygon.
The polygon is defined by the 3d points in the pts array. npts indicates how many 3d points are in the polygon, as passed in pts.
The result is only accurate if the 3d polygon is planar.

Plugin Prototype

fzrt_error_td fz_math_3d_normal_of_polygon(

fz_xyz_td * | pts,
fzrt_int | npts,
fz_xyz_td * | norm )

Parameters

pts [Input]

polygon points array

npts [Input]

number of 3d points in polygon

norm [Result]

normal vector

Returns

Error codes

Availability

5.0.0.0

Example Files

util_math_3d.fsl

See Also

fz_math_3d_cog_of_polygon,

Function Set

fz_math_fset

Defined in

fz_math_api.h