home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / graphic / csg_rt / sil.h < prev    next >
Text File  |  1991-12-24  |  859b  |  39 lines

  1. /*
  2.  
  3. SIL.H  Interface to simple intersection lists
  4.  
  5. */
  6.  
  7. typedef struct
  8.     {
  9.     double    t;            /* t value at point of intersection  */
  10.     BOOLEAN    entering;        /* Are we entering the shape?        */
  11.     } SI;
  12.  
  13. #define    N_SIS        (2+2)        /* Highest order of t is quadratic   */
  14.                     /* +2 for possible +/- INFINITE      */
  15.  
  16. typedef struct
  17.     {
  18.     int    n_sis;            /* How many intersections in list    */
  19.     SI    sis [N_SIS];        /* Simple intersections              */
  20.     } SIL;
  21.  
  22. #ifndef _SIL_
  23.  
  24. extern void intersect_linear_t(
  25.     double coeff_of_t, double constant_term,
  26.     VECTOR p, VECTOR q,
  27.     void *shapeinfo, double (*value_of_shape)(void *shapeinfo, VECTOR v),
  28.     SIL *sil
  29.     );
  30.  
  31. extern void intersect_quadratic_t(
  32.     double qa, double qb, double qc,
  33.     VECTOR p, VECTOR q,
  34.     void *shapeinfo, double (*value_of_shape)(void *shapeinfo, VECTOR v),
  35.     SIL *sil
  36.     );
  37.  
  38. #endif
  39.