home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / povsrc31.zip / rbezier.h < prev    next >
C/C++ Source or Header  |  2000-11-26  |  2KB  |  63 lines

  1. #ifdef RBezierPatch
  2. #ifndef RBEZIER_H
  3. #define RBEZIER_H
  4.  
  5. /*****************************************************************************
  6.  * Global preprocessor defines
  7.  ******************************************************************************/
  8.  
  9. /* #define RBEZIER_PATCH_OBJECT (PATCH_OBJECT+DOUBLE_ILLUMINATE) */
  10. #define RBEZIER_PATCH_OBJECT (PATCH_OBJECT) 
  11.  
  12. #define TRIM_MAX_CONST        1024
  13.  
  14. /*****************************************************************************
  15.  * Global typedefs
  16.  ******************************************************************************/
  17.  
  18. typedef struct RBezier_struct RBEZIER_PATCH;
  19. typedef struct trim_shape_struct TRIM_SHAPE;
  20.  
  21. struct RBezier_struct
  22. {
  23.   OBJECT_FIELDS
  24.   int         u_order, v_order;
  25.   DBL        accuracy;
  26.   DBL           *Points;
  27.   DBL        *(pts[3]);
  28.  DBL        *Weights;
  29.   char         w_precomp;
  30.  
  31.   TRIM_SHAPE    **trims;
  32.   int        num_of_trims;
  33.  
  34. #ifdef DEBUG_RBEZIER
  35.   char        debug;
  36. #endif
  37.  
  38.  };
  39.  
  40.  
  41. struct trim_shape_struct
  42. {
  43.   int        refs, num_of_parts, num_of_cp;
  44.   DBL        bounds[2][2];
  45.   char         *ctypes;
  46.   DBL        *u, *v, *w;
  47.   char         ttype;
  48. };
  49.  
  50. RBEZIER_PATCH *Create_RBezier_Patch (void);
  51. void Compute_RBezier_Patch_BBox ( RBEZIER_PATCH *);
  52.  
  53. void Destroy_Trim ( TRIM_SHAPE * );
  54. TRIM_SHAPE *Copy_Trim ( TRIM_SHAPE *);
  55.  
  56. void trim_rotate_cp ( DBL, DBL *,DBL *, int );
  57. void trim_scale_cp ( DBL *, DBL *,DBL *, int );
  58. void trim_translate_cp ( DBL *, DBL *,DBL *, int );
  59. TRIM_SHAPE *trim_deep_copy ( TRIM_SHAPE *);
  60. void trim_compute_bounds (TRIM_SHAPE *);
  61. #endif
  62. #endif /*#ifdef RbezierPatch */
  63.