home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / 2608 / bsp_object.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-23  |  1.0 KB  |  49 lines

  1. /*    @(#)bsp_object.h 1.1 92/05/28 SMI    */
  2. /*    from bsp_object.h 1.2 90/05/02 SMI    */
  3.  
  4. /*
  5.  * Copyright (c) 1986 by Sun Microsystems, Inc.
  6.  */
  7.  
  8. /*
  9.  * this file is type definitions for object bsp tree descriptions.
  10.  *
  11.  */
  12.  
  13. #ifndef    BSP_OBJECT
  14. #define    BSP_OBJECT
  15.  
  16.  
  17. #define    BSP_TYPE    7        /* type field in flags */
  18. #define      BSP_LINE    0        /* line segment */
  19. #define      BSP_POLY    1        /* flat polygon */
  20. #define    BSP_BACK_VIEW    8        /* back-culling disable */
  21.  
  22.  
  23. #define    BSP_MAX_LOOP    3
  24.  
  25.  
  26. /* the dev_gp1 package creates polygons like this:
  27.  
  28.     Dev_gp1_polygon_3df(gp1, n_bounds, bounds, pts, shade)
  29.  
  30.    so the bsp-node structure is designed with this in mind */
  31.  
  32.  
  33.  
  34.  
  35. typedef    struct bsp_node {
  36.       unsigned short flags ;    /* control flags */
  37.       Pt3d        normal ;    /* normal vector */
  38.       short        color ;        /* color index */
  39.       short        trimcolor ;    /* trim color index */
  40.       int        work ;        /* workarea */
  41.       int        nloop ;        /* # loops */
  42.       int        loops[BSP_MAX_LOOP] ;
  43.       Pt3d        *vertices ;
  44.       struct bsp_node    *front_child, *back_child ;
  45.     } Bsp_Node ;
  46.  
  47.  
  48. #endif    BSP_OBJECT
  49.