formZ SDK | 5.0 API Reference | System | Math
Description
Calculates the 3d intersection point of two line segments
(defined by their start and end points) in 3D.
The int_kase result indicates how the line segments intersect, if no error occurred.
If an error occurred, int_kase is always set to 0x00000000.
The cases are bit encoded as follows :
bit 0 == 0 lines don't intersect, only their extensions do. Or an error occurred.
bit 0 == 1 a true intersection occurred (intersection point is on either line.
i.e. segment check)
Details about the intersection :
0x00000002 int_pt is on line1_start
0x00000004 int_pt is on line1_end
0x00000008 int_pt is between line1_start and line1_end
0x00000010 int_pt is on line2_start
0x00000020 int_pt is on line2_end
0x00000040 int_pt is between line2_start and line2_end
Plugin Prototype
fzrt_error_td fz_math_3d_isect_lines(
line1_start, | |
line1_end, | |
line2_start, | |
line2_end, | |
int_pt, | |
fzrt_int * | int_kase ) |
Parameters
line1_start [Input]
start point of 3d line segment 1
line1_end [Input]
end point of 3d line segment 1
line2_start [Input]
start point of 3d line segment 2
line2_end [Input]
end point of 3d line segment 2
int_pt [Result]
3d intersection point
int_kase [Result, Optional]
how the line segments interact
Returns
Error codes
Availability
5.0.0.0
Example Files
See Also
fz_math_3d_isect_line_plane, fz_math_3d_isect_line_cube,, fz_math_3d_isect_3_planes, fz_math_3d_isect_2_planes, fz_math_2d_isect_line_segs,
Function Set
Defined in