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.

144 lines
4.7 KiB

  1. #ifndef __glunurbstess_h_
  2. #define __glunurbstess_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. * nurbstess.h - $Revision: 1.2 $
  16. */
  17. #include "mysetjmp.h"
  18. #include "subdivid.h"
  19. #include "renderhi.h"
  20. #include "backend.h"
  21. #include "maplist.h"
  22. #include "reader.h"
  23. #include "nurbscon.h"
  24. class Knotvector;
  25. class Quilt;
  26. class DisplayList;
  27. class BasicCurveEvaluator;
  28. class BasicSurfaceEvaluator;
  29. class NurbsTessellator {
  30. public:
  31. NurbsTessellator( BasicCurveEvaluator &c,
  32. BasicSurfaceEvaluator &e );
  33. ~NurbsTessellator( void );
  34. void getnurbsproperty( long, INREAL * );
  35. void getnurbsproperty( long, long, INREAL * );
  36. void setnurbsproperty( long, INREAL );
  37. void setnurbsproperty( long, long, INREAL );
  38. void setnurbsproperty( long, long, INREAL * );
  39. void setnurbsproperty( long, long, INREAL *, long, long );
  40. // called before a tessellation begins/ends
  41. virtual void bgnrender( void );
  42. virtual void endrender( void );
  43. // called to make a display list of the output vertices
  44. virtual void makeobj( int n );
  45. virtual void closeobj( void );
  46. // called when a error occurs
  47. virtual void errorHandler( int );
  48. void bgnsurface( long );
  49. void endsurface( void );
  50. void bgntrim( void );
  51. void endtrim( void );
  52. void bgncurve( long );
  53. void endcurve( void );
  54. void pwlcurve( long, INREAL[], long, long );
  55. void nurbscurve( long, INREAL[], long, INREAL[], long, long );
  56. void nurbssurface( long, INREAL[], long, INREAL[], long, long,
  57. INREAL[], long, long, long );
  58. void defineMap( long, long, long );
  59. void redefineMaps( void );
  60. // recording of input description
  61. void discardRecording( void * );
  62. void * beginRecording( void );
  63. void endRecording( void );
  64. void playRecording( void * );
  65. protected:
  66. Renderhints renderhints;
  67. Maplist maplist;
  68. Backend backend;
  69. private:
  70. void resetObjects( void );
  71. int do_check_knots( Knotvector *, char * );
  72. void do_nurbserror( int );
  73. void do_bgncurve( O_curve * );
  74. void do_endcurve( void );
  75. void do_freeall( void );
  76. void do_freecurveall( O_curve * );
  77. void do_freebgntrim( O_trim * );
  78. void do_freebgncurve( O_curve * );
  79. void do_freepwlcurve( O_pwlcurve * );
  80. void do_freenurbscurve( O_nurbscurve * );
  81. void do_freenurbssurface( O_nurbssurface * );
  82. void do_freebgnsurface( O_surface * );
  83. void do_bgnsurface( O_surface * );
  84. void do_endsurface( void );
  85. void do_bgntrim( O_trim * );
  86. void do_endtrim( void );
  87. void do_pwlcurve( O_pwlcurve * );
  88. void do_nurbscurve( O_nurbscurve * );
  89. void do_nurbssurface( O_nurbssurface * );
  90. void do_freenurbsproperty( Property * );
  91. void do_setnurbsproperty( Property * );
  92. void do_setnurbsproperty2( Property * );
  93. Subdivider subdivider;
  94. JumpBuffer* jumpbuffer;
  95. Pool o_pwlcurvePool;
  96. Pool o_nurbscurvePool;
  97. Pool o_curvePool;
  98. Pool o_trimPool;
  99. Pool o_surfacePool;
  100. Pool o_nurbssurfacePool;
  101. Pool propertyPool;
  102. Pool quiltPool;
  103. TrimVertexPool extTrimVertexPool;
  104. int inSurface; /* bgnsurface seen */
  105. int inCurve; /* bgncurve seen */
  106. int inTrim; /* bgntrim seen */
  107. int isCurveModified; /* curve changed */
  108. int isTrimModified; /* trim curves changed */
  109. int isSurfaceModified; /* surface changed */
  110. int isDataValid; /* all data is good */
  111. int numTrims; /* valid trim regions */
  112. int playBack;
  113. O_trim** nextTrim; /* place to link o_trim */
  114. O_curve** nextCurve; /* place to link o_curve */
  115. O_nurbscurve** nextNurbscurve; /* place to link o_nurbscurve */
  116. O_pwlcurve** nextPwlcurve; /* place to link o_pwlcurve */
  117. O_nurbssurface** nextNurbssurface; /* place to link o_nurbssurface */
  118. O_surface* currentSurface;
  119. O_trim* currentTrim;
  120. O_curve* currentCurve;
  121. DisplayList *dl;
  122. };
  123. #endif /* __glunurbstess_h_ */