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.

1126 lines
48 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/coveandtiler.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. struct Arc;
  37. struct Backend;
  38. typedef float REAL ;
  39. typedef void (*Pfvv )(void );
  40. typedef void (*Pfvf )(float *);
  41. typedef int (*cmpfunc )(void *, void *);
  42. typedef REAL Knot ;
  43. typedef REAL *Knot_ptr ;
  44. struct TrimVertex;
  45. struct TrimVertex {
  46. REAL param__10TrimVertex [2];
  47. long nuid__10TrimVertex ;
  48. };
  49. typedef struct TrimVertex *TrimVertex_p ;
  50. struct Buffer;
  51. struct Buffer {
  52. struct Buffer *next__6Buffer ;
  53. };
  54. struct Pool;
  55. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  56. struct Pool {
  57. struct Buffer *freelist__4Pool ;
  58. char *blocklist__4Pool [32];
  59. int nextblock__4Pool ;
  60. char *curblock__4Pool ;
  61. int buffersize__4Pool ;
  62. int nextsize__4Pool ;
  63. int nextfree__4Pool ;
  64. int initsize__4Pool ;
  65. char *name__4Pool ;
  66. int magic__4Pool ;
  67. };
  68. void __glgrow__4PoolFv (struct Pool *);
  69. struct PooledObj;
  70. struct PooledObj {
  71. char __W3__9PooledObj ;
  72. };
  73. struct PwlArc;
  74. struct PwlArc {
  75. char __W3__9PooledObj ;
  76. struct TrimVertex *pts__6PwlArc ;
  77. int npts__6PwlArc ;
  78. long type__6PwlArc ;
  79. };
  80. struct Bin;
  81. struct Arc;
  82. struct BezierArc;
  83. typedef struct Arc *Arc_ptr ;
  84. enum arc_side { arc_none = 0, arc_right = 1, arc_top = 2, arc_left = 3, arc_bottom = 4} ;
  85. struct Arc;
  86. struct Arc {
  87. char __W3__9PooledObj ;
  88. Arc_ptr prev__3Arc ;
  89. Arc_ptr next__3Arc ;
  90. Arc_ptr link__3Arc ;
  91. struct BezierArc *bezierArc__3Arc ;
  92. struct PwlArc *pwlArc__3Arc ;
  93. long type__3Arc ;
  94. long nuid__3Arc ;
  95. };
  96. extern int __glbezier_tag__3Arc ;
  97. extern int __glarc_tag__3Arc ;
  98. extern int __gltail_tag__3Arc ;
  99. struct Jarcloc;
  100. struct Jarcloc {
  101. struct Arc *arc__7Jarcloc ;
  102. struct TrimVertex *p__7Jarcloc ;
  103. struct TrimVertex *plast__7Jarcloc ;
  104. };
  105. struct Trimline;
  106. struct Trimline {
  107. struct TrimVertex **pts__8Trimline ;
  108. long numverts__8Trimline ;
  109. long i__8Trimline ;
  110. long size__8Trimline ;
  111. struct Jarcloc jarcl__8Trimline ;
  112. struct TrimVertex t__8Trimline ;
  113. struct TrimVertex b__8Trimline ;
  114. struct TrimVertex *tinterp__8Trimline ;
  115. struct TrimVertex *binterp__8Trimline ;
  116. };
  117. struct Gridline;
  118. struct Gridline {
  119. long v__8Gridline ;
  120. REAL vval__8Gridline ;
  121. long vindex__8Gridline ;
  122. long ustart__8Gridline ;
  123. long uend__8Gridline ;
  124. };
  125. struct Uarray;
  126. struct Uarray {
  127. long size__6Uarray ;
  128. long ulines__6Uarray ;
  129. REAL *uarray__6Uarray ;
  130. };
  131. struct Backend;
  132. struct TrimRegion;
  133. void __gl__dt__8TrimlineFv (struct Trimline *, int );
  134. void __gl__dt__6UarrayFv (struct Uarray *, int );
  135. struct TrimRegion {
  136. struct Trimline left__10TrimRegion ;
  137. struct Trimline right__10TrimRegion ;
  138. struct Gridline top__10TrimRegion ;
  139. struct Gridline bot__10TrimRegion ;
  140. struct Uarray uarray__10TrimRegion ;
  141. REAL oneOverDu__10TrimRegion ;
  142. };
  143. struct Backend;
  144. struct GridVertex;
  145. struct GridTrimVertex;
  146. struct CoveAndTiler;
  147. struct CoveAndTiler {
  148. struct Backend *backend__12CoveAndTiler ;
  149. struct TrimRegion *PTrimRegion;
  150. struct TrimRegion OTrimRegion;
  151. };
  152. extern int __glMAXSTRIPSIZE__12CoveAndTil0 ;
  153. struct GridVertex;
  154. struct GridVertex {
  155. long gparam__10GridVertex [2];
  156. };
  157. struct GridTrimVertex;
  158. struct GridTrimVertex {
  159. char __W3__9PooledObj ;
  160. struct TrimVertex dummyt__14GridTrimVertex ;
  161. struct GridVertex dummyg__14GridTrimVertex ;
  162. struct TrimVertex *t__14GridTrimVertex ;
  163. struct GridVertex *g__14GridTrimVertex ;
  164. };
  165. typedef struct GridTrimVertex *GridTrimVertex_p ;
  166. struct BasicCurveEvaluator;
  167. struct BasicSurfaceEvaluator;
  168. struct Backend;
  169. struct Backend {
  170. struct BasicCurveEvaluator *curveEvaluator__7Backend ;
  171. struct BasicSurfaceEvaluator *surfaceEvaluator__7Backend ;
  172. int wireframetris__7Backend ;
  173. int wireframequads__7Backend ;
  174. int npts__7Backend ;
  175. REAL mesh__7Backend [3][4];
  176. int meshindex__7Backend ;
  177. };
  178. extern int __glMAXSTRIPSIZE__12CoveAndTil0 ;
  179. int __glMAXSTRIPSIZE__12CoveAndTil0 = 1000;
  180. struct TrimRegion *__gl__ct__10TrimRegionFv (struct TrimRegion *);
  181. extern struct __mptr* __ptbl_vec_____core_coveandtiler_c_____ct_[];
  182. static void *__nw__FUi (size_t );
  183. struct CoveAndTiler *__gl__ct__12CoveAndTilerFR7Bac0 (struct CoveAndTiler *__0this , struct TrimRegion *__0TrimRegion , struct Backend *__1b )
  184. { if (__0this || (__0this = (struct CoveAndTiler *)__nw__FUi ( sizeof (struct CoveAndTiler))
  185. ))( (__0this -> PTrimRegion= ((__0TrimRegion == 0 )?( (__0TrimRegion = (((struct TrimRegion *)((((char *)__0this ))+ 8)))), __gl__ct__10TrimRegionFv ( ((struct TrimRegion *)((((char *)__0this ))+
  186. 8))) ) :__0TrimRegion )), (__0this -> backend__12CoveAndTiler = __1b )) ;
  187. return __0this ;
  188. }
  189. void __gl__dt__12CoveAndTilerFv (struct CoveAndTiler *__0this ,
  190. int __0__free )
  191. { if (__0this )if (__0this ){ (__0__free & 2)?( (((void )( ((((struct TrimRegion *)((((char
  192. *)__0this ))+ 8)))?( ((((struct TrimRegion *)((((char *)__0this ))+ 8)))?( ( __gl__dt__6UarrayFv ( (struct Uarray *)(& (((struct TrimRegion *)((((char *)__0this ))+ 8)))->
  193. uarray__10TrimRegion ), 2) , ( __gl__dt__8TrimlineFv ( (struct Trimline *)(& (((struct TrimRegion *)((((char *)__0this ))+ 8)))-> right__10TrimRegion ), 2) ,
  194. ( __gl__dt__8TrimlineFv ( (struct Trimline *)(& (((struct TrimRegion *)((((char *)__0this ))+ 8)))-> left__10TrimRegion ), 2) , (( 0 ) ))
  195. ) ) , 0 ) :( 0 ) ), 0 ) :( 0 ) )) )), 0 ) :0 ;
  196. if (__0__free & 1)( (((void *)__0this )?( free ( ((void *)__0this )) , 0 ) :( 0 ) )) ;
  197. } }
  198. void __gltmeshvert__7BackendFP10Gri0 (struct Backend *, struct GridVertex *);
  199. void __gltmeshvert__7BackendFP10Tri0 (struct Backend *, struct TrimVertex *);
  200. void __gltmeshvert__7BackendFP14Gri0 (struct Backend *, struct GridTrimVertex *);
  201. void __gltile__12CoveAndTilerFlN21 (struct CoveAndTiler *, long , long , long );
  202. void __glcoveUpperLeft__12CoveAndTi0 (struct CoveAndTiler *);
  203. void __glcoveLowerLeft__12CoveAndTi0 (struct CoveAndTiler *);
  204. void __glcoveUpperRight__12CoveAndT0 (struct CoveAndTiler *);
  205. void __glcoveLowerRight__12CoveAndT0 (struct CoveAndTiler *);
  206. void __glcoveUpperLeftNoGrid__12Cov0 (struct CoveAndTiler *, struct TrimVertex *);
  207. void __glcoveLowerLeftNoGrid__12Cov0 (struct CoveAndTiler *, struct TrimVertex *);
  208. void __glcoveUpperRightNoGrid__12Co0 (struct CoveAndTiler *, struct TrimVertex *);
  209. void __glcoveLowerRightNoGrid__12Co0 (struct CoveAndTiler *, struct TrimVertex *);
  210. void __glbgntmesh__7BackendFPc (struct Backend *, char *);
  211. void __glendtmesh__7BackendFv (struct Backend *);
  212. void __glcoveAndTile__12CoveAndTile0 (struct CoveAndTiler *__0this )
  213. {
  214. long __1ustart ;
  215. long __1uend ;
  216. __1ustart = ((__0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline >= __0this -> PTrimRegion-> bot__10TrimRegion . ustart__8Gridline )?__0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline :__0this -> PTrimRegion-> bot__10TrimRegion .
  217. ustart__8Gridline );
  218. __1uend = ((__0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline <= __0this -> PTrimRegion-> bot__10TrimRegion . uend__8Gridline )?__0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline :__0this -> PTrimRegion-> bot__10TrimRegion .
  219. uend__8Gridline );
  220. if (__1ustart <= __1uend ){
  221. __gltile__12CoveAndTilerFlN21 ( __0this , __0this -> PTrimRegion-> bot__10TrimRegion . vindex__8Gridline , __1ustart , __1uend ) ;
  222. if (__0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline >= __0this -> PTrimRegion-> bot__10TrimRegion . ustart__8Gridline )
  223. __glcoveUpperLeft__12CoveAndTi0 ( __0this ) ;
  224. else
  225. __glcoveLowerLeft__12CoveAndTi0 ( __0this ) ;
  226. if (__0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline <= __0this -> PTrimRegion-> bot__10TrimRegion . uend__8Gridline )
  227. __glcoveUpperRight__12CoveAndT0 ( __0this ) ;
  228. else
  229. __glcoveLowerRight__12CoveAndT0 ( __0this ) ;
  230. }
  231. else
  232. {
  233. struct TrimVertex __2blv ;
  234. struct TrimVertex __2tlv ;
  235. struct TrimVertex *__2bl ;
  236. struct TrimVertex *__2tl ;
  237. struct GridTrimVertex __2bllv ;
  238. struct GridTrimVertex __2tllv ;
  239. struct TrimVertex *__2lf ;
  240. struct TrimVertex *__2ll ;
  241. void *__1__Xp00uzigaiaa ;
  242. ( ( (0 ), ((((struct GridVertex *)(& ((struct GridTrimVertex *)(& __2bllv ))-> dummyg__14GridTrimVertex ))))) , ( (((struct GridTrimVertex *)(& __2bllv ))->
  243. g__14GridTrimVertex = 0 ), ( (((struct GridTrimVertex *)(& __2bllv ))-> t__14GridTrimVertex = 0 ), ((((struct GridTrimVertex *)(& __2bllv ))))) ) ) ;
  244. ( ( (0 ), ((((struct GridVertex *)(& ((struct GridTrimVertex *)(& __2tllv ))-> dummyg__14GridTrimVertex ))))) , ( (((struct GridTrimVertex *)(& __2tllv ))->
  245. g__14GridTrimVertex = 0 ), ( (((struct GridTrimVertex *)(& __2tllv ))-> t__14GridTrimVertex = 0 ), ((((struct GridTrimVertex *)(& __2tllv ))))) ) ) ;
  246. __2lf = ( (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline = 0 ), (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))->
  247. pts__8Trimline [((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline ])) ;
  248. __2ll = ( (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline = ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> numverts__8Trimline ),
  249. (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(-- ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline )])) ;
  250. if ((__2lf -> param__10TrimVertex [0 ])>= (__2ll -> param__10TrimVertex [0 ])){
  251. (__2blv . param__10TrimVertex [0 ])= (__2lf -> param__10TrimVertex [0 ]);
  252. (__2blv . param__10TrimVertex [1 ])= (__2ll -> param__10TrimVertex [1 ]);
  253. __2blv . nuid__10TrimVertex = 0 ;
  254. ((void )0 );
  255. __2bl = (& __2blv );
  256. __2tl = __2lf ;
  257. ( (((struct GridTrimVertex *)(& __2tllv ))-> g__14GridTrimVertex = 0 ), (((struct GridTrimVertex *)(& __2tllv ))-> t__14GridTrimVertex = __2lf )) ;
  258. if ((__2ll -> param__10TrimVertex [0 ])> (__0this -> PTrimRegion-> uarray__10TrimRegion . uarray__6Uarray [(__0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline - 1 )])){
  259. ( (((struct GridTrimVertex *)(&
  260. __2bllv ))-> g__14GridTrimVertex = 0 ), (((struct GridTrimVertex *)(& __2bllv ))-> t__14GridTrimVertex = __2ll )) ;
  261. ((void )0 );
  262. }
  263. else
  264. {
  265. ( (((struct GridTrimVertex *)(& __2bllv ))-> g__14GridTrimVertex = (& ((struct GridTrimVertex *)(& __2bllv ))-> dummyg__14GridTrimVertex )), ( ((((struct
  266. GridTrimVertex *)(& __2bllv ))-> dummyg__14GridTrimVertex . gparam__10GridVertex [0 ])= (__0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline - 1 )), ((((struct GridTrimVertex *)(& __2bllv ))-> dummyg__14GridTrimVertex . gparam__10GridVertex [1 ])=
  267. __0this -> PTrimRegion-> bot__10TrimRegion . vindex__8Gridline )) ) ;
  268. }
  269. __glcoveUpperLeftNoGrid__12Cov0 ( __0this , __2bl ) ;
  270. }
  271. else
  272. {
  273. (__2tlv . param__10TrimVertex [0 ])= (__2ll -> param__10TrimVertex [0 ]);
  274. (__2tlv . param__10TrimVertex [1 ])= (__2lf -> param__10TrimVertex [1 ]);
  275. __2tlv . nuid__10TrimVertex = 0 ;
  276. ((void )0 );
  277. __2tl = (& __2tlv );
  278. __2bl = __2ll ;
  279. ( (((struct GridTrimVertex *)(& __2bllv ))-> g__14GridTrimVertex = 0 ), (((struct GridTrimVertex *)(& __2bllv ))-> t__14GridTrimVertex = __2ll )) ;
  280. if ((__2lf -> param__10TrimVertex [0 ])> (__0this -> PTrimRegion-> uarray__10TrimRegion . uarray__6Uarray [(__0this -> PTrimRegion-> bot__10TrimRegion . ustart__8Gridline - 1 )])){
  281. ((void )0 );
  282. ( (((struct GridTrimVertex *)(& __2tllv ))-> g__14GridTrimVertex = 0 ), (((struct GridTrimVertex *)(& __2tllv ))-> t__14GridTrimVertex = __2lf )) ;
  283. }
  284. else
  285. {
  286. ( (((struct GridTrimVertex *)(& __2tllv ))-> g__14GridTrimVertex = (& ((struct GridTrimVertex *)(& __2tllv ))-> dummyg__14GridTrimVertex )), ( ((((struct
  287. GridTrimVertex *)(& __2tllv ))-> dummyg__14GridTrimVertex . gparam__10GridVertex [0 ])= (__0this -> PTrimRegion-> bot__10TrimRegion . ustart__8Gridline - 1 )), ((((struct GridTrimVertex *)(& __2tllv ))-> dummyg__14GridTrimVertex . gparam__10GridVertex [1 ])=
  288. __0this -> PTrimRegion-> top__10TrimRegion . vindex__8Gridline )) ) ;
  289. }
  290. __glcoveLowerLeftNoGrid__12Cov0 ( __0this , __2tl ) ;
  291. }
  292. { struct TrimVertex __2brv ;
  293. struct TrimVertex __2trv ;
  294. struct TrimVertex *__2br ;
  295. struct TrimVertex *__2tr ;
  296. struct GridTrimVertex __2brrv ;
  297. struct GridTrimVertex __2trrv ;
  298. struct TrimVertex *__2rf ;
  299. struct TrimVertex *__2rl ;
  300. void *__1__Xp00uzigaiaa ;
  301. ( ( (0 ), ((((struct GridVertex *)(& ((struct GridTrimVertex *)(& __2brrv ))-> dummyg__14GridTrimVertex ))))) , ( (((struct GridTrimVertex *)(& __2brrv ))->
  302. g__14GridTrimVertex = 0 ), ( (((struct GridTrimVertex *)(& __2brrv ))-> t__14GridTrimVertex = 0 ), ((((struct GridTrimVertex *)(& __2brrv ))))) ) ) ;
  303. ( ( (0 ), ((((struct GridVertex *)(& ((struct GridTrimVertex *)(& __2trrv ))-> dummyg__14GridTrimVertex ))))) , ( (((struct GridTrimVertex *)(& __2trrv ))->
  304. g__14GridTrimVertex = 0 ), ( (((struct GridTrimVertex *)(& __2trrv ))-> t__14GridTrimVertex = 0 ), ((((struct GridTrimVertex *)(& __2trrv ))))) ) ) ;
  305. __2rf = ( (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline = 0 ), (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))->
  306. pts__8Trimline [((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline ])) ;
  307. __2rl = ( (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline = ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> numverts__8Trimline ),
  308. (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(-- ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline )])) ;
  309. if ((__2rf -> param__10TrimVertex [0 ])<= (__2rl -> param__10TrimVertex [0 ])){
  310. (__2brv . param__10TrimVertex [0 ])= (__2rf -> param__10TrimVertex [0 ]);
  311. (__2brv . param__10TrimVertex [1 ])= (__2rl -> param__10TrimVertex [1 ]);
  312. __2brv . nuid__10TrimVertex = 0 ;
  313. ((void )0 );
  314. __2br = (& __2brv );
  315. __2tr = __2rf ;
  316. ( (((struct GridTrimVertex *)(& __2trrv ))-> g__14GridTrimVertex = 0 ), (((struct GridTrimVertex *)(& __2trrv ))-> t__14GridTrimVertex = __2rf )) ;
  317. if ((__2rl -> param__10TrimVertex [0 ])< (__0this -> PTrimRegion-> uarray__10TrimRegion . uarray__6Uarray [(__0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline + 1 )])){
  318. ((void )0 );
  319. ( (((struct GridTrimVertex *)(& __2brrv ))-> g__14GridTrimVertex = 0 ), (((struct GridTrimVertex *)(& __2brrv ))-> t__14GridTrimVertex = __2rl )) ;
  320. }
  321. else
  322. {
  323. ( (((struct GridTrimVertex *)(& __2brrv ))-> g__14GridTrimVertex = (& ((struct GridTrimVertex *)(& __2brrv ))-> dummyg__14GridTrimVertex )), ( ((((struct
  324. GridTrimVertex *)(& __2brrv ))-> dummyg__14GridTrimVertex . gparam__10GridVertex [0 ])= (__0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline + 1 )), ((((struct GridTrimVertex *)(& __2brrv ))-> dummyg__14GridTrimVertex . gparam__10GridVertex [1 ])=
  325. __0this -> PTrimRegion-> bot__10TrimRegion . vindex__8Gridline )) ) ;
  326. }
  327. __glcoveUpperRightNoGrid__12Co0 ( __0this , __2br ) ;
  328. }
  329. else
  330. {
  331. (__2trv . param__10TrimVertex [0 ])= (__2rl -> param__10TrimVertex [0 ]);
  332. (__2trv . param__10TrimVertex [1 ])= (__2rf -> param__10TrimVertex [1 ]);
  333. __2trv . nuid__10TrimVertex = 0 ;
  334. ((void )0 );
  335. __2tr = (& __2trv );
  336. __2br = __2rl ;
  337. ( (((struct GridTrimVertex *)(& __2brrv ))-> g__14GridTrimVertex = 0 ), (((struct GridTrimVertex *)(& __2brrv ))-> t__14GridTrimVertex = __2rl )) ;
  338. if ((__2rf -> param__10TrimVertex [0 ])< (__0this -> PTrimRegion-> uarray__10TrimRegion . uarray__6Uarray [(__0this -> PTrimRegion-> bot__10TrimRegion . uend__8Gridline + 1 )])){
  339. ((void )0 );
  340. ( (((struct GridTrimVertex *)(& __2trrv ))-> g__14GridTrimVertex = 0 ), (((struct GridTrimVertex *)(& __2trrv ))-> t__14GridTrimVertex = __2rf )) ;
  341. }
  342. else
  343. {
  344. ( (((struct GridTrimVertex *)(& __2trrv ))-> g__14GridTrimVertex = (& ((struct GridTrimVertex *)(& __2trrv ))-> dummyg__14GridTrimVertex )), ( ((((struct
  345. GridTrimVertex *)(& __2trrv ))-> dummyg__14GridTrimVertex . gparam__10GridVertex [0 ])= (__0this -> PTrimRegion-> bot__10TrimRegion . uend__8Gridline + 1 )), ((((struct GridTrimVertex *)(& __2trrv ))-> dummyg__14GridTrimVertex . gparam__10GridVertex [1 ])=
  346. __0this -> PTrimRegion-> top__10TrimRegion . vindex__8Gridline )) ) ;
  347. }
  348. __glcoveLowerRightNoGrid__12Co0 ( __0this , __2tr ) ;
  349. }
  350. __glbgntmesh__7BackendFPc ( (struct Backend *)__0this -> backend__12CoveAndTiler , (char *)"doit") ;
  351. ( __gltmeshvert__7BackendFP14Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridTrimVertex *)(& __2trrv ))) ) ;
  352. ( __gltmeshvert__7BackendFP14Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridTrimVertex *)(& __2tllv ))) ) ;
  353. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __2tr ) ) ;
  354. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __2tl ) ) ;
  355. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __2br ) ) ;
  356. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __2bl ) ) ;
  357. ( __gltmeshvert__7BackendFP14Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridTrimVertex *)(& __2brrv ))) ) ;
  358. ( __gltmeshvert__7BackendFP14Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridTrimVertex *)(& __2bllv ))) ) ;
  359. __glendtmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  360. ((void )( (( (( ( (((void )( ((((struct PooledObj *)((struct GridTrimVertex *)(& __2trrv ))))?( ((((struct PooledObj *)((struct GridTrimVertex *)(&
  361. __2trrv ))))?( (( 0 ) ), 0 ) :( 0 ) ), 0 ) :( 0 ) )) )), ((
  362. 0 ) )) , 0 ) ), 0 ) )) );
  363. ((void )( (( (( ( (((void )( ((((struct PooledObj *)((struct GridTrimVertex *)(& __2brrv ))))?( ((((struct PooledObj *)((struct GridTrimVertex *)(&
  364. __2brrv ))))?( (( 0 ) ), 0 ) :( 0 ) ), 0 ) :( 0 ) )) )), ((
  365. 0 ) )) , 0 ) ), 0 ) )) );
  366. }
  367. ((void )( (( (( ( (((void )( ((((struct PooledObj *)((struct GridTrimVertex *)(& __2tllv ))))?( ((((struct PooledObj *)((struct GridTrimVertex *)(&
  368. __2tllv ))))?( (( 0 ) ), 0 ) :( 0 ) ), 0 ) :( 0 ) )) )), ((
  369. 0 ) )) , 0 ) ), 0 ) )) );
  370. ((void )( (( (( ( (((void )( ((((struct PooledObj *)((struct GridTrimVertex *)(& __2bllv ))))?( ((((struct PooledObj *)((struct GridTrimVertex *)(&
  371. __2bllv ))))?( (( 0 ) ), 0 ) :( 0 ) ), 0 ) :( 0 ) )) )), ((
  372. 0 ) )) , 0 ) ), 0 ) )) );
  373. }
  374. }
  375. void __glsurfmesh__7BackendFlN31 (struct Backend *, long , long , long , long );
  376. void __gltile__12CoveAndTilerFlN21 (struct CoveAndTiler *__0this , long __1vindex , long __1ustart , long __1uend )
  377. {
  378. long __1numsteps ;
  379. __1numsteps = (__1uend - __1ustart );
  380. if (__1numsteps == 0 )return ;
  381. if (__1numsteps > 1000){
  382. long __2umid ;
  383. __2umid = (__1ustart + ((__1uend - __1ustart )/ 2 ));
  384. __gltile__12CoveAndTilerFlN21 ( __0this , __1vindex , __1ustart , __2umid ) ;
  385. __gltile__12CoveAndTilerFlN21 ( __0this , __1vindex , __2umid , __1uend ) ;
  386. }
  387. else
  388. {
  389. __glsurfmesh__7BackendFlN31 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1ustart , __1vindex - 1 , __1numsteps , (long )1 ) ;
  390. }
  391. }
  392. void __glswaptmesh__7BackendFv (struct Backend *);
  393. void __glcoveUR__12CoveAndTilerFv (struct CoveAndTiler *);
  394. void __glcoveUpperRight__12CoveAndT0 (struct CoveAndTiler *__0this )
  395. {
  396. struct GridVertex __1tgv ;
  397. struct GridVertex __1gv ;
  398. struct TrimVertex *__1__X6 ;
  399. void *__1__Xp00uzigaiaa ;
  400. ( (( ((((struct GridVertex *)(& __1tgv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline ), ((((struct GridVertex *)(& __1tgv ))-> gparam__10GridVertex [1 ])=
  401. __0this -> PTrimRegion-> top__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1tgv ))))) ;
  402. ( (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline ), ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [1 ])=
  403. __0this -> PTrimRegion-> bot__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1gv ))))) ;
  404. ( (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline = 0 ), (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [((struct
  405. Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline ])) ;
  406. __glbgntmesh__7BackendFPc ( (struct Backend *)__0this -> backend__12CoveAndTiler , (char *)"coveUpperRight") ;
  407. ( (__1__X6 = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))->
  408. numverts__8Trimline )?(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ),
  409. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1__X6 ) ) ) ;
  410. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1tgv ))) ) ;
  411. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  412. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1gv ))) ) ;
  413. __glcoveUR__12CoveAndTilerFv ( __0this ) ;
  414. __glendtmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  415. }
  416. void __glcoveUpperRightNoGrid__12Co0 (struct CoveAndTiler *__0this , struct TrimVertex *__1br )
  417. {
  418. struct TrimVertex *__1__X7 ;
  419. struct TrimVertex *__1__X8 ;
  420. __glbgntmesh__7BackendFPc ( (struct Backend *)__0this -> backend__12CoveAndTiler , (char *)"coveUpperRight") ;
  421. ( (__1__X7 = ( (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline = 0 ), (((struct Trimline *)(& __0this -> PTrimRegion->
  422. right__10TrimRegion ))-> pts__8Trimline [((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline ])) ), ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1__X7 )
  423. ) ) ;
  424. ( (__1__X8 = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))->
  425. numverts__8Trimline )?(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ),
  426. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1__X8 ) ) ) ;
  427. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  428. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1br ) ) ;
  429. __glcoveUR__12CoveAndTilerFv ( __0this ) ;
  430. __glendtmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  431. }
  432. void __glcoveUR__12CoveAndTilerFv (struct CoveAndTiler *__0this )
  433. {
  434. struct GridVertex __1gv ;
  435. struct TrimVertex *__1vert ;
  436. void *__1__Xp00uzigaiaa ;
  437. ( (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline ), ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [1 ])=
  438. __0this -> PTrimRegion-> bot__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1gv ))))) ;
  439. __1vert = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> numverts__8Trimline )?(((struct
  440. Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ;
  441. if (__1vert == 0 )return ;
  442. ((void )0 );
  443. if (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])++ )) >= __0this -> PTrimRegion-> bot__10TrimRegion . uend__8Gridline ){
  444. for(;__1vert ;__1vert = (
  445. ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> numverts__8Trimline )?(((struct Trimline *)(& __0this ->
  446. PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ) {
  447. ( __gltmeshvert__7BackendFP10Tri0 (
  448. (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  449. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  450. }
  451. }
  452. else
  453. while (1 ){
  454. if ((__1vert -> param__10TrimVertex [0 ])< (__0this -> PTrimRegion-> uarray__10TrimRegion . uarray__6Uarray [(__1gv . gparam__10GridVertex [0 ])])){
  455. ( __gltmeshvert__7BackendFP10Tri0 ( (struct
  456. Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  457. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  458. __1vert = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> numverts__8Trimline )?(((struct
  459. Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ;
  460. if (__1vert == 0 )break ;
  461. }
  462. else
  463. {
  464. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  465. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1gv ))) ) ;
  466. if (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])++ )) == __0this -> PTrimRegion-> bot__10TrimRegion . uend__8Gridline ){
  467. for(;__1vert ;__1vert = (
  468. ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> numverts__8Trimline )?(((struct Trimline *)(& __0this ->
  469. PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ) {
  470. ( __gltmeshvert__7BackendFP10Tri0 (
  471. (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  472. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  473. }
  474. break ;
  475. }
  476. }
  477. }
  478. }
  479. void __glcoveUL__12CoveAndTilerFv (struct CoveAndTiler *);
  480. void __glcoveUpperLeft__12CoveAndTi0 (struct CoveAndTiler *__0this )
  481. {
  482. struct GridVertex __1tgv ;
  483. struct GridVertex __1gv ;
  484. struct TrimVertex *__1__X9 ;
  485. void *__1__Xp00uzigaiaa ;
  486. ( (( ((((struct GridVertex *)(& __1tgv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline ), ((((struct GridVertex *)(& __1tgv ))-> gparam__10GridVertex [1 ])=
  487. __0this -> PTrimRegion-> top__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1tgv ))))) ;
  488. ( (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline ), ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [1 ])=
  489. __0this -> PTrimRegion-> bot__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1gv ))))) ;
  490. ( (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline = 0 ), (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [((struct
  491. Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline ])) ;
  492. __glbgntmesh__7BackendFPc ( (struct Backend *)__0this -> backend__12CoveAndTiler , (char *)"coveUpperLeft") ;
  493. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1tgv ))) ) ;
  494. ( (__1__X9 = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))->
  495. numverts__8Trimline )?(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ),
  496. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1__X9 ) ) ) ;
  497. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1gv ))) ) ;
  498. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  499. __glcoveUL__12CoveAndTilerFv ( __0this ) ;
  500. __glendtmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  501. }
  502. void __glcoveUpperLeftNoGrid__12Cov0 (struct CoveAndTiler *__0this , struct TrimVertex *__1bl )
  503. {
  504. struct TrimVertex *__1__X10 ;
  505. struct TrimVertex *__1__X11 ;
  506. __glbgntmesh__7BackendFPc ( (struct Backend *)__0this -> backend__12CoveAndTiler , (char *)"coveUpperLeftNoGrid") ;
  507. ( (__1__X10 = ( (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline = 0 ), (((struct Trimline *)(& __0this -> PTrimRegion->
  508. left__10TrimRegion ))-> pts__8Trimline [((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline ])) ), ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1__X10 )
  509. ) ) ;
  510. ( (__1__X11 = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))->
  511. numverts__8Trimline )?(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ),
  512. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1__X11 ) ) ) ;
  513. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1bl ) ) ;
  514. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  515. __glcoveUL__12CoveAndTilerFv ( __0this ) ;
  516. __glendtmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  517. }
  518. void __glcoveUL__12CoveAndTilerFv (struct CoveAndTiler *__0this )
  519. {
  520. struct GridVertex __1gv ;
  521. struct TrimVertex *__1vert ;
  522. void *__1__Xp00uzigaiaa ;
  523. ( (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline ), ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [1 ])=
  524. __0this -> PTrimRegion-> bot__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1gv ))))) ;
  525. __1vert = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> numverts__8Trimline )?(((struct
  526. Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ;
  527. if (__1vert == 0 )return ;
  528. ((void )0 );
  529. if (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])-- )) <= __0this -> PTrimRegion-> bot__10TrimRegion . ustart__8Gridline ){
  530. for(;__1vert ;__1vert = (
  531. ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> numverts__8Trimline )?(((struct Trimline *)(& __0this ->
  532. PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ) {
  533. __glswaptmesh__7BackendFv ( (struct
  534. Backend *)__0this -> backend__12CoveAndTiler ) ;
  535. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  536. }
  537. }
  538. else
  539. while (1 ){
  540. if ((__1vert -> param__10TrimVertex [0 ])> (__0this -> PTrimRegion-> uarray__10TrimRegion . uarray__6Uarray [(__1gv . gparam__10GridVertex [0 ])])){
  541. __glswaptmesh__7BackendFv ( (struct Backend *)__0this ->
  542. backend__12CoveAndTiler ) ;
  543. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  544. __1vert = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> numverts__8Trimline )?(((struct
  545. Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ;
  546. if (__1vert == 0 )break ;
  547. }
  548. else
  549. {
  550. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1gv ))) ) ;
  551. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  552. if (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])-- )) == __0this -> PTrimRegion-> bot__10TrimRegion . ustart__8Gridline ){
  553. for(;__1vert ;__1vert = (
  554. ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline < ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> numverts__8Trimline )?(((struct Trimline *)(& __0this ->
  555. PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline ++ )]):(((struct TrimVertex *)0 )))) ) {
  556. __glswaptmesh__7BackendFv ( (struct
  557. Backend *)__0this -> backend__12CoveAndTiler ) ;
  558. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  559. }
  560. break ;
  561. }
  562. }
  563. }
  564. }
  565. void __glcoveLL__12CoveAndTilerFv (struct CoveAndTiler *);
  566. void __glcoveLowerLeft__12CoveAndTi0 (struct CoveAndTiler *__0this )
  567. {
  568. struct GridVertex __1bgv ;
  569. struct GridVertex __1gv ;
  570. struct TrimVertex *__1__X12 ;
  571. void *__1__Xp00uzigaiaa ;
  572. ( (( ((((struct GridVertex *)(& __1bgv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> bot__10TrimRegion . ustart__8Gridline ), ((((struct GridVertex *)(& __1bgv ))-> gparam__10GridVertex [1 ])=
  573. __0this -> PTrimRegion-> bot__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1bgv ))))) ;
  574. ( (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> bot__10TrimRegion . ustart__8Gridline ), ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [1 ])=
  575. __0this -> PTrimRegion-> top__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1gv ))))) ;
  576. ( (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline = ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> numverts__8Trimline ), (((struct
  577. Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(-- ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline )])) ;
  578. __glbgntmesh__7BackendFPc ( (struct Backend *)__0this -> backend__12CoveAndTiler , (char *)"coveLowerLeft") ;
  579. ( (__1__X12 = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))->
  580. pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ), ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler ,
  581. __1__X12 ) ) ) ;
  582. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1bgv ))) ) ;
  583. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  584. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1gv ))) ) ;
  585. __glcoveLL__12CoveAndTilerFv ( __0this ) ;
  586. __glendtmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  587. }
  588. void __glcoveLowerLeftNoGrid__12Cov0 (struct CoveAndTiler *__0this , struct TrimVertex *__1tl )
  589. {
  590. struct TrimVertex *__1__X13 ;
  591. struct TrimVertex *__1__X14 ;
  592. __glbgntmesh__7BackendFPc ( (struct Backend *)__0this -> backend__12CoveAndTiler , (char *)"coveLowerLeft") ;
  593. ( (__1__X13 = ( (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline = ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))->
  594. numverts__8Trimline ), (((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(-- ((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline )])) ),
  595. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1__X13 ) ) ) ;
  596. ( (__1__X14 = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))->
  597. pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ), ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler ,
  598. __1__X14 ) ) ) ;
  599. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  600. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1tl ) ) ;
  601. __glcoveLL__12CoveAndTilerFv ( __0this ) ;
  602. __glendtmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  603. }
  604. void __glcoveLL__12CoveAndTilerFv (struct CoveAndTiler *__0this )
  605. {
  606. struct GridVertex __1gv ;
  607. struct TrimVertex *__1vert ;
  608. void *__1__Xp00uzigaiaa ;
  609. ( (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> bot__10TrimRegion . ustart__8Gridline ), ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [1 ])=
  610. __0this -> PTrimRegion-> top__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1gv ))))) ;
  611. __1vert = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct
  612. Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ;
  613. if (__1vert == 0 )return ;
  614. ((void )0 );
  615. if (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])-- )) <= __0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline ){
  616. for(;__1vert ;__1vert = (
  617. ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this ->
  618. PTrimRegion-> left__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ) {
  619. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) )
  620. ;
  621. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  622. }
  623. }
  624. else
  625. while (1 ){
  626. if ((__1vert -> param__10TrimVertex [0 ])> (__0this -> PTrimRegion-> uarray__10TrimRegion . uarray__6Uarray [(__1gv . gparam__10GridVertex [0 ])])){
  627. ( __gltmeshvert__7BackendFP10Tri0 ( (struct
  628. Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  629. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  630. __1vert = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct
  631. Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ;
  632. if (__1vert == 0 )break ;
  633. }
  634. else
  635. {
  636. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  637. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1gv ))) ) ;
  638. if (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])-- )) == __0this -> PTrimRegion-> top__10TrimRegion . ustart__8Gridline ){
  639. for(;__1vert ;__1vert = (
  640. ((((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> left__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this ->
  641. PTrimRegion-> left__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ) {
  642. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) )
  643. ;
  644. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  645. }
  646. break ;
  647. }
  648. }
  649. }
  650. }
  651. void __glcoveLR__12CoveAndTilerFv (struct CoveAndTiler *);
  652. void __glcoveLowerRight__12CoveAndT0 (struct CoveAndTiler *__0this )
  653. {
  654. struct GridVertex __1bgv ;
  655. struct GridVertex __1gv ;
  656. struct TrimVertex *__1__X15 ;
  657. void *__1__Xp00uzigaiaa ;
  658. ( (( ((((struct GridVertex *)(& __1bgv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> bot__10TrimRegion . uend__8Gridline ), ((((struct GridVertex *)(& __1bgv ))-> gparam__10GridVertex [1 ])=
  659. __0this -> PTrimRegion-> bot__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1bgv ))))) ;
  660. ( (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> bot__10TrimRegion . uend__8Gridline ), ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [1 ])=
  661. __0this -> PTrimRegion-> top__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1gv ))))) ;
  662. ( (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline = ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> numverts__8Trimline ), (((struct
  663. Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(-- ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline )])) ;
  664. __glbgntmesh__7BackendFPc ( (struct Backend *)__0this -> backend__12CoveAndTiler , (char *)"coveLowerRight") ;
  665. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1bgv ))) ) ;
  666. ( (__1__X15 = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))->
  667. pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ), ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler ,
  668. __1__X15 ) ) ) ;
  669. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1gv ))) ) ;
  670. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  671. __glcoveLR__12CoveAndTilerFv ( __0this ) ;
  672. __glendtmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  673. }
  674. void __glcoveLowerRightNoGrid__12Co0 (struct CoveAndTiler *__0this , struct TrimVertex *__1tr )
  675. {
  676. struct TrimVertex *__1__X16 ;
  677. struct TrimVertex *__1__X17 ;
  678. __glbgntmesh__7BackendFPc ( (struct Backend *)__0this -> backend__12CoveAndTiler , (char *)"coveLowerRIght") ;
  679. ( (__1__X16 = ( (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline = ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))->
  680. numverts__8Trimline ), (((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(-- ((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline )])) ),
  681. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1__X16 ) ) ) ;
  682. ( (__1__X17 = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))->
  683. pts__8Trimline [(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ), ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler ,
  684. __1__X17 ) ) ) ;
  685. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1tr ) ) ;
  686. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  687. __glcoveLR__12CoveAndTilerFv ( __0this ) ;
  688. __glendtmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  689. }
  690. void __glcoveLR__12CoveAndTilerFv (struct CoveAndTiler *__0this )
  691. {
  692. struct GridVertex __1gv ;
  693. struct TrimVertex *__1vert ;
  694. void *__1__Xp00uzigaiaa ;
  695. ( (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])= __0this -> PTrimRegion-> bot__10TrimRegion . uend__8Gridline ), ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [1 ])=
  696. __0this -> PTrimRegion-> top__10TrimRegion . vindex__8Gridline )) ), ((((struct GridVertex *)(& __1gv ))))) ;
  697. __1vert = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct
  698. Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ;
  699. if (__1vert == 0 )return ;
  700. ((void )0 );
  701. if (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])++ )) >= __0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline ){
  702. for(;__1vert ;__1vert = (
  703. ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this ->
  704. PTrimRegion-> right__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ) {
  705. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  706. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  707. }
  708. }
  709. else
  710. while (1 ){
  711. if ((__1vert -> param__10TrimVertex [0 ])< (__0this -> PTrimRegion-> uarray__10TrimRegion . uarray__6Uarray [(__1gv . gparam__10GridVertex [0 ])])){
  712. __glswaptmesh__7BackendFv ( (struct Backend *)__0this ->
  713. backend__12CoveAndTiler ) ;
  714. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  715. __1vert = ( ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct
  716. Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ;
  717. if (__1vert == 0 )break ;
  718. }
  719. else
  720. {
  721. ( __gltmeshvert__7BackendFP10Gri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , ((struct GridVertex *)(& __1gv ))) ) ;
  722. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  723. if (( ((((struct GridVertex *)(& __1gv ))-> gparam__10GridVertex [0 ])++ )) == __0this -> PTrimRegion-> top__10TrimRegion . uend__8Gridline ){
  724. for(;__1vert ;__1vert = (
  725. ((((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> i__8Trimline >= 0 )?(((struct Trimline *)(& __0this -> PTrimRegion-> right__10TrimRegion ))-> pts__8Trimline [(((struct Trimline *)(& __0this ->
  726. PTrimRegion-> right__10TrimRegion ))-> i__8Trimline -- )]):(((struct TrimVertex *)0 )))) ) {
  727. __glswaptmesh__7BackendFv ( (struct Backend *)__0this -> backend__12CoveAndTiler ) ;
  728. ( __gltmeshvert__7BackendFP10Tri0 ( (struct Backend *)__0this -> backend__12CoveAndTiler , __1vert ) ) ;
  729. }
  730. break ;
  731. }
  732. }
  733. }
  734. }
  735. static void *__nw__FUi (
  736. size_t __1s )
  737. {
  738. void *__1__Xp00uzigaiaa ;
  739. __1__Xp00uzigaiaa = malloc ( __1s ) ;
  740. if (__1__Xp00uzigaiaa ){
  741. return __1__Xp00uzigaiaa ;
  742. }
  743. else
  744. {
  745. return __1__Xp00uzigaiaa ;
  746. }
  747. }
  748. /* the end */