GEMS_3D_Intersect_Segment_Plane

 

Find if a line segment intersect a plane.

 

 

Syntax

 

float  GEMS_3D_Intersect_Segment_Plane

          Point_3D *A1, 

          Point_3D *A2, 

          Point_3D *plane, 

          float *d, 

          Point_3D *Hit=NULL

) ;

 

 

Parameters

 

A1

Pointer to the first point of the line segment.

 

A2

Pointer to the second point of the line segment.

 

plane

Pointer to the plane's normal.

 

d

Pointer to the plane's "d" (Nx*x + Ny*y + Nz*z + d = 0).

 

Hit

Pointer to a 3D point structure that will contain the coordinate of the intersection point between the line and the plane if there is one.

 

 

Return value

 

This function return "-HUGE_REAL" if there is no intersection, or "t" otherwise (t being the parameter of the line Hitx= A1x + t(B1x-A1x)).

 

 

Remarks

 

 

 

 

Requirements

 

Header:

          sliceO_include.hpp

 

 

Library:

          sliceO_Structures.lib

 

 

 

Example

 

          ...

 

 

 

          ...

 

 

See also