| 
    | 
   ||
  | 
 int intersect ( SS_XYZ *r, SS_XYZ *p1, SS_XYZ *p2, SS_XYZ *q1, SS_XYZ *q2 ) 
 SS_XYZ *r; // address of 3D point to receive result SS_XYZ *p1; // startpoint of first line SS_XYZ *p2; // endpoint of first line SS_XYZ *q1; // startpoint of second line SS_XYZ *q2; // endpoint of second line 
  | 
  | 
Synopsis  | 
#include "silver.h" 
 The intersect function computes the intersection point of the lines defined by the two line segments p1-p2 and q1-q2 and places the result in r . 
  | 
  | 
Parameters  | 
r , p1 , p2 , q1 and q2 are all addresses of 3D points. 
  | 
  | 
Return Value  | 
If the two lines do not intersect, then intersect returns 0, and r is unmodified; if they do intersect, then intersect returns 2 if the intersection point lies on both of the segments p1-p2 and q1-q2 , and 1 otherwise (the intersection point lies on an extension of the segments). 
  | 
  | 
See Also  | 
  |