Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.9 KiB

  1. #ifndef __glupatch_h_
  2. #define __glupatch_h_
  3. /**************************************************************************
  4. * *
  5. * Copyright (C) 1992, Silicon Graphics, Inc. *
  6. * *
  7. * These coded instructions, statements, and computer programs contain *
  8. * unpublished proprietary information of Silicon Graphics, Inc., and *
  9. * are protected by Federal copyright law. They may not be disclosed *
  10. * to third parties or copied or duplicated in any form, in whole or *
  11. * in part, without the prior written consent of Silicon Graphics, Inc. *
  12. * *
  13. **************************************************************************/
  14. /*
  15. * patch.h - $Revision: 1.1 $
  16. */
  17. #include "types.h"
  18. #include "defines.h"
  19. class Quilt;
  20. class Mapdesc;
  21. struct Pspec {
  22. REAL range[3];
  23. REAL sidestep[2];
  24. REAL stepsize;
  25. REAL minstepsize;
  26. int needsSubdivision;
  27. };
  28. struct Patchspec : public Pspec {
  29. int order;
  30. int stride;
  31. void clamp( REAL );
  32. void getstepsize( REAL );
  33. void singleStep( void );
  34. };
  35. class Patch {
  36. public:
  37. friend class Subdivider;
  38. friend class Quilt;
  39. friend class Patchlist;
  40. Patch( Quilt *, REAL*, REAL *, Patch * );
  41. Patch( Patch &, int, REAL, Patch * );
  42. void bbox( void );
  43. void clamp( void );
  44. void getstepsize( void );
  45. int cullCheck( void );
  46. int needsSubdivision( int );
  47. int needsSamplingSubdivision( void );
  48. int needsNonSamplingSubdivision( void );
  49. private:
  50. Mapdesc* mapdesc;
  51. Patch* next;
  52. int cullval;
  53. int notInBbox;
  54. int needsSampling;
  55. REAL cpts[MAXORDER*MAXORDER*MAXCOORDS]; //culling pts
  56. REAL spts[MAXORDER*MAXORDER*MAXCOORDS]; //sampling pts
  57. REAL bpts[MAXORDER*MAXORDER*MAXCOORDS]; //bbox pts
  58. Patchspec pspec[2];
  59. void checkBboxConstraint( void );
  60. REAL bb[2][MAXCOORDS];
  61. };
  62. #endif /* __glupatch_h_ */