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.

1693 lines
57 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 <setjmp.h>
  19. struct JumpBuffer {
  20. jmp_buf buf;
  21. };
  22. #define mysetjmp(x) setjmp((x)->buf)
  23. #define mylongjmp(x,y) longjmp((x)->buf, y)
  24. /* <<AT&T USL C++ Language System <3.0.1> 02/03/92>> */
  25. /* < ../core/intersect.c++ > */
  26. void *__vec_new (void *, int , int , void *);
  27. void __vec_ct (void *, int , int , void *);
  28. void __vec_dt (void *, int , int , void *);
  29. void __vec_delete (void *, int , int , void *, int , int );
  30. typedef int (*__vptp)(void);
  31. struct __mptr {short d; short i; __vptp f; };
  32. typedef unsigned int size_t ;
  33. // extern void *malloc (size_t );
  34. // extern void free (void *);
  35. struct JumpBuffer;
  36. struct Buffer;
  37. struct Buffer {
  38. struct Buffer *next__6Buffer ;
  39. };
  40. struct Pool;
  41. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  42. struct Pool {
  43. struct Buffer *freelist__4Pool ;
  44. char *blocklist__4Pool [32];
  45. int nextblock__4Pool ;
  46. char *curblock__4Pool ;
  47. int buffersize__4Pool ;
  48. int nextsize__4Pool ;
  49. int nextfree__4Pool ;
  50. int initsize__4Pool ;
  51. char *name__4Pool ;
  52. int magic__4Pool ;
  53. };
  54. void __glgrow__4PoolFv (struct Pool *);
  55. struct PooledObj;
  56. struct PooledObj {
  57. char __W3__9PooledObj ;
  58. };
  59. typedef float REAL ;
  60. typedef void (*Pfvv )(void );
  61. typedef void (*Pfvf )(float *);
  62. typedef int (*cmpfunc )(void *, void *);
  63. typedef REAL Knot ;
  64. typedef REAL *Knot_ptr ;
  65. struct TrimVertex;
  66. struct PwlArc;
  67. struct PwlArc {
  68. char __W3__9PooledObj ;
  69. struct TrimVertex *pts__6PwlArc ;
  70. int npts__6PwlArc ;
  71. long type__6PwlArc ;
  72. };
  73. struct TrimVertex;
  74. struct TrimVertex {
  75. REAL param__10TrimVertex [2];
  76. long nuid__10TrimVertex ;
  77. };
  78. typedef struct TrimVertex *TrimVertex_p ;
  79. struct Bin;
  80. struct Arc;
  81. struct BezierArc;
  82. typedef struct Arc *Arc_ptr ;
  83. enum arc_side { arc_none = 0, arc_right = 1, arc_top = 2, arc_left = 3, arc_bottom = 4} ;
  84. struct Arc;
  85. struct Arc {
  86. char __W3__9PooledObj ;
  87. Arc_ptr prev__3Arc ;
  88. Arc_ptr next__3Arc ;
  89. Arc_ptr link__3Arc ;
  90. struct BezierArc *bezierArc__3Arc ;
  91. struct PwlArc *pwlArc__3Arc ;
  92. long type__3Arc ;
  93. long nuid__3Arc ;
  94. };
  95. extern int __glbezier_tag__3Arc ;
  96. extern int __glarc_tag__3Arc ;
  97. extern int __gltail_tag__3Arc ;
  98. struct Bin;
  99. struct Bin {
  100. struct Arc *head__3Bin ;
  101. struct Arc *current__3Bin ;
  102. };
  103. struct Sorter;
  104. struct Sorter {
  105. int es__6Sorter ;
  106. struct __mptr *__vptr__6Sorter ;
  107. };
  108. struct FlistSorter;
  109. struct FlistSorter {
  110. int es__6Sorter ;
  111. struct __mptr *__vptr__6Sorter ;
  112. };
  113. struct Flist;
  114. struct Flist {
  115. REAL *pts__5Flist ;
  116. int npts__5Flist ;
  117. int start__5Flist ;
  118. int end__5Flist ;
  119. struct FlistSorter sorter__5Flist ;
  120. };
  121. struct Backend;
  122. struct Jarcloc;
  123. struct Jarcloc {
  124. struct Arc *arc__7Jarcloc ;
  125. struct TrimVertex *p__7Jarcloc ;
  126. struct TrimVertex *plast__7Jarcloc ;
  127. };
  128. struct Trimline;
  129. struct Trimline {
  130. struct TrimVertex **pts__8Trimline ;
  131. long numverts__8Trimline ;
  132. long i__8Trimline ;
  133. long size__8Trimline ;
  134. struct Jarcloc jarcl__8Trimline ;
  135. struct TrimVertex t__8Trimline ;
  136. struct TrimVertex b__8Trimline ;
  137. struct TrimVertex *tinterp__8Trimline ;
  138. struct TrimVertex *binterp__8Trimline ;
  139. };
  140. struct Gridline;
  141. struct Gridline {
  142. long v__8Gridline ;
  143. REAL vval__8Gridline ;
  144. long vindex__8Gridline ;
  145. long ustart__8Gridline ;
  146. long uend__8Gridline ;
  147. };
  148. struct Uarray;
  149. struct Uarray {
  150. long size__6Uarray ;
  151. long ulines__6Uarray ;
  152. REAL *uarray__6Uarray ;
  153. };
  154. struct Backend;
  155. struct TrimRegion;
  156. void __gl__dt__8TrimlineFv (struct Trimline *, int );
  157. void __gl__dt__6UarrayFv (struct Uarray *, int );
  158. struct TrimRegion {
  159. struct Trimline left__10TrimRegion ;
  160. struct Trimline right__10TrimRegion ;
  161. struct Gridline top__10TrimRegion ;
  162. struct Gridline bot__10TrimRegion ;
  163. struct Uarray uarray__10TrimRegion ;
  164. REAL oneOverDu__10TrimRegion ;
  165. };
  166. struct GridTrimVertex;
  167. struct __Q2_4Hull4Side;
  168. struct __Q2_4Hull4Side {
  169. struct Trimline *left__Q2_4Hull4Side ;
  170. struct Gridline *line__Q2_4Hull4Side ;
  171. struct Trimline *right__Q2_4Hull4Side ;
  172. long index__Q2_4Hull4Side ;
  173. };
  174. struct Hull;
  175. struct Hull {
  176. struct __Q2_4Hull4Side lower__4Hull ;
  177. struct __Q2_4Hull4Side upper__4Hull ;
  178. struct Trimline fakeleft__4Hull ;
  179. struct Trimline fakeright__4Hull ;
  180. struct TrimRegion *PTrimRegion;
  181. struct TrimRegion OTrimRegion;
  182. };
  183. struct Backend;
  184. struct GridTrimVertex;
  185. struct Mesher;
  186. struct Mesher {
  187. struct __Q2_4Hull4Side lower__4Hull ;
  188. struct __Q2_4Hull4Side upper__4Hull ;
  189. struct Trimline fakeleft__4Hull ;
  190. struct Trimline fakeright__4Hull ;
  191. struct TrimRegion *PTrimRegion;
  192. struct Backend *backend__6Mesher ;
  193. struct Pool p__6Mesher ;
  194. unsigned int stacksize__6Mesher ;
  195. struct GridTrimVertex **vdata__6Mesher ;
  196. struct GridTrimVertex *last__6Mesher [2];
  197. int itop__6Mesher ;
  198. int lastedge__6Mesher ;
  199. struct TrimRegion OTrimRegion;
  200. };
  201. extern float __glZERO__6Mesher ;
  202. struct Backend;
  203. struct GridVertex;
  204. struct GridTrimVertex;
  205. struct CoveAndTiler;
  206. struct CoveAndTiler {
  207. struct Backend *backend__12CoveAndTiler ;
  208. struct TrimRegion *PTrimRegion;
  209. struct TrimRegion OTrimRegion;
  210. };
  211. extern int __glMAXSTRIPSIZE__12CoveAndTil0 ;
  212. struct Backend;
  213. struct Slicer;
  214. struct Slicer {
  215. struct Backend *backend__12CoveAndTiler ;
  216. struct TrimRegion *PTrimRegion;
  217. struct Mesher OMesher;
  218. struct Backend *backend__6Slicer ;
  219. REAL oneOverDu__6Slicer ;
  220. REAL du__6Slicer ;
  221. REAL dv__6Slicer ;
  222. int isolines__6Slicer ;
  223. };
  224. struct BezierArc;
  225. struct TrimVertexPool;
  226. struct ArcTessellator;
  227. struct ArcTessellator {
  228. struct Pool *pwlarcpool__14ArcTessellator ;
  229. struct TrimVertexPool *trimvertexpool__14ArcTessellator ;
  230. };
  231. extern REAL __glgl_Bernstein__14ArcTessell0 [][24][24];
  232. struct TrimVertexPool;
  233. struct TrimVertexPool {
  234. struct Pool pool__14TrimVertexPool ;
  235. struct TrimVertex **vlist__14TrimVertexPool ;
  236. int nextvlistslot__14TrimVertexPool ;
  237. int vlistsize__14TrimVertexPool ;
  238. };
  239. struct Renderhints;
  240. struct Backend;
  241. struct Quilt;
  242. struct Patchlist;
  243. struct Curvelist;
  244. struct JumpBuffer;
  245. struct Subdivider;
  246. enum __Q2_10Subdivider3dir { down__Q2_10Subdivider3dir = 0, same__Q2_10Subdivider3dir = 1, up__Q2_10Subdivider3dir = 2, none__Q2_10Subdivider3dir = 3} ;
  247. struct Subdivider {
  248. struct Slicer slicer__10Subdivider ;
  249. struct ArcTessellator arctessellator__10Subdivider ;
  250. struct Pool arcpool__10Subdivider ;
  251. struct Pool bezierarcpool__10Subdivider ;
  252. struct Pool pwlarcpool__10Subdivider ;
  253. struct TrimVertexPool trimvertexpool__10Subdivider ;
  254. struct JumpBuffer *jumpbuffer__10Subdivider ;
  255. struct Renderhints *renderhints__10Subdivider ;
  256. struct Backend *backend__10Subdivider ;
  257. struct Bin initialbin__10Subdivider ;
  258. struct Arc *pjarc__10Subdivider ;
  259. int s_index__10Subdivider ;
  260. int t_index__10Subdivider ;
  261. struct Quilt *qlist__10Subdivider ;
  262. struct Flist spbrkpts__10Subdivider ;
  263. struct Flist tpbrkpts__10Subdivider ;
  264. struct Flist smbrkpts__10Subdivider ;
  265. struct Flist tmbrkpts__10Subdivider ;
  266. REAL stepsizes__10Subdivider [4];
  267. int showDegenerate__10Subdivider ;
  268. int isArcTypeBezier__10Subdivider ;
  269. };
  270. struct GridVertex;
  271. struct GridVertex {
  272. long gparam__10GridVertex [2];
  273. };
  274. struct GridTrimVertex;
  275. struct GridTrimVertex {
  276. char __W3__9PooledObj ;
  277. struct TrimVertex dummyt__14GridTrimVertex ;
  278. struct GridVertex dummyg__14GridTrimVertex ;
  279. struct TrimVertex *t__14GridTrimVertex ;
  280. struct GridVertex *g__14GridTrimVertex ;
  281. };
  282. typedef struct GridTrimVertex *GridTrimVertex_p ;
  283. struct BasicCurveEvaluator;
  284. struct BasicSurfaceEvaluator;
  285. struct Backend;
  286. struct Backend {
  287. struct BasicCurveEvaluator *curveEvaluator__7Backend ;
  288. struct BasicSurfaceEvaluator *surfaceEvaluator__7Backend ;
  289. int wireframetris__7Backend ;
  290. int wireframequads__7Backend ;
  291. int npts__7Backend ;
  292. REAL mesh__7Backend [3][4];
  293. int meshindex__7Backend ;
  294. };
  295. enum i_result { INTERSECT_VERTEX = 0, INTERSECT_EDGE = 1} ;
  296. struct Bin *__gl__ct__3BinFv (struct Bin *);
  297. int __glarc_split__10SubdividerFP30 (struct Subdivider *, struct Arc *, int , REAL , int );
  298. void __glclassify_headonleft_s__10S0 (struct Subdivider *, struct Bin *, struct Bin *, struct Bin *, REAL );
  299. void __glclassify_tailonleft_s__10S0 (struct Subdivider *, struct Bin *, struct Bin *, struct Bin *, REAL );
  300. void __glclassify_headonright_s__100 (struct Subdivider *, struct Bin *, struct Bin *, struct Bin *, REAL );
  301. void __glclassify_tailonright_s__100 (struct Subdivider *, struct Bin *, struct Bin *, struct Bin *, REAL );
  302. void __glclassify_headonleft_t__10S0 (struct Subdivider *, struct Bin *, struct Bin *, struct Bin *, REAL );
  303. void __glclassify_tailonleft_t__10S0 (struct Subdivider *, struct Bin *, struct Bin *, struct Bin *, REAL );
  304. void __glclassify_headonright_t__100 (struct Subdivider *, struct Bin *, struct Bin *, struct Bin *, REAL );
  305. void __glclassify_tailonright_t__100 (struct Subdivider *, struct Bin *, struct Bin *, struct Bin *, REAL );
  306. extern struct __mptr* __ptbl_vec_____core_intersect_c___partition_[];
  307. void __gl__dt__3BinFv (struct Bin *, int );
  308. void __glpartition__10SubdividerFR30 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1left , struct Bin *__1intersections ,
  309. struct Bin *__1right , struct Bin *__1unknown , int
  310. __1param , REAL __1value )
  311. {
  312. struct Bin __1headonleft ;
  313. struct Bin __1headonright ;
  314. struct Bin __1tailonleft ;
  315. struct Bin __1tailonright ;
  316. __gl__ct__3BinFv ( (struct Bin *)(& __1headonleft )) ;
  317. __gl__ct__3BinFv ( (struct Bin *)(& __1headonright )) ;
  318. __gl__ct__3BinFv ( (struct Bin *)(& __1tailonleft )) ;
  319. __gl__ct__3BinFv ( (struct Bin *)(& __1tailonright )) ;
  320. { { Arc_ptr __1jarc ;
  321. struct Arc *__1__Xjarc00efckaice ;
  322. __1jarc = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ), 0 )
  323. :( 0 ) ), __1__Xjarc00efckaice ) ) ;
  324. for(;__1jarc ;__1jarc = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ), 0 )
  325. :( 0 ) ), __1__Xjarc00efckaice ) ) ) {
  326. REAL __2tdiff ;
  327. REAL __2hdiff ;
  328. __2tdiff = ((( (((REAL *)(((struct Arc *)__1jarc )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [__1param ])- __1value );
  329. __2hdiff = ((( (((REAL *)(((struct Arc *)__1jarc )-> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [__1param ])- __1value );
  330. if (__2tdiff > 0.0 ){
  331. if (__2hdiff > 0.0 ){
  332. ( (__1jarc -> link__3Arc = ((struct Bin *)__1right )-> head__3Bin ), (((struct Bin *)__1right )->
  333. head__3Bin = __1jarc )) ;
  334. }
  335. else
  336. if (__2hdiff == 0.0 ){
  337. ( (__1jarc -> link__3Arc = ((struct Bin *)(& __1tailonright ))-> head__3Bin ), (((struct Bin *)(& __1tailonright ))->
  338. head__3Bin = __1jarc )) ;
  339. }
  340. else
  341. {
  342. Arc_ptr __4jtemp ;
  343. switch (__glarc_split__10SubdividerFP30 ( __0this , __1jarc , __1param , __1value , 0 ) ){
  344. struct Arc *__1__X13 ;
  345. struct Arc *__1__X14 ;
  346. struct Arc *__1__X15 ;
  347. struct Arc *__1__X16 ;
  348. struct Arc *__1__X17 ;
  349. struct Arc *__1__X18 ;
  350. struct Arc *__1__X19 ;
  351. struct Arc *__1__X20 ;
  352. case 2 :
  353. ( (__1jarc -> link__3Arc = ((struct Bin *)(& __1tailonright ))-> head__3Bin ), (((struct Bin *)(& __1tailonright ))-> head__3Bin = __1jarc )) ;
  354. ( (__1__X13 = __1jarc -> next__3Arc ), ( (__1__X13 -> link__3Arc = ((struct Bin *)(& __1headonleft ))-> head__3Bin ), (((struct Bin *)(& __1headonleft ))->
  355. head__3Bin = __1__X13 )) ) ;
  356. break ;
  357. case 31 :
  358. ((void )0 );
  359. ( (__1jarc -> link__3Arc = ((struct Bin *)__1right )-> head__3Bin ), (((struct Bin *)__1right )-> head__3Bin = __1jarc )) ;
  360. ( (__1__X14 = (__4jtemp = __1jarc -> next__3Arc )), ( (__1__X14 -> link__3Arc = ((struct Bin *)(& __1tailonright ))-> head__3Bin ), (((struct Bin *)(&
  361. __1tailonright ))-> head__3Bin = __1__X14 )) ) ;
  362. ( (__1__X15 = __4jtemp -> next__3Arc ), ( (__1__X15 -> link__3Arc = ((struct Bin *)(& __1headonleft ))-> head__3Bin ), (((struct Bin *)(& __1headonleft ))->
  363. head__3Bin = __1__X15 )) ) ;
  364. break ;
  365. case 32 :
  366. ((void )0 );
  367. ( (__1jarc -> link__3Arc = ((struct Bin *)(& __1tailonright ))-> head__3Bin ), (((struct Bin *)(& __1tailonright ))-> head__3Bin = __1jarc )) ;
  368. ( (__1__X16 = (__4jtemp = __1jarc -> next__3Arc )), ( (__1__X16 -> link__3Arc = ((struct Bin *)(& __1headonleft ))-> head__3Bin ), (((struct Bin *)(&
  369. __1headonleft ))-> head__3Bin = __1__X16 )) ) ;
  370. ( (__1__X17 = __4jtemp -> next__3Arc ), ( (__1__X17 -> link__3Arc = ((struct Bin *)__1left )-> head__3Bin ), (((struct Bin *)__1left )-> head__3Bin = __1__X17 ))
  371. ) ;
  372. break ;
  373. case 4 :
  374. ( (__1jarc -> link__3Arc = ((struct Bin *)__1right )-> head__3Bin ), (((struct Bin *)__1right )-> head__3Bin = __1jarc )) ;
  375. ( (__1__X18 = (__4jtemp = __1jarc -> next__3Arc )), ( (__1__X18 -> link__3Arc = ((struct Bin *)(& __1tailonright ))-> head__3Bin ), (((struct Bin *)(&
  376. __1tailonright ))-> head__3Bin = __1__X18 )) ) ;
  377. ( (__1__X19 = (__4jtemp = __4jtemp -> next__3Arc )), ( (__1__X19 -> link__3Arc = ((struct Bin *)(& __1headonleft ))-> head__3Bin ), (((struct Bin *)(&
  378. __1headonleft ))-> head__3Bin = __1__X19 )) ) ;
  379. ( (__1__X20 = __4jtemp -> next__3Arc ), ( (__1__X20 -> link__3Arc = ((struct Bin *)__1left )-> head__3Bin ), (((struct Bin *)__1left )-> head__3Bin = __1__X20 ))
  380. ) ;
  381. }
  382. }
  383. }
  384. else
  385. if (__2tdiff == 0.0 ){
  386. if (__2hdiff > 0.0 ){
  387. ( (__1jarc -> link__3Arc = ((struct Bin *)(& __1headonright ))-> head__3Bin ),
  388. (((struct Bin *)(& __1headonright ))-> head__3Bin = __1jarc )) ;
  389. }
  390. else
  391. if (__2hdiff == 0.0 ){
  392. ( (__1jarc -> link__3Arc = ((struct Bin *)__1unknown )-> head__3Bin ), (((struct Bin *)__1unknown )-> head__3Bin = __1jarc ))
  393. ;
  394. }
  395. else
  396. {
  397. ( (__1jarc -> link__3Arc = ((struct Bin *)(& __1headonleft ))-> head__3Bin ), (((struct Bin *)(& __1headonleft ))-> head__3Bin = __1jarc ))
  398. ;
  399. }
  400. }
  401. else
  402. {
  403. if (__2hdiff > 0.0 ){
  404. Arc_ptr __4jtemp ;
  405. switch (__glarc_split__10SubdividerFP30 ( __0this , __1jarc , __1param , __1value , 1 ) ){
  406. struct Arc *__1__X21 ;
  407. struct Arc *__1__X22 ;
  408. struct Arc *__1__X23 ;
  409. struct Arc *__1__X24 ;
  410. struct Arc *__1__X25 ;
  411. struct Arc *__1__X26 ;
  412. struct Arc *__1__X27 ;
  413. struct Arc *__1__X28 ;
  414. case 2 :
  415. ( (__1jarc -> link__3Arc = ((struct Bin *)(& __1tailonleft ))-> head__3Bin ), (((struct Bin *)(& __1tailonleft ))-> head__3Bin = __1jarc )) ;
  416. ( (__1__X21 = __1jarc -> next__3Arc ), ( (__1__X21 -> link__3Arc = ((struct Bin *)(& __1headonright ))-> head__3Bin ), (((struct Bin *)(& __1headonright ))->
  417. head__3Bin = __1__X21 )) ) ;
  418. break ;
  419. case 31 :
  420. ((void )0 );
  421. ( (__1jarc -> link__3Arc = ((struct Bin *)__1left )-> head__3Bin ), (((struct Bin *)__1left )-> head__3Bin = __1jarc )) ;
  422. ( (__1__X22 = (__4jtemp = __1jarc -> next__3Arc )), ( (__1__X22 -> link__3Arc = ((struct Bin *)(& __1tailonleft ))-> head__3Bin ), (((struct Bin *)(&
  423. __1tailonleft ))-> head__3Bin = __1__X22 )) ) ;
  424. ( (__1__X23 = __4jtemp -> next__3Arc ), ( (__1__X23 -> link__3Arc = ((struct Bin *)(& __1headonright ))-> head__3Bin ), (((struct Bin *)(& __1headonright ))->
  425. head__3Bin = __1__X23 )) ) ;
  426. break ;
  427. case 32 :
  428. ((void )0 );
  429. ( (__1jarc -> link__3Arc = ((struct Bin *)(& __1tailonleft ))-> head__3Bin ), (((struct Bin *)(& __1tailonleft ))-> head__3Bin = __1jarc )) ;
  430. ( (__1__X24 = (__4jtemp = __1jarc -> next__3Arc )), ( (__1__X24 -> link__3Arc = ((struct Bin *)(& __1headonright ))-> head__3Bin ), (((struct Bin *)(&
  431. __1headonright ))-> head__3Bin = __1__X24 )) ) ;
  432. ( (__1__X25 = __4jtemp -> next__3Arc ), ( (__1__X25 -> link__3Arc = ((struct Bin *)__1right )-> head__3Bin ), (((struct Bin *)__1right )-> head__3Bin = __1__X25 ))
  433. ) ;
  434. break ;
  435. case 4 :
  436. ( (__1jarc -> link__3Arc = ((struct Bin *)__1left )-> head__3Bin ), (((struct Bin *)__1left )-> head__3Bin = __1jarc )) ;
  437. ( (__1__X26 = (__4jtemp = __1jarc -> next__3Arc )), ( (__1__X26 -> link__3Arc = ((struct Bin *)(& __1tailonleft ))-> head__3Bin ), (((struct Bin *)(&
  438. __1tailonleft ))-> head__3Bin = __1__X26 )) ) ;
  439. ( (__1__X27 = (__4jtemp = __4jtemp -> next__3Arc )), ( (__1__X27 -> link__3Arc = ((struct Bin *)(& __1headonright ))-> head__3Bin ), (((struct Bin *)(&
  440. __1headonright ))-> head__3Bin = __1__X27 )) ) ;
  441. ( (__1__X28 = __4jtemp -> next__3Arc ), ( (__1__X28 -> link__3Arc = ((struct Bin *)__1right )-> head__3Bin ), (((struct Bin *)__1right )-> head__3Bin = __1__X28 ))
  442. ) ;
  443. }
  444. }
  445. else
  446. if (__2hdiff == 0.0 ){
  447. ( (__1jarc -> link__3Arc = ((struct Bin *)(& __1tailonleft ))-> head__3Bin ), (((struct Bin *)(& __1tailonleft ))->
  448. head__3Bin = __1jarc )) ;
  449. }
  450. else
  451. {
  452. ( (__1jarc -> link__3Arc = ((struct Bin *)__1left )-> head__3Bin ), (((struct Bin *)__1left )-> head__3Bin = __1jarc )) ;
  453. }
  454. }
  455. }
  456. if (__1param == 0 ){
  457. __glclassify_headonleft_s__10S0 ( __0this , (struct Bin *)(& __1headonleft ), __1intersections , __1left , __1value ) ;
  458. __glclassify_tailonleft_s__10S0 ( __0this , (struct Bin *)(& __1tailonleft ), __1intersections , __1left , __1value ) ;
  459. __glclassify_headonright_s__100 ( __0this , (struct Bin *)(& __1headonright ), __1intersections , __1right , __1value ) ;
  460. __glclassify_tailonright_s__100 ( __0this , (struct Bin *)(& __1tailonright ), __1intersections , __1right , __1value ) ;
  461. }
  462. else
  463. {
  464. __glclassify_headonleft_t__10S0 ( __0this , (struct Bin *)(& __1headonleft ), __1intersections , __1left , __1value ) ;
  465. __glclassify_tailonleft_t__10S0 ( __0this , (struct Bin *)(& __1tailonleft ), __1intersections , __1left , __1value ) ;
  466. __glclassify_headonright_t__100 ( __0this , (struct Bin *)(& __1headonright ), __1intersections , __1right , __1value ) ;
  467. __glclassify_tailonright_t__100 ( __0this , (struct Bin *)(& __1tailonright ), __1intersections , __1right , __1value ) ;
  468. }
  469. }
  470. }
  471. __gl__dt__3BinFv ( (struct Bin *)(& __1tailonright ), 2) ;
  472. __gl__dt__3BinFv ( (struct Bin *)(& __1tailonleft ), 2) ;
  473. __gl__dt__3BinFv ( (struct Bin *)(& __1headonright ), 2) ;
  474. __gl__dt__3BinFv ( (struct Bin *)(& __1headonleft ), 2) ;
  475. }
  476. static int pwlarc_intersect__FP6PwlArcifT2Pi (struct PwlArc *, int , REAL , int , int *);
  477. struct TrimVertex *__glget__14TrimVertexPoolFi (struct TrimVertexPool *, int );
  478. void __gltriangle__7BackendFP10Trim0 (struct Backend *, struct TrimVertex *, struct TrimVertex *, struct TrimVertex *);
  479. static void *__nw__9PooledObjSFUiR4Pool (size_t , struct Pool *);
  480. int __glarc_split__10SubdividerFP30 (struct Subdivider *__0this , Arc_ptr __1jarc , int __1param , REAL __1value , int __1dir )
  481. {
  482. int __1maxvertex ;
  483. Arc_ptr __1jarc1 ;
  484. Arc_ptr __1jarc2 ;
  485. Arc_ptr __1jarc3 ;
  486. struct TrimVertex *__1v ;
  487. int __1loc [3];
  488. __1maxvertex = __1jarc -> pwlArc__3Arc -> npts__6PwlArc ;
  489. __1v = __1jarc -> pwlArc__3Arc -> pts__6PwlArc ;
  490. switch (pwlarc_intersect__FP6PwlArcifT2Pi ( __1jarc -> pwlArc__3Arc , __1param , __1value , __1dir , (int *)__1loc ) ){
  491. case 0:{
  492. struct Arc *__0__X29 ;
  493. void *__1__Xbuffer00eohgaiaa ;
  494. struct PwlArc *__0__X30 ;
  495. struct PwlArc *__1__X31 ;
  496. __1jarc1 = ((__0__X29 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  497. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  498. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  499. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  500. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  501. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  502. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (__1__X31 =
  503. ((__0__X30 = (struct PwlArc *)__nw__9PooledObjSFUiR4Pool ( sizeof (struct PwlArc ), (struct Pool *)(& __0this -> pwlarcpool__10Subdivider )) )?( (((struct PwlArc *)__0__X30 )-> pts__6PwlArc =
  504. (& (__1v [(__1loc [1 ])]))), ( (((struct PwlArc *)__0__X30 )-> npts__6PwlArc = (__1maxvertex - (__1loc [1 ]))), ( (((struct PwlArc *)__0__X30 )-> type__6PwlArc = 0x8 ), ((((struct
  505. PwlArc *)__0__X30 )))) ) ) :0 )), ( (((struct Arc *)__0__X29 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X29 )-> pwlArc__3Arc = __1__X31 ),
  506. ( (((struct Arc *)__0__X29 )-> type__3Arc = __1jarc -> type__3Arc ), ( (((struct Arc *)__0__X29 )-> nuid__3Arc = __1jarc -> nuid__3Arc ), ((((struct Arc *)__0__X29 ))))
  507. ) ) ) ) :0 );
  508. __1jarc -> pwlArc__3Arc -> npts__6PwlArc = ((__1loc [1 ])+ 1 );
  509. __1jarc1 -> next__3Arc = __1jarc -> next__3Arc ;
  510. __1jarc1 -> next__3Arc -> prev__3Arc = __1jarc1 ;
  511. __1jarc -> next__3Arc = __1jarc1 ;
  512. __1jarc1 -> prev__3Arc = __1jarc ;
  513. ((void )0 );
  514. return 2 ;
  515. }
  516. case 1:{
  517. int __3i ;
  518. int __3j ;
  519. if (__1dir == 0 ){
  520. __3i = (__1loc [0 ]);
  521. __3j = (__1loc [2 ]);
  522. }
  523. else
  524. {
  525. __3i = (__1loc [2 ]);
  526. __3j = (__1loc [0 ]);
  527. }
  528. { struct TrimVertex *__3newjunk ;
  529. struct TrimVertex *__1__X32 ;
  530. struct TrimVertex *__1__X33 ;
  531. struct TrimVertex *__1__X34 ;
  532. float __2__Xratio002aztaiac ;
  533. __3newjunk = __glget__14TrimVertexPoolFi ( (struct TrimVertexPool *)(& __0this -> trimvertexpool__10Subdivider ), 3 ) ;
  534. (__1v [__3i ]). nuid__10TrimVertex = __1jarc -> nuid__3Arc ;
  535. (__1v [__3j ]). nuid__10TrimVertex = __1jarc -> nuid__3Arc ;
  536. (__3newjunk [0 ])= __1v [__3j ];
  537. (__3newjunk [2 ])= __1v [__3i ];
  538. ( (__1__X32 = (& (__3newjunk [1 ]))), ( (__1__X33 = (& (__1v [(__1loc [0 ])]))), ( (__1__X34 = (& (__1v [(__1loc [2 ])]))), ( (((void
  539. )0 )), ( (((void )0 )), ( (__1__X32 -> nuid__10TrimVertex = __1__X33 -> nuid__10TrimVertex ), ( ((__1__X32 -> param__10TrimVertex [__1param ])= __1value ), (((__1__X33 ->
  540. param__10TrimVertex [(1 - __1param )])!= (__1__X34 -> param__10TrimVertex [(1 - __1param )]))?( (__2__Xratio002aztaiac = ((__1value - (__1__X33 -> param__10TrimVertex [__1param ]))/ ((__1__X34 -> param__10TrimVertex [__1param ])- (__1__X33 -> param__10TrimVertex [__1param ])))), ((__1__X32 ->
  541. param__10TrimVertex [(1 - __1param )])= ((__1__X33 -> param__10TrimVertex [(1 - __1param )])+ (__2__Xratio002aztaiac * ((__1__X34 -> param__10TrimVertex [(1 - __1param )])- (__1__X33 -> param__10TrimVertex [(1 - __1param )])))))) :((__1__X32 -> param__10TrimVertex [(1 -
  542. __1param )])= (__1__X33 -> param__10TrimVertex [(1 - __1param )])))) ) ) ) ) ) ) ;
  543. if (( __0this -> showDegenerate__10Subdivider ) )
  544. __gltriangle__7BackendFP10Trim0 ( (struct Backend *)__0this -> backend__10Subdivider , & (__3newjunk [2 ]), & (__3newjunk [1 ]), & (__3newjunk [0 ]))
  545. ;
  546. if (__1maxvertex == 2 ){
  547. struct Arc *__0__X35 ;
  548. void *__1__Xbuffer00eohgaiaa ;
  549. struct PwlArc *__0__X36 ;
  550. struct PwlArc *__1__X37 ;
  551. __1jarc1 = ((__0__X35 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  552. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  553. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  554. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  555. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  556. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  557. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (__1__X37 =
  558. ((__0__X36 = (struct PwlArc *)__nw__9PooledObjSFUiR4Pool ( sizeof (struct PwlArc ), (struct Pool *)(& __0this -> pwlarcpool__10Subdivider )) )?( (((struct PwlArc *)__0__X36 )-> pts__6PwlArc =
  559. (__3newjunk + 1 )), ( (((struct PwlArc *)__0__X36 )-> npts__6PwlArc = 2 ), ( (((struct PwlArc *)__0__X36 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X36 ))))
  560. ) ) :0 )), ( (((struct Arc *)__0__X35 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X35 )-> pwlArc__3Arc = __1__X37 ), (
  561. (((struct Arc *)__0__X35 )-> type__3Arc = __1jarc -> type__3Arc ), ( (((struct Arc *)__0__X35 )-> nuid__3Arc = __1jarc -> nuid__3Arc ), ((((struct Arc *)__0__X35 )))) )
  562. ) ) ) :0 );
  563. __1jarc -> pwlArc__3Arc -> npts__6PwlArc = 2 ;
  564. __1jarc -> pwlArc__3Arc -> pts__6PwlArc = __3newjunk ;
  565. __1jarc1 -> next__3Arc = __1jarc -> next__3Arc ;
  566. __1jarc1 -> next__3Arc -> prev__3Arc = __1jarc1 ;
  567. __1jarc -> next__3Arc = __1jarc1 ;
  568. __1jarc1 -> prev__3Arc = __1jarc ;
  569. ((void )0 );
  570. return 2 ;
  571. }
  572. else
  573. if ((__1maxvertex - __3j )== 2 ){
  574. struct Arc *__0__X38 ;
  575. void *__1__Xbuffer00eohgaiaa ;
  576. struct PwlArc *__0__X39 ;
  577. struct PwlArc *__1__X40 ;
  578. struct Arc *__0__X41 ;
  579. struct PwlArc *__0__X42 ;
  580. struct PwlArc *__1__X43 ;
  581. __1jarc1 = ((__0__X38 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  582. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  583. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  584. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  585. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  586. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  587. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (__1__X40 =
  588. ((__0__X39 = (struct PwlArc *)__nw__9PooledObjSFUiR4Pool ( sizeof (struct PwlArc ), (struct Pool *)(& __0this -> pwlarcpool__10Subdivider )) )?( (((struct PwlArc *)__0__X39 )-> pts__6PwlArc =
  589. __3newjunk ), ( (((struct PwlArc *)__0__X39 )-> npts__6PwlArc = 2 ), ( (((struct PwlArc *)__0__X39 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X39 )))) )
  590. ) :0 )), ( (((struct Arc *)__0__X38 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X38 )-> pwlArc__3Arc = __1__X40 ), ( (((struct
  591. Arc *)__0__X38 )-> type__3Arc = __1jarc -> type__3Arc ), ( (((struct Arc *)__0__X38 )-> nuid__3Arc = __1jarc -> nuid__3Arc ), ((((struct Arc *)__0__X38 )))) ) )
  592. ) ) :0 );
  593. __1jarc2 = ((__0__X41 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  594. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  595. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  596. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  597. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  598. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  599. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (__1__X43 =
  600. ((__0__X42 = (struct PwlArc *)__nw__9PooledObjSFUiR4Pool ( sizeof (struct PwlArc ), (struct Pool *)(& __0this -> pwlarcpool__10Subdivider )) )?( (((struct PwlArc *)__0__X42 )-> pts__6PwlArc =
  601. (__3newjunk + 1 )), ( (((struct PwlArc *)__0__X42 )-> npts__6PwlArc = 2 ), ( (((struct PwlArc *)__0__X42 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X42 ))))
  602. ) ) :0 )), ( (((struct Arc *)__0__X41 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X41 )-> pwlArc__3Arc = __1__X43 ), (
  603. (((struct Arc *)__0__X41 )-> type__3Arc = __1jarc -> type__3Arc ), ( (((struct Arc *)__0__X41 )-> nuid__3Arc = __1jarc -> nuid__3Arc ), ((((struct Arc *)__0__X41 )))) )
  604. ) ) ) :0 );
  605. __1jarc -> pwlArc__3Arc -> npts__6PwlArc = (__1maxvertex - 1 );
  606. __1jarc2 -> next__3Arc = __1jarc -> next__3Arc ;
  607. __1jarc2 -> next__3Arc -> prev__3Arc = __1jarc2 ;
  608. __1jarc -> next__3Arc = __1jarc1 ;
  609. __1jarc1 -> prev__3Arc = __1jarc ;
  610. __1jarc1 -> next__3Arc = __1jarc2 ;
  611. __1jarc2 -> prev__3Arc = __1jarc1 ;
  612. ((void )0 );
  613. return 31 ;
  614. }
  615. else
  616. if (__3i == 1 ){
  617. struct Arc *__0__X44 ;
  618. void *__1__Xbuffer00eohgaiaa ;
  619. struct PwlArc *__0__X45 ;
  620. struct PwlArc *__1__X46 ;
  621. struct Arc *__0__X47 ;
  622. struct PwlArc *__0__X48 ;
  623. struct PwlArc *__1__X49 ;
  624. __1jarc1 = ((__0__X44 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  625. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  626. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  627. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  628. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  629. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  630. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (__1__X46 =
  631. ((__0__X45 = (struct PwlArc *)__nw__9PooledObjSFUiR4Pool ( sizeof (struct PwlArc ), (struct Pool *)(& __0this -> pwlarcpool__10Subdivider )) )?( (((struct PwlArc *)__0__X45 )-> pts__6PwlArc =
  632. (__3newjunk + 1 )), ( (((struct PwlArc *)__0__X45 )-> npts__6PwlArc = 2 ), ( (((struct PwlArc *)__0__X45 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X45 ))))
  633. ) ) :0 )), ( (((struct Arc *)__0__X44 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X44 )-> pwlArc__3Arc = __1__X46 ), (
  634. (((struct Arc *)__0__X44 )-> type__3Arc = __1jarc -> type__3Arc ), ( (((struct Arc *)__0__X44 )-> nuid__3Arc = __1jarc -> nuid__3Arc ), ((((struct Arc *)__0__X44 )))) )
  635. ) ) ) :0 );
  636. __1jarc2 = ((__0__X47 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  637. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  638. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  639. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  640. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  641. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  642. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (__1__X49 =
  643. ((__0__X48 = (struct PwlArc *)__nw__9PooledObjSFUiR4Pool ( sizeof (struct PwlArc ), (struct Pool *)(& __0this -> pwlarcpool__10Subdivider )) )?( (((struct PwlArc *)__0__X48 )-> pts__6PwlArc =
  644. (& (__1jarc -> pwlArc__3Arc -> pts__6PwlArc [1 ]))), ( (((struct PwlArc *)__0__X48 )-> npts__6PwlArc = (__1maxvertex - 1 )), ( (((struct PwlArc *)__0__X48 )-> type__6PwlArc =
  645. 0x8 ), ((((struct PwlArc *)__0__X48 )))) ) ) :0 )), ( (((struct Arc *)__0__X47 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X47 )->
  646. pwlArc__3Arc = __1__X49 ), ( (((struct Arc *)__0__X47 )-> type__3Arc = __1jarc -> type__3Arc ), ( (((struct Arc *)__0__X47 )-> nuid__3Arc = __1jarc -> nuid__3Arc ),
  647. ((((struct Arc *)__0__X47 )))) ) ) ) ) :0 );
  648. __1jarc -> pwlArc__3Arc -> npts__6PwlArc = 2 ;
  649. __1jarc -> pwlArc__3Arc -> pts__6PwlArc = __3newjunk ;
  650. __1jarc2 -> next__3Arc = __1jarc -> next__3Arc ;
  651. __1jarc2 -> next__3Arc -> prev__3Arc = __1jarc2 ;
  652. __1jarc -> next__3Arc = __1jarc1 ;
  653. __1jarc1 -> prev__3Arc = __1jarc ;
  654. __1jarc1 -> next__3Arc = __1jarc2 ;
  655. __1jarc2 -> prev__3Arc = __1jarc1 ;
  656. ((void )0 );
  657. return 32 ;
  658. }
  659. else
  660. {
  661. struct Arc *__0__X50 ;
  662. void *__1__Xbuffer00eohgaiaa ;
  663. struct PwlArc *__0__X51 ;
  664. struct PwlArc *__1__X52 ;
  665. struct Arc *__0__X53 ;
  666. struct PwlArc *__0__X54 ;
  667. struct PwlArc *__1__X55 ;
  668. struct Arc *__0__X56 ;
  669. struct PwlArc *__0__X57 ;
  670. struct PwlArc *__1__X58 ;
  671. __1jarc1 = ((__0__X50 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  672. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  673. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  674. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  675. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  676. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  677. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (__1__X52 =
  678. ((__0__X51 = (struct PwlArc *)__nw__9PooledObjSFUiR4Pool ( sizeof (struct PwlArc ), (struct Pool *)(& __0this -> pwlarcpool__10Subdivider )) )?( (((struct PwlArc *)__0__X51 )-> pts__6PwlArc =
  679. __3newjunk ), ( (((struct PwlArc *)__0__X51 )-> npts__6PwlArc = 2 ), ( (((struct PwlArc *)__0__X51 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X51 )))) )
  680. ) :0 )), ( (((struct Arc *)__0__X50 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X50 )-> pwlArc__3Arc = __1__X52 ), ( (((struct
  681. Arc *)__0__X50 )-> type__3Arc = __1jarc -> type__3Arc ), ( (((struct Arc *)__0__X50 )-> nuid__3Arc = __1jarc -> nuid__3Arc ), ((((struct Arc *)__0__X50 )))) ) )
  682. ) ) :0 );
  683. __1jarc2 = ((__0__X53 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  684. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  685. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  686. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  687. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  688. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  689. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (__1__X55 =
  690. ((__0__X54 = (struct PwlArc *)__nw__9PooledObjSFUiR4Pool ( sizeof (struct PwlArc ), (struct Pool *)(& __0this -> pwlarcpool__10Subdivider )) )?( (((struct PwlArc *)__0__X54 )-> pts__6PwlArc =
  691. (__3newjunk + 1 )), ( (((struct PwlArc *)__0__X54 )-> npts__6PwlArc = 2 ), ( (((struct PwlArc *)__0__X54 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X54 ))))
  692. ) ) :0 )), ( (((struct Arc *)__0__X53 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X53 )-> pwlArc__3Arc = __1__X55 ), (
  693. (((struct Arc *)__0__X53 )-> type__3Arc = __1jarc -> type__3Arc ), ( (((struct Arc *)__0__X53 )-> nuid__3Arc = __1jarc -> nuid__3Arc ), ((((struct Arc *)__0__X53 )))) )
  694. ) ) ) :0 );
  695. __1jarc3 = ((__0__X56 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  696. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  697. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  698. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  699. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  700. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  701. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (__1__X58 =
  702. ((__0__X57 = (struct PwlArc *)__nw__9PooledObjSFUiR4Pool ( sizeof (struct PwlArc ), (struct Pool *)(& __0this -> pwlarcpool__10Subdivider )) )?( (((struct PwlArc *)__0__X57 )-> pts__6PwlArc =
  703. (__1v + __3i )), ( (((struct PwlArc *)__0__X57 )-> npts__6PwlArc = (__1maxvertex - __3i )), ( (((struct PwlArc *)__0__X57 )-> type__6PwlArc = 0x8 ), ((((struct
  704. PwlArc *)__0__X57 )))) ) ) :0 )), ( (((struct Arc *)__0__X56 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X56 )-> pwlArc__3Arc = __1__X58 ),
  705. ( (((struct Arc *)__0__X56 )-> type__3Arc = __1jarc -> type__3Arc ), ( (((struct Arc *)__0__X56 )-> nuid__3Arc = __1jarc -> nuid__3Arc ), ((((struct Arc *)__0__X56 ))))
  706. ) ) ) ) :0 );
  707. __1jarc -> pwlArc__3Arc -> npts__6PwlArc = (__3j + 1 );
  708. __1jarc3 -> next__3Arc = __1jarc -> next__3Arc ;
  709. __1jarc3 -> next__3Arc -> prev__3Arc = __1jarc3 ;
  710. __1jarc -> next__3Arc = __1jarc1 ;
  711. __1jarc1 -> prev__3Arc = __1jarc ;
  712. __1jarc1 -> next__3Arc = __1jarc2 ;
  713. __1jarc2 -> prev__3Arc = __1jarc1 ;
  714. __1jarc2 -> next__3Arc = __1jarc3 ;
  715. __1jarc3 -> prev__3Arc = __1jarc2 ;
  716. ((void )0 );
  717. return 4 ;
  718. }
  719. }
  720. }
  721. }
  722. }
  723. static int pwlarc_intersect__FP6PwlArcifT2Pi (
  724. struct PwlArc *__1pwlArc ,
  725. int __1param ,
  726. REAL __1value ,
  727. int __1dir ,
  728. int *__1loc )
  729. {
  730. ((void )0 );
  731. if (__1dir ){
  732. struct TrimVertex *__2v ;
  733. int __2imin ;
  734. int __2imax ;
  735. __2v = __1pwlArc -> pts__6PwlArc ;
  736. __2imin = 0 ;
  737. __2imax = (__1pwlArc -> npts__6PwlArc - 1 );
  738. ((void )0 );
  739. ((void )0 );
  740. while ((__2imax - __2imin )> 1 ){
  741. int __3imid ;
  742. __3imid = ((__2imax + __2imin )/ 2 );
  743. if (((__2v [__3imid ]). param__10TrimVertex [__1param ])> __1value )
  744. __2imax = __3imid ;
  745. else if (((__2v [__3imid ]). param__10TrimVertex [__1param ])< __1value )
  746. __2imin = __3imid ;
  747. else {
  748. (__1loc [1 ])= __3imid ;
  749. return (int )0;
  750. }
  751. }
  752. (__1loc [0 ])= __2imin ;
  753. (__1loc [2 ])= __2imax ;
  754. return (int )1;
  755. }
  756. else
  757. {
  758. struct TrimVertex *__2v ;
  759. int __2imax ;
  760. int __2imin ;
  761. __2v = __1pwlArc -> pts__6PwlArc ;
  762. __2imax = 0 ;
  763. __2imin = (__1pwlArc -> npts__6PwlArc - 1 );
  764. ((void )0 );
  765. ((void )0 );
  766. while ((__2imin - __2imax )> 1 ){
  767. int __3imid ;
  768. __3imid = ((__2imax + __2imin )/ 2 );
  769. if (((__2v [__3imid ]). param__10TrimVertex [__1param ])> __1value )
  770. __2imax = __3imid ;
  771. else if (((__2v [__3imid ]). param__10TrimVertex [__1param ])< __1value )
  772. __2imin = __3imid ;
  773. else {
  774. (__1loc [1 ])= __3imid ;
  775. return (int )0;
  776. }
  777. }
  778. (__1loc [0 ])= __2imin ;
  779. (__1loc [2 ])= __2imax ;
  780. return (int )1;
  781. }
  782. }
  783. static int arc_classify__FP3Arcif (Arc_ptr __1jarc , int __1param , REAL __1value )
  784. {
  785. REAL __1tdiff ;
  786. REAL __1hdiff ;
  787. if (__1param == 0 ){
  788. __1tdiff = ((( (((REAL *)(((struct Arc *)__1jarc )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ])- __1value );
  789. __1hdiff = ((( (((REAL *)(((struct Arc *)__1jarc )-> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ])- __1value );
  790. }
  791. else
  792. {
  793. __1tdiff = ((( (((REAL *)(((struct Arc *)__1jarc )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ])- __1value );
  794. __1hdiff = ((( (((REAL *)(((struct Arc *)__1jarc )-> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ])- __1value );
  795. }
  796. if (__1tdiff > 0.0 ){
  797. if (__1hdiff > 0.0 ){
  798. return 0x11 ;
  799. }
  800. else
  801. if (__1hdiff == 0.0 ){
  802. return 0x12 ;
  803. }
  804. else
  805. {
  806. return 0x10 ;
  807. }
  808. }
  809. else
  810. if (__1tdiff == 0.0 ){
  811. if (__1hdiff > 0.0 ){
  812. return 0x21 ;
  813. }
  814. else
  815. if (__1hdiff == 0.0 ){
  816. return 0x22 ;
  817. }
  818. else
  819. {
  820. return 0x20 ;
  821. }
  822. }
  823. else
  824. {
  825. if (__1hdiff > 0.0 ){
  826. return 0x01 ;
  827. }
  828. else
  829. if (__1hdiff == 0.0 ){
  830. return 0x02 ;
  831. }
  832. else
  833. {
  834. return 0 ;
  835. }
  836. }
  837. }
  838. int __glccwTurn_sl__10SubdividerFP0 (struct Subdivider *, struct Arc *, struct Arc *);
  839. void __glclassify_tailonleft_s__10S0 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1in , struct Bin *__1out , REAL __1val )
  840. {
  841. Arc_ptr __1j ;
  842. struct Arc *__1__Xjarc00efckaice ;
  843. while (__1j = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ),
  844. 0 ) :( 0 ) ), __1__Xjarc00efckaice ) ) ){
  845. ((void )0 );
  846. ( (((struct Arc *)__1j )-> type__3Arc &= (~ __gltail_tag__3Arc ))) ;
  847. { REAL __2diff ;
  848. struct Arc *__0__X61 ;
  849. __2diff = ((( (__0__X61 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X61 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ])-
  850. __1val );
  851. if (__2diff > 0.0 ){
  852. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  853. }
  854. else
  855. if (__2diff < 0.0 ){
  856. if (__glccwTurn_sl__10SubdividerFP0 ( __0this , __1j , __1j -> next__3Arc ) )
  857. ( (__1j -> link__3Arc = ((struct
  858. Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  859. else
  860. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  861. }
  862. else
  863. {
  864. struct Arc *__0__X59 ;
  865. struct Arc *__0__X60 ;
  866. if ((( (__0__X59 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X59 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ])> ((
  867. (__0__X60 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X60 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ]))
  868. ( (__1j -> link__3Arc =
  869. ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  870. else
  871. ( (__1j -> link__3Arc = ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  872. }
  873. }
  874. }
  875. }
  876. int __glccwTurn_tl__10SubdividerFP0 (struct Subdivider *, struct Arc *, struct Arc *);
  877. void __glclassify_tailonleft_t__10S0 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1in , struct Bin *__1out , REAL __1val )
  878. {
  879. Arc_ptr __1j ;
  880. struct Arc *__1__Xjarc00efckaice ;
  881. while (__1j = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ),
  882. 0 ) :( 0 ) ), __1__Xjarc00efckaice ) ) ){
  883. ((void )0 );
  884. ( (((struct Arc *)__1j )-> type__3Arc &= (~ __gltail_tag__3Arc ))) ;
  885. { REAL __2diff ;
  886. struct Arc *__0__X64 ;
  887. __2diff = ((( (__0__X64 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X64 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ])-
  888. __1val );
  889. if (__2diff > 0.0 ){
  890. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  891. }
  892. else
  893. if (__2diff < 0.0 ){
  894. if (__glccwTurn_tl__10SubdividerFP0 ( __0this , __1j , __1j -> next__3Arc ) )
  895. ( (__1j -> link__3Arc = ((struct
  896. Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  897. else
  898. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  899. }
  900. else
  901. {
  902. struct Arc *__0__X62 ;
  903. struct Arc *__0__X63 ;
  904. if ((( (__0__X62 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X62 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ])> ((
  905. (__0__X63 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X63 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ]))
  906. ( (__1j -> link__3Arc =
  907. ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  908. else
  909. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  910. }
  911. }
  912. }
  913. }
  914. void __glclassify_headonleft_s__10S0 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1in , struct Bin *__1out , REAL __1val )
  915. {
  916. Arc_ptr __1j ;
  917. struct Arc *__1__Xjarc00efckaice ;
  918. while (__1j = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ),
  919. 0 ) :( 0 ) ), __1__Xjarc00efckaice ) ) ){
  920. ((void )0 );
  921. ( (((struct Arc *)__1j )-> type__3Arc |= __gltail_tag__3Arc )) ;
  922. { REAL __2diff ;
  923. struct Arc *__0__X67 ;
  924. __2diff = ((( (__0__X67 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X67 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ])- __1val );
  925. if (__2diff > 0.0 ){
  926. ( (__1j -> link__3Arc = ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  927. }
  928. else
  929. if (__2diff < 0.0 ){
  930. if (__glccwTurn_sl__10SubdividerFP0 ( __0this , __1j -> prev__3Arc , __1j ) )
  931. ( (__1j -> link__3Arc = ((struct
  932. Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  933. else
  934. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  935. }
  936. else
  937. {
  938. struct Arc *__0__X65 ;
  939. struct Arc *__0__X66 ;
  940. if ((( (__0__X65 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X65 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ])> ((
  941. (__0__X66 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X66 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ]))
  942. ( (__1j -> link__3Arc =
  943. ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  944. else
  945. ( (__1j -> link__3Arc = ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  946. }
  947. }
  948. }
  949. }
  950. void __glclassify_headonleft_t__10S0 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1in , struct Bin *__1out , REAL __1val )
  951. {
  952. Arc_ptr __1j ;
  953. struct Arc *__1__Xjarc00efckaice ;
  954. while (__1j = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ),
  955. 0 ) :( 0 ) ), __1__Xjarc00efckaice ) ) ){
  956. ((void )0 );
  957. ( (((struct Arc *)__1j )-> type__3Arc |= __gltail_tag__3Arc )) ;
  958. { REAL __2diff ;
  959. struct Arc *__0__X70 ;
  960. __2diff = ((( (__0__X70 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X70 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ])- __1val );
  961. if (__2diff > 0.0 ){
  962. ( (__1j -> link__3Arc = ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  963. }
  964. else
  965. if (__2diff < 0.0 ){
  966. if (__glccwTurn_tl__10SubdividerFP0 ( __0this , __1j -> prev__3Arc , __1j ) )
  967. ( (__1j -> link__3Arc = ((struct
  968. Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  969. else
  970. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  971. }
  972. else
  973. {
  974. struct Arc *__0__X68 ;
  975. struct Arc *__0__X69 ;
  976. if ((( (__0__X68 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X68 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ])> ((
  977. (__0__X69 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X69 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ]))
  978. ( (__1j -> link__3Arc =
  979. ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  980. else
  981. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  982. }
  983. }
  984. }
  985. }
  986. int __glccwTurn_sr__10SubdividerFP0 (struct Subdivider *, struct Arc *, struct Arc *);
  987. void __glclassify_tailonright_s__100 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1in , struct Bin *__1out , REAL __1val )
  988. {
  989. Arc_ptr __1j ;
  990. struct Arc *__1__Xjarc00efckaice ;
  991. while (__1j = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ),
  992. 0 ) :( 0 ) ), __1__Xjarc00efckaice ) ) ){
  993. ((void )0 );
  994. ( (((struct Arc *)__1j )-> type__3Arc &= (~ __gltail_tag__3Arc ))) ;
  995. { REAL __2diff ;
  996. struct Arc *__0__X73 ;
  997. __2diff = ((( (__0__X73 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X73 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ])-
  998. __1val );
  999. if (__2diff > 0.0 ){
  1000. if (__glccwTurn_sr__10SubdividerFP0 ( __0this , __1j , __1j -> next__3Arc ) )
  1001. ( (__1j -> link__3Arc = ((struct Bin *)__1out )->
  1002. head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  1003. else
  1004. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  1005. }
  1006. else
  1007. if (__2diff < 0.0 ){
  1008. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j ))
  1009. ;
  1010. }
  1011. else
  1012. {
  1013. struct Arc *__0__X71 ;
  1014. struct Arc *__0__X72 ;
  1015. if ((( (__0__X71 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X71 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ])> ((
  1016. (__0__X72 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X72 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ]))
  1017. ( (__1j -> link__3Arc =
  1018. ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  1019. else
  1020. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  1021. }
  1022. }
  1023. }
  1024. }
  1025. int __glccwTurn_tr__10SubdividerFP0 (struct Subdivider *, struct Arc *, struct Arc *);
  1026. void __glclassify_tailonright_t__100 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1in , struct Bin *__1out , REAL __1val )
  1027. {
  1028. Arc_ptr __1j ;
  1029. struct Arc *__1__Xjarc00efckaice ;
  1030. while (__1j = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ),
  1031. 0 ) :( 0 ) ), __1__Xjarc00efckaice ) ) ){
  1032. ((void )0 );
  1033. ( (((struct Arc *)__1j )-> type__3Arc &= (~ __gltail_tag__3Arc ))) ;
  1034. { REAL __2diff ;
  1035. struct Arc *__0__X76 ;
  1036. __2diff = ((( (__0__X76 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X76 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ])-
  1037. __1val );
  1038. if (__2diff > 0.0 ){
  1039. if (__glccwTurn_tr__10SubdividerFP0 ( __0this , __1j , __1j -> next__3Arc ) )
  1040. ( (__1j -> link__3Arc = ((struct Bin *)__1out )->
  1041. head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  1042. else
  1043. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  1044. }
  1045. else
  1046. if (__2diff < 0.0 ){
  1047. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j ))
  1048. ;
  1049. }
  1050. else
  1051. {
  1052. struct Arc *__0__X74 ;
  1053. struct Arc *__0__X75 ;
  1054. if ((( (__0__X74 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X74 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ])> ((
  1055. (__0__X75 = (struct Arc *)__1j -> next__3Arc ), ( (((REAL *)(__0__X75 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ]))
  1056. ( (__1j -> link__3Arc =
  1057. ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  1058. else
  1059. ( (__1j -> link__3Arc = ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  1060. }
  1061. }
  1062. }
  1063. }
  1064. void __glclassify_headonright_s__100 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1in , struct Bin *__1out , REAL __1val )
  1065. {
  1066. Arc_ptr __1j ;
  1067. struct Arc *__1__Xjarc00efckaice ;
  1068. while (__1j = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ),
  1069. 0 ) :( 0 ) ), __1__Xjarc00efckaice ) ) ){
  1070. ((void )0 );
  1071. ( (((struct Arc *)__1j )-> type__3Arc |= __gltail_tag__3Arc )) ;
  1072. { REAL __2diff ;
  1073. struct Arc *__0__X79 ;
  1074. __2diff = ((( (__0__X79 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X79 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ])- __1val );
  1075. if (__2diff > 0.0 ){
  1076. if (__glccwTurn_sr__10SubdividerFP0 ( __0this , __1j -> prev__3Arc , __1j ) )
  1077. ( (__1j -> link__3Arc = ((struct Bin *)__1out )->
  1078. head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  1079. else
  1080. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  1081. }
  1082. else
  1083. if (__2diff < 0.0 ){
  1084. ( (__1j -> link__3Arc = ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j ))
  1085. ;
  1086. }
  1087. else
  1088. {
  1089. struct Arc *__0__X77 ;
  1090. struct Arc *__0__X78 ;
  1091. if ((( (__0__X77 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X77 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ])> ((
  1092. (__0__X78 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X78 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ]))
  1093. ( (__1j -> link__3Arc =
  1094. ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  1095. else
  1096. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  1097. }
  1098. }
  1099. }
  1100. }
  1101. void __glclassify_headonright_t__100 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1in , struct Bin *__1out , REAL __1val )
  1102. {
  1103. Arc_ptr __1j ;
  1104. struct Arc *__1__Xjarc00efckaice ;
  1105. while (__1j = ( (__1__Xjarc00efckaice = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)__1bin )-> head__3Bin = __1__Xjarc00efckaice -> link__3Arc ),
  1106. 0 ) :( 0 ) ), __1__Xjarc00efckaice ) ) ){
  1107. ((void )0 );
  1108. ( (((struct Arc *)__1j )-> type__3Arc |= __gltail_tag__3Arc )) ;
  1109. { REAL __2diff ;
  1110. struct Arc *__0__X82 ;
  1111. __2diff = ((( (__0__X82 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X82 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [1 ])- __1val );
  1112. if (__2diff > 0.0 ){
  1113. if (__glccwTurn_tr__10SubdividerFP0 ( __0this , __1j -> prev__3Arc , __1j ) )
  1114. ( (__1j -> link__3Arc = ((struct Bin *)__1out )->
  1115. head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  1116. else
  1117. ( (__1j -> link__3Arc = ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  1118. }
  1119. else
  1120. if (__2diff < 0.0 ){
  1121. ( (__1j -> link__3Arc = ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j ))
  1122. ;
  1123. }
  1124. else
  1125. {
  1126. struct Arc *__0__X80 ;
  1127. struct Arc *__0__X81 ;
  1128. if ((( (__0__X80 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X80 -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ])> ((
  1129. (__0__X81 = (struct Arc *)__1j -> prev__3Arc ), ( (((REAL *)(__0__X81 -> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) ) [0 ]))
  1130. ( (__1j -> link__3Arc =
  1131. ((struct Bin *)__1in )-> head__3Bin ), (((struct Bin *)__1in )-> head__3Bin = __1j )) ;
  1132. else
  1133. ( (__1j -> link__3Arc = ((struct Bin *)__1out )-> head__3Bin ), (((struct Bin *)__1out )-> head__3Bin = __1j )) ;
  1134. }
  1135. }
  1136. }
  1137. }
  1138. static void *__nw__9PooledObjSFUiR4Pool (
  1139. size_t __1__A4 ,
  1140. struct Pool *__1pool )
  1141. {
  1142. void *__1__Xbuffer00eohgaiaa ;
  1143. return ( (((void )0 )), ( (((struct Pool *)__1pool )-> freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)__1pool )-> freelist__4Pool ))),
  1144. (((struct Pool *)__1pool )-> freelist__4Pool = ((struct Pool *)__1pool )-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((! ((struct Pool *)__1pool )->
  1145. nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)__1pool )) , 0 ) :( 0 ) ), ( (((struct Pool *)__1pool )-> nextfree__4Pool -= ((struct
  1146. Pool *)__1pool )-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)__1pool )-> curblock__4Pool + ((struct Pool *)__1pool )-> nextfree__4Pool ))))) ) ) ,
  1147. 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ;
  1148. }
  1149. /* the end */