formZ SDK | 5.0 API Reference | System | Math

fz_math_3d_isect_line_cube

Description

Calculates the intersection of a 3d line with an axis aligned cube, defined by two opposite corners.
Note : int_pts must be an array that can hold 2 points. n_int_pts wil be returned as either 0, 1 or 2 and indicates how many points are stored in int_pts.

Plugin Prototype

fzrt_error_td fz_math_3d_isect_line_cube(

fz_xyz_td *

line_start,

fz_xyz_td *

line_end,

fz_xyz_td *

pt1,

fz_xyz_td *

pt2,

fz_xyz_td

int_pts[2],

fzrt_int *

n_int_pts )

Parameters

line_start [Input]

start point of 3d line segment

line_end [Input]

end point of 3d line segment

pt1 [Input]

corner of cube

pt2 [Input]

opposite corner of cube

int_pts[2] [Result]

intersecting 3d points array

n_int_pts [Result]

number of intersecting points

Returns

Error codes

Availability

5.0.0.0

Example Files

util_math_3d.fsl

See Also

fz_math_3d_isect_line_plane,, fz_math_3d_isect_lines, fz_math_3d_isect_3_planes, fz_math_3d_isect_2_planes

Function Set

fz_math_fset


Defined in

fz_math_api.h