formZ SDK | 5.0 API Reference | System | Math

fz_math_3d_volume_of_tetrahedron

Description

Calculates the volume of a tetrahedron. The tetrahedron is defined by four points. p1, p2 and p3 form the base triangle and top is the tip. A negative volume is returned if the top of the tetrahedron is on the negative side (right hand rule) of the base triangle formed by p1,p2 and p3.

Plugin Prototype

double fz_math_3d_volume_of_tetrahedron(

fz_xyz_td *

p1,

fz_xyz_td *

p2,

fz_xyz_td *

p3,

fz_xyz_td *

top )

Parameters

p1 [Input]

base 3d point 1

p2 [Input]

base 3d point 2

p3 [Input]

base 3d point 3

top [Input]

tip point

Returns

volume of tetrahedron

Availability

5.0.0.0

Example Files

util_math_3d.fsl

Function Set

fz_math_fset


Defined in

fz_math_api.h