Source code of Windows XP (NT5)
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.

758 lines
30 KiB

  1. /*
  2. ** Copyright 1992, Silicon Graphics, Inc.
  3. ** All Rights Reserved.
  4. **
  5. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6. ** the contents of this file may not be disclosed to third parties, copied or
  7. ** duplicated in any form, in whole or in part, without the prior written
  8. ** permission of Silicon Graphics, Inc.
  9. **
  10. ** RESTRICTED RIGHTS LEGEND:
  11. ** Use, duplication or disclosure by the Government is subject to restrictions
  12. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15. ** rights reserved under the Copyright Laws of the United States.
  16. **
  17. */
  18. #include <stdlib.h>
  19. #include <setjmp.h>
  20. struct JumpBuffer {
  21. jmp_buf buf;
  22. };
  23. #define mysetjmp(x) setjmp((x)->buf)
  24. #define mylongjmp(x,y) longjmp((x)->buf, y)
  25. /* <<AT&T USL C++ Language System <3.0.1> 02/03/92>> */
  26. /* < ../core/backend.c++ > */
  27. void *__vec_new (void *, int , int , void *);
  28. void __vec_ct (void *, int , int , void *);
  29. void __vec_dt (void *, int , int , void *);
  30. void __vec_delete (void *, int , int , void *, int , int );
  31. typedef int (*__vptp)(void);
  32. struct __mptr {short d; short i; __vptp f; };
  33. typedef unsigned int size_t ;
  34. // extern void *malloc (size_t );
  35. // extern void free (void *);
  36. typedef float REAL ;
  37. typedef void (*Pfvv )(void );
  38. typedef void (*Pfvf )(float *);
  39. typedef int (*cmpfunc )(void *, void *);
  40. typedef REAL Knot ;
  41. typedef REAL *Knot_ptr ;
  42. struct TrimVertex;
  43. struct TrimVertex {
  44. REAL param__10TrimVertex [2];
  45. long nuid__10TrimVertex ;
  46. };
  47. typedef struct TrimVertex *TrimVertex_p ;
  48. struct GridVertex;
  49. struct GridVertex {
  50. long gparam__10GridVertex [2];
  51. };
  52. struct Buffer;
  53. struct Buffer {
  54. struct Buffer *next__6Buffer ;
  55. };
  56. struct Pool;
  57. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  58. struct Pool {
  59. struct Buffer *freelist__4Pool ;
  60. char *blocklist__4Pool [32];
  61. int nextblock__4Pool ;
  62. char *curblock__4Pool ;
  63. int buffersize__4Pool ;
  64. int nextsize__4Pool ;
  65. int nextfree__4Pool ;
  66. int initsize__4Pool ;
  67. char *name__4Pool ;
  68. int magic__4Pool ;
  69. };
  70. void __glgrow__4PoolFv (struct Pool *);
  71. struct PooledObj;
  72. struct PooledObj {
  73. char __W3__9PooledObj ;
  74. };
  75. struct GridTrimVertex;
  76. struct GridTrimVertex {
  77. char __W3__9PooledObj ;
  78. struct TrimVertex dummyt__14GridTrimVertex ;
  79. struct GridVertex dummyg__14GridTrimVertex ;
  80. struct TrimVertex *t__14GridTrimVertex ;
  81. struct GridVertex *g__14GridTrimVertex ;
  82. };
  83. typedef struct GridTrimVertex *GridTrimVertex_p ;
  84. struct BasicCurveEvaluator;
  85. struct BasicSurfaceEvaluator;
  86. struct Backend;
  87. struct Backend {
  88. struct BasicCurveEvaluator *curveEvaluator__7Backend ;
  89. struct BasicSurfaceEvaluator *surfaceEvaluator__7Backend ;
  90. int wireframetris__7Backend ;
  91. int wireframequads__7Backend ;
  92. int npts__7Backend ;
  93. REAL mesh__7Backend [3][4];
  94. int meshindex__7Backend ;
  95. };
  96. struct CachingEvaluator;
  97. enum __Q2_16CachingEvaluator11ServiceMode { play__Q2_16CachingEvaluator11ServiceMode = 0, record__Q2_16CachingEvaluator11ServiceMode = 1, playAndRecord__Q2_16CachingEvaluator11ServiceMode = 2} ;
  98. struct CachingEvaluator {
  99. struct __mptr *__vptr__16CachingEvaluator ;
  100. };
  101. static void *__nw__FUi (size_t );
  102. struct BasicCurveEvaluator;
  103. struct BasicCurveEvaluator {
  104. struct __mptr *__vptr__16CachingEvaluator ;
  105. };
  106. struct BasicSurfaceEvaluator;
  107. static struct CachingEvaluator *__ct__16CachingEvaluatorFv (struct CachingEvaluator *);
  108. struct BasicSurfaceEvaluator {
  109. struct __mptr *__vptr__16CachingEvaluator ;
  110. };
  111. void __glbgnmap2f__21BasicSurfaceEv0 (struct BasicSurfaceEvaluator *, long );
  112. extern struct __mptr* __gl__ptbl_vec_____core_backen0[];
  113. void __glbgnsurf__7BackendFiT1l (struct Backend *__0this , int __1wiretris , int __1wirequads , long __1nuid )
  114. {
  115. struct BasicSurfaceEvaluator *__0__K9 ;
  116. __0this -> wireframetris__7Backend = __1wiretris ;
  117. __0this -> wireframequads__7Backend = __1wirequads ;
  118. ( (__0__K9 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long ))(__0__K9 -> __vptr__16CachingEvaluator [12]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K9 ))+
  119. (__0__K9 -> __vptr__16CachingEvaluator [12]).d))), __1nuid ) ) ;
  120. }
  121. void __gldomain2f__21BasicSurfaceEv0 (struct BasicSurfaceEvaluator *, REAL , REAL , REAL , REAL );
  122. void __glpatch__7BackendFfN31 (struct Backend *__0this , REAL __1ulo , REAL __1uhi , REAL __1vlo , REAL __1vhi )
  123. {
  124. struct BasicSurfaceEvaluator *__0__K10 ;
  125. ( (__0__K10 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, REAL , REAL , REAL , REAL ))(__0__K10 -> __vptr__16CachingEvaluator [9]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  126. BasicSurfaceEvaluator *)((((char *)__0__K10 ))+ (__0__K10 -> __vptr__16CachingEvaluator [9]).d))), __1ulo , __1uhi , __1vlo , __1vhi ) ) ;
  127. }
  128. void __glrange2f__21BasicSurfaceEva0 (struct BasicSurfaceEvaluator *, long , REAL *, REAL *);
  129. void __glsurfbbox__7BackendFlPfT2 (struct Backend *__0this , long __1type , REAL *__1from , REAL *__1to )
  130. {
  131. struct BasicSurfaceEvaluator *__0__K11 ;
  132. ( (__0__K11 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL *, REAL *))(__0__K11 -> __vptr__16CachingEvaluator [8]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  133. BasicSurfaceEvaluator *)((((char *)__0__K11 ))+ (__0__K11 -> __vptr__16CachingEvaluator [8]).d))), __1type , __1from , __1to ) ) ;
  134. }
  135. void __glmap2f__21BasicSurfaceEvalu0 (struct BasicSurfaceEvaluator *, long , REAL , REAL , long , long , REAL , REAL , long
  136. , long , REAL *);
  137. void __glenable__21BasicSurfaceEval0 (struct BasicSurfaceEvaluator *, long );
  138. void __glsurfpts__7BackendFlPfN21iT0 (struct Backend *__0this ,
  139. long __1type ,
  140. REAL *__1pts ,
  141. long __1ustride ,
  142. long __1vstride ,
  143. int __1uorder ,
  144. int __1vorder ,
  145. REAL __1ulo ,
  146. REAL __1uhi ,
  147. REAL __1vlo ,
  148. REAL __1vhi )
  149. {
  150. struct BasicSurfaceEvaluator *__0__K12 ;
  151. struct BasicSurfaceEvaluator *__0__K13 ;
  152. ( (__0__K12 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL , REAL , long , long
  153. , REAL , REAL , long , long , REAL *))(__0__K12 -> __vptr__16CachingEvaluator [13]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K12 ))+ (__0__K12 ->
  154. __vptr__16CachingEvaluator [13]).d))), __1type , __1ulo , __1uhi , __1ustride , (long )__1uorder , __1vlo , __1vhi , __1vstride , (long )__1vorder , __1pts ) )
  155. ;
  156. ( (__0__K13 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long ))(__0__K13 -> __vptr__16CachingEvaluator [10]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K13 ))+
  157. (__0__K13 -> __vptr__16CachingEvaluator [10]).d))), __1type ) ) ;
  158. }
  159. void __glmapgrid2f__21BasicSurfaceE0 (struct BasicSurfaceEvaluator *, long , REAL , REAL , long , REAL , REAL );
  160. void __glsurfgrid__7BackendFfT1lN210 (struct Backend *__0this , REAL __1u0 , REAL __1u1 , long __1nu , REAL __1v0 , REAL __1v1 , long __1nv )
  161. {
  162. struct BasicSurfaceEvaluator *__0__K14 ;
  163. ( (__0__K14 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL , REAL , long , REAL ,
  164. REAL ))(__0__K14 -> __vptr__16CachingEvaluator [14]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K14 ))+ (__0__K14 -> __vptr__16CachingEvaluator [14]).d))), __1nu , __1u0 , __1u1 , __1nv , __1v0 , __1v1 )
  165. ) ;
  166. }
  167. void __glbgnline__21BasicSurfaceEva0 (struct BasicSurfaceEvaluator *);
  168. void __glevalpoint2i__21BasicSurfac0 (struct BasicSurfaceEvaluator *, long , long );
  169. void __glendline__21BasicSurfaceEva0 (struct BasicSurfaceEvaluator *);
  170. void __glmapmesh2f__21BasicSurfaceE0 (struct BasicSurfaceEvaluator *, long , long , long , long , long );
  171. void __glsurfmesh__7BackendFlN31 (struct Backend *__0this , long __1u , long __1v , long __1n , long __1m )
  172. {
  173. if (__0this -> wireframequads__7Backend ){
  174. long __2v0 ;
  175. long __2v1 ;
  176. long __2u0f ;
  177. long __2u1f ;
  178. long __2v0f ;
  179. long __2v1f ;
  180. long __2parity ;
  181. __2u0f = __1u ;
  182. __2u1f = (__1u + __1n );
  183. __2v0f = __1v ;
  184. __2v1f = (__1v + __1m );
  185. __2parity = (__1u & 1 );
  186. for(( (__2v0 = __2v0f ), (__2v1 = (__2v0f ++ ))) ;__2v0 < __2v1f ;( (__2v0 = __2v1 ), (__2v1 ++ )) ) {
  187. struct BasicSurfaceEvaluator *__0__K15 ;
  188. ( (__0__K15 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K15 -> __vptr__16CachingEvaluator [20]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K15 ))+ (__0__K15 -> __vptr__16CachingEvaluator [20]).d))))
  189. ) ;
  190. { { long __3u ;
  191. struct BasicSurfaceEvaluator *__0__K20 ;
  192. __3u = __2u0f ;
  193. for(;__3u <= __2u1f ;__3u ++ ) {
  194. if (__2parity ){
  195. struct BasicSurfaceEvaluator *__0__K16 ;
  196. struct BasicSurfaceEvaluator *__0__K17 ;
  197. ( (__0__K16 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K16 -> __vptr__16CachingEvaluator [17]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  198. BasicSurfaceEvaluator *)((((char *)__0__K16 ))+ (__0__K16 -> __vptr__16CachingEvaluator [17]).d))), __3u , __2v0 ) ) ;
  199. ( (__0__K17 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K17 -> __vptr__16CachingEvaluator [17]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  200. BasicSurfaceEvaluator *)((((char *)__0__K17 ))+ (__0__K17 -> __vptr__16CachingEvaluator [17]).d))), __3u , __2v1 ) ) ;
  201. }
  202. else
  203. {
  204. struct BasicSurfaceEvaluator *__0__K18 ;
  205. struct BasicSurfaceEvaluator *__0__K19 ;
  206. ( (__0__K18 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K18 -> __vptr__16CachingEvaluator [17]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  207. BasicSurfaceEvaluator *)((((char *)__0__K18 ))+ (__0__K18 -> __vptr__16CachingEvaluator [17]).d))), __3u , __2v1 ) ) ;
  208. ( (__0__K19 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K19 -> __vptr__16CachingEvaluator [17]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  209. BasicSurfaceEvaluator *)((((char *)__0__K19 ))+ (__0__K19 -> __vptr__16CachingEvaluator [17]).d))), __3u , __2v0 ) ) ;
  210. }
  211. __2parity = (1 - __2parity );
  212. }
  213. ( (__0__K20 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K20 -> __vptr__16CachingEvaluator [21]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K20 ))+ (__0__K20 -> __vptr__16CachingEvaluator [21]).d))))
  214. ) ;
  215. }
  216. }
  217. }
  218. }
  219. else
  220. {
  221. struct BasicSurfaceEvaluator *__0__K21 ;
  222. ( (__0__K21 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long , long , long
  223. , long ))(__0__K21 -> __vptr__16CachingEvaluator [15]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K21 ))+ (__0__K21 -> __vptr__16CachingEvaluator [15]).d))), (long )0 , __1u , __1u +
  224. __1n , __1v , __1v + __1m ) ) ;
  225. }
  226. }
  227. void __glendmap2f__21BasicSurfaceEv0 (struct BasicSurfaceEvaluator *);
  228. void __glendsurf__7BackendFv (struct Backend *__0this )
  229. {
  230. struct BasicSurfaceEvaluator *__0__K22 ;
  231. ( (__0__K22 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K22 -> __vptr__16CachingEvaluator [18]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K22 ))+ (__0__K22 -> __vptr__16CachingEvaluator [18]).d))))
  232. ) ;
  233. }
  234. void __glbgntmesh__21BasicSurfaceEv0 (struct BasicSurfaceEvaluator *);
  235. void __glbgntmesh__7BackendFPc (struct Backend *__0this , char *__1__A23 )
  236. {
  237. if (__0this -> wireframetris__7Backend ){
  238. __0this -> meshindex__7Backend = 0 ;
  239. __0this -> npts__7Backend = 0 ;
  240. }
  241. else
  242. {
  243. struct BasicSurfaceEvaluator *__0__K24 ;
  244. ( (__0__K24 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K24 -> __vptr__16CachingEvaluator [24]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K24 ))+ (__0__K24 -> __vptr__16CachingEvaluator [24]).d))))
  245. ) ;
  246. }
  247. }
  248. void __gltmeshvert__7BackendFP10Gri0 (struct Backend *, struct GridVertex *);
  249. void __gltmeshvert__7BackendFP10Tri0 (struct Backend *, struct TrimVertex *);
  250. void __gltmeshvert__7BackendFP14Gri0 (struct Backend *__0this , struct GridTrimVertex *__1v )
  251. {
  252. if (( (((struct GridTrimVertex *)__1v )-> g__14GridTrimVertex ?1 :0 )) ){
  253. __gltmeshvert__7BackendFP10Gri0 ( __0this , __1v ->
  254. g__14GridTrimVertex ) ;
  255. }
  256. else
  257. {
  258. __gltmeshvert__7BackendFP10Tri0 ( __0this , __1v -> t__14GridTrimVertex ) ;
  259. }
  260. }
  261. void __glbgnclosedline__21BasicSurf0 (struct BasicSurfaceEvaluator *);
  262. void __glevalcoord2f__21BasicSurfac0 (struct BasicSurfaceEvaluator *, long , REAL , REAL );
  263. void __glendclosedline__21BasicSurf0 (struct BasicSurfaceEvaluator *);
  264. void __gltmeshvert__7BackendFP10Tri0 (struct Backend *__0this , struct TrimVertex *__1t )
  265. {
  266. long __1nuid ;
  267. REAL __1u ;
  268. REAL __1v ;
  269. __1nuid = __1t -> nuid__10TrimVertex ;
  270. __1u = (__1t -> param__10TrimVertex [0 ]);
  271. __1v = (__1t -> param__10TrimVertex [1 ]);
  272. __0this -> npts__7Backend ++ ;
  273. if (__0this -> wireframetris__7Backend ){
  274. if (__0this -> npts__7Backend >= 3 ){
  275. struct BasicSurfaceEvaluator *__0__K25 ;
  276. struct BasicSurfaceEvaluator *__0__K26 ;
  277. struct BasicSurfaceEvaluator *__0__K27 ;
  278. struct BasicSurfaceEvaluator *__0__K28 ;
  279. struct BasicSurfaceEvaluator *__0__K29 ;
  280. struct BasicSurfaceEvaluator *__0__K30 ;
  281. struct BasicSurfaceEvaluator *__0__K31 ;
  282. ( (__0__K25 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K25 -> __vptr__16CachingEvaluator [22]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K25 ))+ (__0__K25 -> __vptr__16CachingEvaluator [22]).d))))
  283. ) ;
  284. if (((__0this -> mesh__7Backend [0 ])[2 ])== 0 )
  285. ( (__0__K26 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL , REAL ))(__0__K26 ->
  286. __vptr__16CachingEvaluator [16]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K26 ))+ (__0__K26 -> __vptr__16CachingEvaluator [16]).d))), (long )((__0this -> mesh__7Backend [0 ])[3 ]), (__0this -> mesh__7Backend [0 ])[0 ], (__0this -> mesh__7Backend [0 ])[1 ])
  287. ) ;
  288. else
  289. ( (__0__K27 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K27 -> __vptr__16CachingEvaluator [17]).f))))( (struct
  290. BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K27 ))+ (__0__K27 -> __vptr__16CachingEvaluator [17]).d))), ((long )((__0this -> mesh__7Backend [0 ])[0 ])), ((long )((__0this -> mesh__7Backend [0 ])[1 ]))) ) ;
  291. if (((__0this -> mesh__7Backend [1 ])[2 ])== 0 )
  292. ( (__0__K28 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL , REAL ))(__0__K28 ->
  293. __vptr__16CachingEvaluator [16]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K28 ))+ (__0__K28 -> __vptr__16CachingEvaluator [16]).d))), (long )((__0this -> mesh__7Backend [1 ])[3 ]), (__0this -> mesh__7Backend [1 ])[0 ], (__0this -> mesh__7Backend [1 ])[1 ])
  294. ) ;
  295. else
  296. ( (__0__K29 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K29 -> __vptr__16CachingEvaluator [17]).f))))( (struct
  297. BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K29 ))+ (__0__K29 -> __vptr__16CachingEvaluator [17]).d))), ((long )((__0this -> mesh__7Backend [1 ])[0 ])), ((long )((__0this -> mesh__7Backend [1 ])[1 ]))) ) ;
  298. ( (__0__K30 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL , REAL ))(__0__K30 -> __vptr__16CachingEvaluator [16]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  299. BasicSurfaceEvaluator *)((((char *)__0__K30 ))+ (__0__K30 -> __vptr__16CachingEvaluator [16]).d))), (long )__1nuid , (float )__1u , (float )__1v ) ) ;
  300. ( (__0__K31 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K31 -> __vptr__16CachingEvaluator [23]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K31 ))+ (__0__K31 -> __vptr__16CachingEvaluator [23]).d))))
  301. ) ;
  302. }
  303. ((__0this -> mesh__7Backend [__0this -> meshindex__7Backend ])[0 ])= __1u ;
  304. ((__0this -> mesh__7Backend [__0this -> meshindex__7Backend ])[1 ])= __1v ;
  305. ((__0this -> mesh__7Backend [__0this -> meshindex__7Backend ])[2 ])= 0 ;
  306. ((__0this -> mesh__7Backend [__0this -> meshindex__7Backend ])[3 ])= __1nuid ;
  307. __0this -> meshindex__7Backend = ((__0this -> meshindex__7Backend + 1 )% 2 );
  308. }
  309. else
  310. {
  311. struct BasicSurfaceEvaluator *__0__K32 ;
  312. ( (__0__K32 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL , REAL ))(__0__K32 -> __vptr__16CachingEvaluator [16]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  313. BasicSurfaceEvaluator *)((((char *)__0__K32 ))+ (__0__K32 -> __vptr__16CachingEvaluator [16]).d))), (long )__1nuid , (float )__1u , (float )__1v ) ) ;
  314. }
  315. }
  316. void __gltmeshvert__7BackendFP10Gri0 (struct Backend *__0this , struct GridVertex *__1g )
  317. {
  318. long __1u ;
  319. long __1v ;
  320. __1u = (__1g -> gparam__10GridVertex [0 ]);
  321. __1v = (__1g -> gparam__10GridVertex [1 ]);
  322. __0this -> npts__7Backend ++ ;
  323. if (__0this -> wireframetris__7Backend ){
  324. if (__0this -> npts__7Backend >= 3 ){
  325. struct BasicSurfaceEvaluator *__0__K33 ;
  326. struct BasicSurfaceEvaluator *__0__K34 ;
  327. struct BasicSurfaceEvaluator *__0__K35 ;
  328. struct BasicSurfaceEvaluator *__0__K36 ;
  329. struct BasicSurfaceEvaluator *__0__K37 ;
  330. struct BasicSurfaceEvaluator *__0__K38 ;
  331. struct BasicSurfaceEvaluator *__0__K39 ;
  332. ( (__0__K33 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K33 -> __vptr__16CachingEvaluator [22]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K33 ))+ (__0__K33 -> __vptr__16CachingEvaluator [22]).d))))
  333. ) ;
  334. if (((__0this -> mesh__7Backend [0 ])[2 ])== 0 )
  335. ( (__0__K34 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL , REAL ))(__0__K34 ->
  336. __vptr__16CachingEvaluator [16]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K34 ))+ (__0__K34 -> __vptr__16CachingEvaluator [16]).d))), (long )((__0this -> mesh__7Backend [0 ])[3 ]), (__0this -> mesh__7Backend [0 ])[0 ], (__0this -> mesh__7Backend [0 ])[1 ])
  337. ) ;
  338. else
  339. ( (__0__K35 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K35 -> __vptr__16CachingEvaluator [17]).f))))( (struct
  340. BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K35 ))+ (__0__K35 -> __vptr__16CachingEvaluator [17]).d))), ((long )((__0this -> mesh__7Backend [0 ])[0 ])), ((long )((__0this -> mesh__7Backend [0 ])[1 ]))) ) ;
  341. if (((__0this -> mesh__7Backend [1 ])[2 ])== 0 )
  342. ( (__0__K36 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL , REAL ))(__0__K36 ->
  343. __vptr__16CachingEvaluator [16]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K36 ))+ (__0__K36 -> __vptr__16CachingEvaluator [16]).d))), (long )((__0this -> mesh__7Backend [1 ])[3 ]), (__0this -> mesh__7Backend [1 ])[0 ], (__0this -> mesh__7Backend [1 ])[1 ])
  344. ) ;
  345. else
  346. ( (__0__K37 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K37 -> __vptr__16CachingEvaluator [17]).f))))( (struct
  347. BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K37 ))+ (__0__K37 -> __vptr__16CachingEvaluator [17]).d))), ((long )((__0this -> mesh__7Backend [1 ])[0 ])), ((long )((__0this -> mesh__7Backend [1 ])[1 ]))) ) ;
  348. ( (__0__K38 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K38 -> __vptr__16CachingEvaluator [17]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  349. BasicSurfaceEvaluator *)((((char *)__0__K38 ))+ (__0__K38 -> __vptr__16CachingEvaluator [17]).d))), (long )__1u , (long )__1v ) ) ;
  350. ( (__0__K39 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K39 -> __vptr__16CachingEvaluator [23]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K39 ))+ (__0__K39 -> __vptr__16CachingEvaluator [23]).d))))
  351. ) ;
  352. }
  353. ((__0this -> mesh__7Backend [__0this -> meshindex__7Backend ])[0 ])= __1u ;
  354. ((__0this -> mesh__7Backend [__0this -> meshindex__7Backend ])[1 ])= __1v ;
  355. ((__0this -> mesh__7Backend [__0this -> meshindex__7Backend ])[2 ])= 1 ;
  356. __0this -> meshindex__7Backend = ((__0this -> meshindex__7Backend + 1 )% 2 );
  357. }
  358. else
  359. {
  360. struct BasicSurfaceEvaluator *__0__K40 ;
  361. ( (__0__K40 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K40 -> __vptr__16CachingEvaluator [17]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  362. BasicSurfaceEvaluator *)((((char *)__0__K40 ))+ (__0__K40 -> __vptr__16CachingEvaluator [17]).d))), (long )__1u , (long )__1v ) ) ;
  363. }
  364. }
  365. void __glswaptmesh__21BasicSurfaceE0 (struct BasicSurfaceEvaluator *);
  366. void __glswaptmesh__7BackendFv (struct Backend *__0this )
  367. {
  368. if (__0this -> wireframetris__7Backend ){
  369. __0this -> meshindex__7Backend = (1 - __0this -> meshindex__7Backend );
  370. }
  371. else
  372. {
  373. struct BasicSurfaceEvaluator *__0__K41 ;
  374. ( (__0__K41 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K41 -> __vptr__16CachingEvaluator [25]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K41 ))+ (__0__K41 -> __vptr__16CachingEvaluator [25]).d))))
  375. ) ;
  376. }
  377. }
  378. void __glendtmesh__21BasicSurfaceEv0 (struct BasicSurfaceEvaluator *);
  379. void __glendtmesh__7BackendFv (struct Backend *__0this )
  380. {
  381. struct BasicSurfaceEvaluator *__0__K42 ;
  382. if (! __0this -> wireframetris__7Backend )
  383. ( (__0__K42 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K42 -> __vptr__16CachingEvaluator [26]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char
  384. *)__0__K42 ))+ (__0__K42 -> __vptr__16CachingEvaluator [26]).d)))) ) ;
  385. }
  386. void __glbgnoutline__7BackendFv (struct Backend *__0this )
  387. {
  388. struct BasicSurfaceEvaluator *__0__K43 ;
  389. ( (__0__K43 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K43 -> __vptr__16CachingEvaluator [20]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K43 ))+ (__0__K43 -> __vptr__16CachingEvaluator [20]).d))))
  390. ) ;
  391. }
  392. void __gllinevert__7BackendFP10Trim0 (struct Backend *__0this , struct TrimVertex *__1t )
  393. {
  394. struct BasicSurfaceEvaluator *__0__K44 ;
  395. ( (__0__K44 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , REAL , REAL ))(__0__K44 -> __vptr__16CachingEvaluator [16]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  396. BasicSurfaceEvaluator *)((((char *)__0__K44 ))+ (__0__K44 -> __vptr__16CachingEvaluator [16]).d))), __1t -> nuid__10TrimVertex , __1t -> param__10TrimVertex [0 ], __1t -> param__10TrimVertex [1 ]) ) ;
  397. }
  398. void __gllinevert__7BackendFP10Grid0 (struct Backend *__0this , struct GridVertex *__1g )
  399. {
  400. struct BasicSurfaceEvaluator *__0__K45 ;
  401. ( (__0__K45 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *, long , long ))(__0__K45 -> __vptr__16CachingEvaluator [17]).f))))( (struct BasicSurfaceEvaluator *)(((struct
  402. BasicSurfaceEvaluator *)((((char *)__0__K45 ))+ (__0__K45 -> __vptr__16CachingEvaluator [17]).d))), __1g -> gparam__10GridVertex [0 ], __1g -> gparam__10GridVertex [1 ]) ) ;
  403. }
  404. void __glendoutline__7BackendFv (struct Backend *__0this )
  405. {
  406. struct BasicSurfaceEvaluator *__0__K46 ;
  407. ( (__0__K46 = __0this -> surfaceEvaluator__7Backend ), ((*(((void (*)(struct BasicSurfaceEvaluator *))(__0__K46 -> __vptr__16CachingEvaluator [21]).f))))( (struct BasicSurfaceEvaluator *)(((struct BasicSurfaceEvaluator *)((((char *)__0__K46 ))+ (__0__K46 -> __vptr__16CachingEvaluator [21]).d))))
  408. ) ;
  409. }
  410. void __gltriangle__7BackendFP10Trim0 (struct Backend *__0this , struct TrimVertex *__1a , struct TrimVertex *__1b , struct TrimVertex *__1c )
  411. {
  412. __glbgntmesh__7BackendFPc ( __0this , (char *)"spittriangle")
  413. ;
  414. __gltmeshvert__7BackendFP10Tri0 ( __0this , __1a ) ;
  415. __gltmeshvert__7BackendFP10Tri0 ( __0this , __1b ) ;
  416. __gltmeshvert__7BackendFP10Tri0 ( __0this , __1c ) ;
  417. __glendtmesh__7BackendFv ( __0this ) ;
  418. }
  419. void __glbgnmap1f__19BasicCurveEval0 (struct BasicCurveEvaluator *, long );
  420. void __glbgncurv__7BackendFv (struct Backend *__0this )
  421. {
  422. struct BasicCurveEvaluator *__0__K47 ;
  423. ( (__0__K47 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *, long ))(__0__K47 -> __vptr__16CachingEvaluator [12]).f))))( (struct BasicCurveEvaluator *)(((struct BasicCurveEvaluator *)((((char *)__0__K47 ))+
  424. (__0__K47 -> __vptr__16CachingEvaluator [12]).d))), (long )0 ) ) ;
  425. }
  426. void __gldomain1f__19BasicCurveEval0 (struct BasicCurveEvaluator *, REAL , REAL );
  427. void __glsegment__7BackendFfT1 (struct Backend *__0this , REAL __1ulo , REAL __1uhi )
  428. {
  429. struct BasicCurveEvaluator *__0__K48 ;
  430. ( (__0__K48 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *, REAL , REAL ))(__0__K48 -> __vptr__16CachingEvaluator [8]).f))))( (struct BasicCurveEvaluator *)(((struct BasicCurveEvaluator *)((((char *)__0__K48 ))+
  431. (__0__K48 -> __vptr__16CachingEvaluator [8]).d))), __1ulo , __1uhi ) ) ;
  432. }
  433. void __glmap1f__19BasicCurveEvaluat0 (struct BasicCurveEvaluator *, long , REAL , REAL , long , long , REAL *);
  434. void __glenable__19BasicCurveEvalua0 (struct BasicCurveEvaluator *, long );
  435. void __glcurvpts__7BackendFlPfT1ifT0 (struct Backend *__0this ,
  436. long __1type ,
  437. REAL *__1pts ,
  438. long __1stride ,
  439. int __1order ,
  440. REAL __1ulo ,
  441. REAL __1uhi )
  442. {
  443. struct BasicCurveEvaluator *__0__K49 ;
  444. struct BasicCurveEvaluator *__0__K50 ;
  445. ( (__0__K49 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *, long , REAL , REAL , long , long
  446. , REAL *))(__0__K49 -> __vptr__16CachingEvaluator [13]).f))))( (struct BasicCurveEvaluator *)(((struct BasicCurveEvaluator *)((((char *)__0__K49 ))+ (__0__K49 -> __vptr__16CachingEvaluator [13]).d))), __1type , __1ulo , __1uhi , __1stride , (long
  447. )__1order , __1pts ) ) ;
  448. ( (__0__K50 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *, long ))(__0__K50 -> __vptr__16CachingEvaluator [10]).f))))( (struct BasicCurveEvaluator *)(((struct BasicCurveEvaluator *)((((char *)__0__K50 ))+
  449. (__0__K50 -> __vptr__16CachingEvaluator [10]).d))), __1type ) ) ;
  450. }
  451. void __glmapgrid1f__19BasicCurveEva0 (struct BasicCurveEvaluator *, long , REAL , REAL );
  452. void __glcurvgrid__7BackendFfT1l (struct Backend *__0this , REAL __1u0 , REAL __1u1 , long __1nu )
  453. {
  454. struct BasicCurveEvaluator *__0__K51 ;
  455. ( (__0__K51 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *, long , REAL , REAL ))(__0__K51 -> __vptr__16CachingEvaluator [14]).f))))( (struct BasicCurveEvaluator *)(((struct
  456. BasicCurveEvaluator *)((((char *)__0__K51 ))+ (__0__K51 -> __vptr__16CachingEvaluator [14]).d))), __1nu , __1u0 , __1u1 ) ) ;
  457. }
  458. void __glmapmesh1f__19BasicCurveEva0 (struct BasicCurveEvaluator *, long , long , long );
  459. void __glcurvmesh__7BackendFlT1 (struct Backend *__0this , long __1from , long __1n )
  460. {
  461. struct BasicCurveEvaluator *__0__K52 ;
  462. ( (__0__K52 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *, long , long , long ))(__0__K52 -> __vptr__16CachingEvaluator [15]).f))))(
  463. (struct BasicCurveEvaluator *)(((struct BasicCurveEvaluator *)((((char *)__0__K52 ))+ (__0__K52 -> __vptr__16CachingEvaluator [15]).d))), (long )0 , __1from , __1from + __1n ) ) ;
  464. }
  465. void __glevalcoord1f__19BasicCurveE0 (struct BasicCurveEvaluator *, long , REAL );
  466. void __glcurvpt__7BackendFf (struct Backend *__0this , REAL __1u )
  467. {
  468. struct BasicCurveEvaluator *__0__K53 ;
  469. ( (__0__K53 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *, long , REAL ))(__0__K53 -> __vptr__16CachingEvaluator [16]).f))))( (struct BasicCurveEvaluator *)(((struct BasicCurveEvaluator *)((((char
  470. *)__0__K53 ))+ (__0__K53 -> __vptr__16CachingEvaluator [16]).d))), (long )0 , __1u ) ) ;
  471. }
  472. void __glbgnline__19BasicCurveEvalu0 (struct BasicCurveEvaluator *);
  473. void __glbgnline__7BackendFv (struct Backend *__0this )
  474. {
  475. struct BasicCurveEvaluator *__0__K54 ;
  476. ( (__0__K54 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *))(__0__K54 -> __vptr__16CachingEvaluator [18]).f))))( (struct BasicCurveEvaluator *)(((struct BasicCurveEvaluator *)((((char *)__0__K54 ))+ (__0__K54 -> __vptr__16CachingEvaluator [18]).d))))
  477. ) ;
  478. }
  479. void __glendline__19BasicCurveEvalu0 (struct BasicCurveEvaluator *);
  480. void __glendline__7BackendFv (struct Backend *__0this )
  481. {
  482. struct BasicCurveEvaluator *__0__K55 ;
  483. ( (__0__K55 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *))(__0__K55 -> __vptr__16CachingEvaluator [19]).f))))( (struct BasicCurveEvaluator *)(((struct BasicCurveEvaluator *)((((char *)__0__K55 ))+ (__0__K55 -> __vptr__16CachingEvaluator [19]).d))))
  484. ) ;
  485. }
  486. void __glendmap1f__19BasicCurveEval0 (struct BasicCurveEvaluator *);
  487. void __glendcurv__7BackendFv (struct Backend *__0this )
  488. {
  489. struct BasicCurveEvaluator *__0__K56 ;
  490. ( (__0__K56 = __0this -> curveEvaluator__7Backend ), ((*(((void (*)(struct BasicCurveEvaluator *))(__0__K56 -> __vptr__16CachingEvaluator [17]).f))))( (struct BasicCurveEvaluator *)(((struct BasicCurveEvaluator *)((((char *)__0__K56 ))+ (__0__K56 -> __vptr__16CachingEvaluator [17]).d))))
  491. ) ;
  492. }
  493. static struct CachingEvaluator *__ct__16CachingEvaluatorFv (struct CachingEvaluator *__0this ){ if (__0this || (__0this = (struct CachingEvaluator *)__nw__FUi ( sizeof (struct CachingEvaluator)) ))__0this -> __vptr__16CachingEvaluator = (struct
  494. __mptr *) __gl__ptbl_vec_____core_backen0[0];
  495. return __0this ;
  496. }
  497. static void *__nw__FUi (
  498. size_t __1s )
  499. {
  500. void *__1__Xp00uzigaiaa ;
  501. __1__Xp00uzigaiaa = malloc ( __1s ) ;
  502. if (__1__Xp00uzigaiaa ){
  503. return __1__Xp00uzigaiaa ;
  504. }
  505. else
  506. {
  507. return __1__Xp00uzigaiaa ;
  508. }
  509. }
  510. extern struct __mptr __gl__vtbl__16CachingEvaluator[];
  511. struct __mptr* __gl__ptbl_vec_____core_backen0[] = {
  512. __gl__vtbl__16CachingEvaluator,
  513. };
  514. /* the end */