Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygennurbstess.h
Go to the documentation of this file.
00001 /* 00002 ** License Applicability. Except to the extent portions of this file are 00003 ** made subject to an alternative license as permitted in the SGI Free 00004 ** Software License B, Version 1.1 (the "License"), the contents of this 00005 ** file are subject only to the provisions of the License. You may not use 00006 ** this file except in compliance with the License. You may obtain a copy 00007 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 00008 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: 00009 ** 00010 ** http://oss.sgi.com/projects/FreeB 00011 ** 00012 ** Note that, as provided in the License, the Software is distributed on an 00013 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS 00014 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND 00015 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A 00016 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. 00017 ** 00018 ** Original Code. The Original Code is: OpenGL Sample Implementation, 00019 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, 00020 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. 00021 ** Copyright in any portions created by third parties is as indicated 00022 ** elsewhere herein. All Rights Reserved. 00023 ** 00024 ** Additional Notice Provisions: The application programming interfaces 00025 ** established by SGI in conjunction with the Original Code are The 00026 ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released 00027 ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version 00028 ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X 00029 ** Window System(R) (Version 1.3), released October 19, 1998. This software 00030 ** was created using the OpenGL(R) version 1.2.1 Sample Implementation 00031 ** published by SGI, but has not been independently verified as being 00032 ** compliant with the OpenGL(R) version 1.2.1 Specification. 00033 */ 00034 00035 /* 00036 * nurbstess.h 00037 * 00038 */ 00039 00040 #ifndef __glunurbstess_h_ 00041 #define __glunurbstess_h_ 00042 00043 #include "mysetjmp.h" 00044 #include "subdivider.h" 00045 #include "renderhints.h" 00046 #include "backend.h" 00047 #include "maplist.h" 00048 #include "reader.h" 00049 #include "nurbsconsts.h" 00050 00051 struct Knotvector; 00052 class Quilt; 00053 class DisplayList; 00054 class BasicCurveEvaluator; 00055 class BasicSurfaceEvaluator; 00056 00057 class NurbsTessellator { 00058 public: 00059 NurbsTessellator( BasicCurveEvaluator &c, 00060 BasicSurfaceEvaluator &e ); 00061 virtual ~NurbsTessellator( void ); 00062 00063 void getnurbsproperty( long, INREAL * ); 00064 void getnurbsproperty( long, long, INREAL * ); 00065 void setnurbsproperty( long, INREAL ); 00066 void setnurbsproperty( long, long, INREAL ); 00067 void setnurbsproperty( long, long, INREAL * ); 00068 void setnurbsproperty( long, long, INREAL *, long, long ); 00069 00070 // called before a tessellation begins/ends 00071 virtual void bgnrender( void ); 00072 virtual void endrender( void ); 00073 00074 // called to make a display list of the output vertices 00075 virtual void makeobj( int n ); 00076 virtual void closeobj( void ); 00077 00078 // called when a error occurs 00079 virtual void errorHandler( int ); 00080 00081 void bgnsurface( long ); 00082 void endsurface( void ); 00083 void bgntrim( void ); 00084 void endtrim( void ); 00085 void bgncurve( long ); 00086 void endcurve( void ); 00087 void pwlcurve( long, INREAL[], long, long ); 00088 void nurbscurve( long, INREAL[], long, INREAL[], long, long ); 00089 void nurbssurface( long, INREAL[], long, INREAL[], long, long, 00090 INREAL[], long, long, long ); 00091 00092 void defineMap( long, long, long ); 00093 void redefineMaps( void ); 00094 00095 // recording of input description 00096 void discardRecording( void * ); 00097 void * beginRecording( void ); 00098 void endRecording( void ); 00099 void playRecording( void * ); 00100 00101 //for optimizing untrimmed nurbs in the case of domain distance sampling 00102 void set_domain_distance_u_rate(REAL u_rate); 00103 void set_domain_distance_v_rate(REAL v_rate); 00104 void set_is_domain_distance_sampling(int flag); 00105 00106 00107 protected: 00108 Renderhints renderhints; 00109 Maplist maplist; 00110 Backend backend; 00111 00112 private: 00113 00114 void resetObjects( void ); 00115 int do_check_knots( Knotvector *, const char * ); 00116 void do_nurbserror( int ); 00117 void do_bgncurve( O_curve * ); 00118 void do_endcurve( void ); 00119 void do_freeall( void ); 00120 void do_freecurveall( O_curve * ); 00121 void do_freebgntrim( O_trim * ); 00122 void do_freebgncurve( O_curve * ); 00123 void do_freepwlcurve( O_pwlcurve * ); 00124 void do_freenurbscurve( O_nurbscurve * ); 00125 void do_freenurbssurface( O_nurbssurface * ); 00126 void do_freebgnsurface( O_surface * ); 00127 void do_bgnsurface( O_surface * ); 00128 void do_endsurface( void ); 00129 void do_bgntrim( O_trim * ); 00130 void do_endtrim( void ); 00131 void do_pwlcurve( O_pwlcurve * ); 00132 void do_nurbscurve( O_nurbscurve * ); 00133 void do_nurbssurface( O_nurbssurface * ); 00134 void do_freenurbsproperty( Property * ); 00135 void do_setnurbsproperty( Property * ); 00136 void do_setnurbsproperty2( Property * ); 00137 00138 Subdivider subdivider; 00139 JumpBuffer* jumpbuffer; 00140 Pool o_pwlcurvePool; 00141 Pool o_nurbscurvePool; 00142 Pool o_curvePool; 00143 Pool o_trimPool; 00144 Pool o_surfacePool; 00145 Pool o_nurbssurfacePool; 00146 Pool propertyPool; 00147 public: 00148 Pool quiltPool; 00149 private: 00150 TrimVertexPool extTrimVertexPool; 00151 00152 int inSurface; /* bgnsurface seen */ 00153 int inCurve; /* bgncurve seen */ 00154 int inTrim; /* bgntrim seen */ 00155 int isCurveModified; /* curve changed */ 00156 int isTrimModified; /* trim curves changed */ 00157 int isSurfaceModified; /* surface changed */ 00158 int isDataValid; /* all data is good */ 00159 int numTrims; /* valid trim regions */ 00160 int playBack; 00161 00162 O_trim** nextTrim; /* place to link o_trim */ 00163 O_curve** nextCurve; /* place to link o_curve */ 00164 O_nurbscurve** nextNurbscurve; /* place to link o_nurbscurve */ 00165 O_pwlcurve** nextPwlcurve; /* place to link o_pwlcurve */ 00166 O_nurbssurface** nextNurbssurface; /* place to link o_nurbssurface */ 00167 00168 O_surface* currentSurface; 00169 O_trim* currentTrim; 00170 O_curve* currentCurve; 00171 00172 DisplayList *dl; 00173 00174 }; 00175 00176 #endif /* __glunurbstess_h_ */ Generated on Sun May 27 2012 04:23:40 for ReactOS by
1.7.6.1
|