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.

891 lines
20 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/monotonizer.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 Buffer;
  36. struct Buffer {
  37. struct Buffer *next__6Buffer ;
  38. };
  39. struct Pool;
  40. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  41. struct Pool {
  42. struct Buffer *freelist__4Pool ;
  43. char *blocklist__4Pool [32];
  44. int nextblock__4Pool ;
  45. char *curblock__4Pool ;
  46. int buffersize__4Pool ;
  47. int nextsize__4Pool ;
  48. int nextfree__4Pool ;
  49. int initsize__4Pool ;
  50. char *name__4Pool ;
  51. int magic__4Pool ;
  52. };
  53. void __glgrow__4PoolFv (struct Pool *);
  54. struct PooledObj;
  55. struct PooledObj {
  56. char __W3__9PooledObj ;
  57. };
  58. typedef float REAL ;
  59. typedef void (*Pfvv )(void );
  60. typedef void (*Pfvf )(float *);
  61. typedef int (*cmpfunc )(void *, void *);
  62. typedef REAL Knot ;
  63. typedef REAL *Knot_ptr ;
  64. struct TrimVertex;
  65. struct PwlArc;
  66. struct PwlArc {
  67. char __W3__9PooledObj ;
  68. struct TrimVertex *pts__6PwlArc ;
  69. int npts__6PwlArc ;
  70. long type__6PwlArc ;
  71. };
  72. struct TrimVertex;
  73. struct TrimVertex {
  74. REAL param__10TrimVertex [2];
  75. long nuid__10TrimVertex ;
  76. };
  77. typedef struct TrimVertex *TrimVertex_p ;
  78. struct Bin;
  79. struct Arc;
  80. struct BezierArc;
  81. typedef struct Arc *Arc_ptr ;
  82. enum arc_side { arc_none = 0, arc_right = 1, arc_top = 2, arc_left = 3, arc_bottom = 4} ;
  83. struct Arc;
  84. struct Arc {
  85. char __W3__9PooledObj ;
  86. Arc_ptr prev__3Arc ;
  87. Arc_ptr next__3Arc ;
  88. Arc_ptr link__3Arc ;
  89. struct BezierArc *bezierArc__3Arc ;
  90. struct PwlArc *pwlArc__3Arc ;
  91. long type__3Arc ;
  92. long nuid__3Arc ;
  93. };
  94. extern int __glbezier_tag__3Arc ;
  95. extern int __glarc_tag__3Arc ;
  96. extern int __gltail_tag__3Arc ;
  97. struct BezierArc;
  98. struct TrimVertexPool;
  99. struct ArcTessellator;
  100. struct ArcTessellator {
  101. struct Pool *pwlarcpool__14ArcTessellator ;
  102. struct TrimVertexPool *trimvertexpool__14ArcTessellator ;
  103. };
  104. extern REAL __glgl_Bernstein__14ArcTessell0 [][24][24];
  105. struct Mapdesc;
  106. struct BezierArc;
  107. struct BezierArc {
  108. char __W3__9PooledObj ;
  109. REAL *cpts__9BezierArc ;
  110. int order__9BezierArc ;
  111. int stride__9BezierArc ;
  112. long type__9BezierArc ;
  113. struct Mapdesc *mapdesc__9BezierArc ;
  114. };
  115. struct Bin;
  116. struct Bin {
  117. struct Arc *head__3Bin ;
  118. struct Arc *current__3Bin ;
  119. };
  120. typedef REAL Maxmatrix [5][5];
  121. struct Backend;
  122. struct Mapdesc;
  123. struct Mapdesc {
  124. char __W3__9PooledObj ;
  125. REAL pixel_tolerance__7Mapdesc ;
  126. REAL clampfactor__7Mapdesc ;
  127. REAL minsavings__7Mapdesc ;
  128. REAL maxrate__7Mapdesc ;
  129. REAL maxsrate__7Mapdesc ;
  130. REAL maxtrate__7Mapdesc ;
  131. REAL bboxsize__7Mapdesc [5];
  132. long type__7Mapdesc ;
  133. int isrational__7Mapdesc ;
  134. int ncoords__7Mapdesc ;
  135. int hcoords__7Mapdesc ;
  136. int inhcoords__7Mapdesc ;
  137. int mask__7Mapdesc ;
  138. Maxmatrix bmat__7Mapdesc ;
  139. Maxmatrix cmat__7Mapdesc ;
  140. Maxmatrix smat__7Mapdesc ;
  141. REAL s_steps__7Mapdesc ;
  142. REAL t_steps__7Mapdesc ;
  143. REAL sampling_method__7Mapdesc ;
  144. REAL culling_method__7Mapdesc ;
  145. REAL bbox_subdividing__7Mapdesc ;
  146. struct Mapdesc *next__7Mapdesc ;
  147. struct Backend *backend__7Mapdesc ;
  148. };
  149. void __glcopy__7MapdescSFPA5_flPfN20 (REAL (*)[5], long , float *, long , long );
  150. void __glxformRational__7MapdescFPA0 (struct Mapdesc *, REAL (*)[5], REAL *, REAL *);
  151. void __glxformNonrational__7Mapdesc0 (struct Mapdesc *, REAL (*)[5], REAL *, REAL *);
  152. struct JumpBuffer;
  153. struct Sorter;
  154. struct Sorter {
  155. int es__6Sorter ;
  156. struct __mptr *__vptr__6Sorter ;
  157. };
  158. struct FlistSorter;
  159. struct FlistSorter {
  160. int es__6Sorter ;
  161. struct __mptr *__vptr__6Sorter ;
  162. };
  163. struct Flist;
  164. struct Flist {
  165. REAL *pts__5Flist ;
  166. int npts__5Flist ;
  167. int start__5Flist ;
  168. int end__5Flist ;
  169. struct FlistSorter sorter__5Flist ;
  170. };
  171. struct Backend;
  172. struct Jarcloc;
  173. struct Jarcloc {
  174. struct Arc *arc__7Jarcloc ;
  175. struct TrimVertex *p__7Jarcloc ;
  176. struct TrimVertex *plast__7Jarcloc ;
  177. };
  178. struct Trimline;
  179. struct Trimline {
  180. struct TrimVertex **pts__8Trimline ;
  181. long numverts__8Trimline ;
  182. long i__8Trimline ;
  183. long size__8Trimline ;
  184. struct Jarcloc jarcl__8Trimline ;
  185. struct TrimVertex t__8Trimline ;
  186. struct TrimVertex b__8Trimline ;
  187. struct TrimVertex *tinterp__8Trimline ;
  188. struct TrimVertex *binterp__8Trimline ;
  189. };
  190. struct Gridline;
  191. struct Gridline {
  192. long v__8Gridline ;
  193. REAL vval__8Gridline ;
  194. long vindex__8Gridline ;
  195. long ustart__8Gridline ;
  196. long uend__8Gridline ;
  197. };
  198. struct Uarray;
  199. struct Uarray {
  200. long size__6Uarray ;
  201. long ulines__6Uarray ;
  202. REAL *uarray__6Uarray ;
  203. };
  204. struct Backend;
  205. struct TrimRegion;
  206. void __gl__dt__8TrimlineFv (struct Trimline *, int );
  207. void __gl__dt__6UarrayFv (struct Uarray *, int );
  208. struct TrimRegion {
  209. struct Trimline left__10TrimRegion ;
  210. struct Trimline right__10TrimRegion ;
  211. struct Gridline top__10TrimRegion ;
  212. struct Gridline bot__10TrimRegion ;
  213. struct Uarray uarray__10TrimRegion ;
  214. REAL oneOverDu__10TrimRegion ;
  215. };
  216. struct GridTrimVertex;
  217. struct __Q2_4Hull4Side;
  218. struct __Q2_4Hull4Side {
  219. struct Trimline *left__Q2_4Hull4Side ;
  220. struct Gridline *line__Q2_4Hull4Side ;
  221. struct Trimline *right__Q2_4Hull4Side ;
  222. long index__Q2_4Hull4Side ;
  223. };
  224. struct Hull;
  225. struct Hull {
  226. struct __Q2_4Hull4Side lower__4Hull ;
  227. struct __Q2_4Hull4Side upper__4Hull ;
  228. struct Trimline fakeleft__4Hull ;
  229. struct Trimline fakeright__4Hull ;
  230. struct TrimRegion *PTrimRegion;
  231. struct TrimRegion OTrimRegion;
  232. };
  233. struct Backend;
  234. struct GridTrimVertex;
  235. struct Mesher;
  236. struct Mesher {
  237. struct __Q2_4Hull4Side lower__4Hull ;
  238. struct __Q2_4Hull4Side upper__4Hull ;
  239. struct Trimline fakeleft__4Hull ;
  240. struct Trimline fakeright__4Hull ;
  241. struct TrimRegion *PTrimRegion;
  242. struct Backend *backend__6Mesher ;
  243. struct Pool p__6Mesher ;
  244. unsigned int stacksize__6Mesher ;
  245. struct GridTrimVertex **vdata__6Mesher ;
  246. struct GridTrimVertex *last__6Mesher [2];
  247. int itop__6Mesher ;
  248. int lastedge__6Mesher ;
  249. struct TrimRegion OTrimRegion;
  250. };
  251. extern float __glZERO__6Mesher ;
  252. struct Backend;
  253. struct GridVertex;
  254. struct GridTrimVertex;
  255. struct CoveAndTiler;
  256. struct CoveAndTiler {
  257. struct Backend *backend__12CoveAndTiler ;
  258. struct TrimRegion *PTrimRegion;
  259. struct TrimRegion OTrimRegion;
  260. };
  261. extern int __glMAXSTRIPSIZE__12CoveAndTil0 ;
  262. struct Backend;
  263. struct Slicer;
  264. struct Slicer {
  265. struct Backend *backend__12CoveAndTiler ;
  266. struct TrimRegion *PTrimRegion;
  267. struct Mesher OMesher;
  268. struct Backend *backend__6Slicer ;
  269. REAL oneOverDu__6Slicer ;
  270. REAL du__6Slicer ;
  271. REAL dv__6Slicer ;
  272. int isolines__6Slicer ;
  273. };
  274. struct TrimVertexPool;
  275. struct TrimVertexPool {
  276. struct Pool pool__14TrimVertexPool ;
  277. struct TrimVertex **vlist__14TrimVertexPool ;
  278. int nextvlistslot__14TrimVertexPool ;
  279. int vlistsize__14TrimVertexPool ;
  280. };
  281. struct Renderhints;
  282. struct Backend;
  283. struct Quilt;
  284. struct Patchlist;
  285. struct Curvelist;
  286. struct JumpBuffer;
  287. struct Subdivider;
  288. enum __Q2_10Subdivider3dir { down__Q2_10Subdivider3dir = 0, same__Q2_10Subdivider3dir = 1, up__Q2_10Subdivider3dir = 2, none__Q2_10Subdivider3dir = 3} ;
  289. struct Subdivider {
  290. struct Slicer slicer__10Subdivider ;
  291. struct ArcTessellator arctessellator__10Subdivider ;
  292. struct Pool arcpool__10Subdivider ;
  293. struct Pool bezierarcpool__10Subdivider ;
  294. struct Pool pwlarcpool__10Subdivider ;
  295. struct TrimVertexPool trimvertexpool__10Subdivider ;
  296. struct JumpBuffer *jumpbuffer__10Subdivider ;
  297. struct Renderhints *renderhints__10Subdivider ;
  298. struct Backend *backend__10Subdivider ;
  299. struct Bin initialbin__10Subdivider ;
  300. struct Arc *pjarc__10Subdivider ;
  301. int s_index__10Subdivider ;
  302. int t_index__10Subdivider ;
  303. struct Quilt *qlist__10Subdivider ;
  304. struct Flist spbrkpts__10Subdivider ;
  305. struct Flist tpbrkpts__10Subdivider ;
  306. struct Flist smbrkpts__10Subdivider ;
  307. struct Flist tmbrkpts__10Subdivider ;
  308. REAL stepsizes__10Subdivider [4];
  309. int showDegenerate__10Subdivider ;
  310. int isArcTypeBezier__10Subdivider ;
  311. };
  312. void __gltessellate__10SubdividerFP0 (struct Subdivider *, struct Arc *, REAL );
  313. int __glisDisconnected__3ArcFv (struct Arc *);
  314. void __glmonotonize__10SubdividerFP0 (struct Subdivider *, struct Arc *, struct Bin *);
  315. extern struct __mptr* __ptbl_vec_____core_monotonizer_c___decompose_[];
  316. int __gldecompose__10SubdividerFR30 (struct Subdivider *__0this , struct Bin *__1bin , REAL __1geo_stepsize )
  317. {
  318. { { Arc_ptr __1jarc ;
  319. struct Arc *__1__Xjarc002hmkaiid ;
  320. __1jarc = ( (((struct Bin *)__1bin )-> current__3Bin = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc002hmkaiid = ((struct Bin *)__1bin )-> current__3Bin ), (
  321. (__1__Xjarc002hmkaiid ?( (((struct Bin *)__1bin )-> current__3Bin = __1__Xjarc002hmkaiid -> link__3Arc ), 0 ) :( 0 ) ), __1__Xjarc002hmkaiid ) ) ) ;
  322. for(;__1jarc ;__1jarc = ( (__1__Xjarc002hmkaiid = ((struct Bin *)__1bin )-> current__3Bin ), ( (__1__Xjarc002hmkaiid ?( (((struct Bin *)__1bin )-> current__3Bin = __1__Xjarc002hmkaiid -> link__3Arc ), 0 )
  323. :( 0 ) ), __1__Xjarc002hmkaiid ) ) ) {
  324. if (! ( (((struct Arc *)__1jarc )-> pwlArc__3Arc ?1 :0 )) ){
  325. __gltessellate__10SubdividerFP0 ( __0this , __1jarc , __1geo_stepsize ) ;
  326. if (__glisDisconnected__3ArcFv ( (struct Arc *)__1jarc ) || __glisDisconnected__3ArcFv ( (struct Arc *)__1jarc -> next__3Arc ) )
  327. return 1 ;
  328. }
  329. }
  330. for(__1jarc = ( (((struct Bin *)__1bin )-> current__3Bin = ((struct Bin *)__1bin )-> head__3Bin ), ( (__1__Xjarc002hmkaiid = ((struct Bin *)__1bin )-> current__3Bin ), (
  331. (__1__Xjarc002hmkaiid ?( (((struct Bin *)__1bin )-> current__3Bin = __1__Xjarc002hmkaiid -> link__3Arc ), 0 ) :( 0 ) ), __1__Xjarc002hmkaiid ) ) ) ;__1jarc ;__1jarc =
  332. ( (__1__Xjarc002hmkaiid = ((struct Bin *)__1bin )-> current__3Bin ), ( (__1__Xjarc002hmkaiid ?( (((struct Bin *)__1bin )-> current__3Bin = __1__Xjarc002hmkaiid -> link__3Arc ), 0 ) :(
  333. 0 ) ), __1__Xjarc002hmkaiid ) ) ) {
  334. __glmonotonize__10SubdividerFP0 ( __0this , __1jarc , __1bin ) ;
  335. }
  336. return 0 ;
  337. }
  338. }
  339. }
  340. REAL __glcalcVelocityRational__7Map0 (struct Mapdesc *, REAL *, int , int );
  341. void __gltessellateNonlizNear__14Arc0 (struct ArcTessellator *, struct Arc *, REAL , REAL , int );
  342. void __gltessellateLizNear__14ArcTes0 (struct ArcTessellator *, struct Arc *, REAL , REAL , int );
  343. REAL __glcalcVelocityNonrational__70 (struct Mapdesc *, REAL *, int , int );
  344. void __gltessellate__10SubdividerFP0 (struct Subdivider *__0this , Arc_ptr __1jarc , REAL __1geo_stepsize )
  345. {
  346. struct BezierArc *__1b ;
  347. struct Mapdesc *__1mapdesc ;
  348. __1b = __1jarc -> bezierArc__3Arc ;
  349. __1mapdesc = __1b -> mapdesc__9BezierArc ;
  350. if (( (((struct Mapdesc *)__1mapdesc )-> isrational__7Mapdesc ?1 :0 )) ){
  351. REAL __2max ;
  352. REAL __2arc_stepsize ;
  353. __2max = __glcalcVelocityRational__7Map0 ( (struct Mapdesc *)__1mapdesc , __1b -> cpts__9BezierArc , __1b -> stride__9BezierArc , __1b -> order__9BezierArc ) ;
  354. __2arc_stepsize = ((__2max > 1.0 )?(1.0 / __2max ):1.0 );
  355. if (__1jarc -> bezierArc__3Arc -> order__9BezierArc != 2 )
  356. __gltessellateNonlizNear__14Arc0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __1jarc , __1geo_stepsize , __2arc_stepsize , 1 ) ;
  357. else
  358. {
  359. __gltessellateLizNear__14ArcTes0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __1jarc , __1geo_stepsize , __2arc_stepsize , 1 ) ;
  360. }
  361. }
  362. else
  363. {
  364. REAL __2max ;
  365. REAL __2arc_stepsize ;
  366. __2max = __glcalcVelocityNonrational__70 ( (struct Mapdesc *)__1mapdesc , __1b -> cpts__9BezierArc , __1b -> stride__9BezierArc , __1b -> order__9BezierArc ) ;
  367. __2arc_stepsize = ((__2max > 1.0 )?(1.0 / __2max ):1.0 );
  368. if (__1jarc -> bezierArc__3Arc -> order__9BezierArc != 2 )
  369. __gltessellateNonlizNear__14Arc0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __1jarc , __1geo_stepsize , __2arc_stepsize , 0 ) ;
  370. else
  371. {
  372. __gltessellateLizNear__14ArcTes0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __1jarc , __1geo_stepsize , __2arc_stepsize , 0 ) ;
  373. }
  374. }
  375. }
  376. Arc_ptr __glappend__3ArcFP3Arc (struct Arc *, Arc_ptr );
  377. void __glremove_this_arc__3BinFP3Ar0 (struct Bin *, struct Arc *);
  378. void __glmonotonize__10SubdividerFP0 (struct Subdivider *__0this , Arc_ptr __1jarc , struct Bin *__1bin )
  379. {
  380. struct TrimVertex *__1firstvert ;
  381. struct TrimVertex *__1lastvert ;
  382. long __1uid ;
  383. int __1side ;
  384. int __1sdir ;
  385. int __1tdir ;
  386. int __1degenerate ;
  387. int __1nudegenerate ;
  388. int __1change ;
  389. __1firstvert = __1jarc -> pwlArc__3Arc -> pts__6PwlArc ;
  390. __1lastvert = (__1firstvert + (__1jarc -> pwlArc__3Arc -> npts__6PwlArc - 1 ));
  391. __1uid = __1jarc -> nuid__3Arc ;
  392. __1side = ( (((int )((((struct Arc *)__1jarc )-> type__3Arc >> 8 )& 0x7 )))) ;
  393. __1sdir = 3;
  394. __1tdir = 3;
  395. __1degenerate = 1 ;
  396. { { struct TrimVertex *__1vert ;
  397. __1vert = __1firstvert ;
  398. for(;__1vert != __1lastvert ;__1vert ++ ) {
  399. __1nudegenerate = 1 ;
  400. __1change = 0 ;
  401. { REAL __2sdiff ;
  402. __2sdiff = (((__1vert [1 ]). param__10TrimVertex [0 ])- ((__1vert [0 ]). param__10TrimVertex [0 ]));
  403. if (__2sdiff == 0 ){
  404. if (__1sdir != 1){
  405. __1sdir = 1;
  406. __1change = 1 ;
  407. }
  408. }
  409. else
  410. if (__2sdiff < 0.0 ){
  411. if (__1sdir != 0){
  412. __1sdir = 0;
  413. __1change = 1 ;
  414. }
  415. __1nudegenerate = 0 ;
  416. }
  417. else
  418. {
  419. if (__1sdir != 2){
  420. __1sdir = 2;
  421. __1change = 1 ;
  422. }
  423. __1nudegenerate = 0 ;
  424. }
  425. { REAL __2tdiff ;
  426. __2tdiff = (((__1vert [1 ]). param__10TrimVertex [1 ])- ((__1vert [0 ]). param__10TrimVertex [1 ]));
  427. if (__2tdiff == 0 ){
  428. if (__1tdir != 1){
  429. __1tdir = 1;
  430. __1change = 1 ;
  431. }
  432. }
  433. else
  434. if (__2tdiff < 0.0 ){
  435. if (__1tdir != 0){
  436. __1tdir = 0;
  437. __1change = 1 ;
  438. }
  439. __1nudegenerate = 0 ;
  440. }
  441. else
  442. {
  443. if (__1tdir != 2){
  444. __1tdir = 2;
  445. __1change = 1 ;
  446. }
  447. __1nudegenerate = 0 ;
  448. }
  449. if (__1change ){
  450. if (! __1degenerate ){
  451. struct Arc *__0__X13 ;
  452. void *__1__Xbuffer00azhgaiaa ;
  453. struct PwlArc *__0__X14 ;
  454. __1jarc -> pwlArc__3Arc -> npts__6PwlArc = ((__1vert - __1firstvert )+ 1 );
  455. __1jarc = __glappend__3ArcFP3Arc ( (struct Arc *)((__0__X13 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(&
  456. __0this -> arcpool__10Subdivider )))-> freelist__4Pool ?( ( (__1__Xbuffer00azhgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct
  457. Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :(
  458. ( ((! ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider ))))
  459. , 0 ) :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct
  460. Pool *)(& __0this -> arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00azhgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct
  461. Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00azhgaiaa ))) ) )))
  462. )?( (((struct Arc *)__0__X13 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X13 )-> pwlArc__3Arc = 0 ), ( (((struct Arc *)__0__X13 )-> type__3Arc =
  463. 0 ), ( ( ( (((struct Arc *)__0__X13 )-> type__3Arc &= -1793)) , (((struct Arc *)__0__X13 )-> type__3Arc |= ((((long )__1side ))<<
  464. 8 ))) , ( (((struct Arc *)__0__X13 )-> nuid__3Arc = __1uid ), ((((struct Arc *)__0__X13 )))) ) ) ) ) :0 ),
  465. __1jarc ) ;
  466. __1jarc -> pwlArc__3Arc = ((__0__X14 = (struct PwlArc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this ->
  467. pwlarcpool__10Subdivider )))-> freelist__4Pool ?( ( (__1__Xbuffer00azhgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> pwlarcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(&
  468. __0this -> pwlarcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> pwlarcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( (
  469. ((! ((struct Pool *)((struct Pool *)(& __0this -> pwlarcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> pwlarcpool__10Subdivider )))) ,
  470. 0 ) :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> pwlarcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(&
  471. __0this -> pwlarcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00azhgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> pwlarcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct
  472. Pool *)(& __0this -> pwlarcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00azhgaiaa ))) ) ))) )?(
  473. (((struct PwlArc *)__0__X14 )-> type__6PwlArc = 0x8 ), ( (((struct PwlArc *)__0__X14 )-> pts__6PwlArc = 0 ), ( (((struct PwlArc *)__0__X14 )-> npts__6PwlArc = -1),
  474. ((((struct PwlArc *)__0__X14 )))) ) ) :0 );
  475. ( (__1jarc -> link__3Arc = ((struct Bin *)__1bin )-> head__3Bin ), (((struct Bin *)__1bin )-> head__3Bin = __1jarc )) ;
  476. }
  477. __1firstvert = (__1jarc -> pwlArc__3Arc -> pts__6PwlArc = __1vert );
  478. __1degenerate = __1nudegenerate ;
  479. }
  480. }
  481. }
  482. }
  483. __1jarc -> pwlArc__3Arc -> npts__6PwlArc = ((__1vert - __1firstvert )+ 1 );
  484. if (__1degenerate ){
  485. struct PooledObj *__0__X15 ;
  486. __1jarc -> prev__3Arc -> next__3Arc = __1jarc -> next__3Arc ;
  487. __1jarc -> next__3Arc -> prev__3Arc = __1jarc -> prev__3Arc ;
  488. ((void )0 );
  489. ((void )0 );
  490. __glremove_this_arc__3BinFP3Ar0 ( (struct Bin *)__1bin , __1jarc ) ;
  491. ( (__0__X15 = (struct PooledObj *)__1jarc -> pwlArc__3Arc ), ( ( (((void )0 )), ( ((((struct Buffer *)(((struct Buffer *)(((void *)__0__X15 ))))))->
  492. next__6Buffer = ((struct Pool *)((struct Pool *)(& __0this -> pwlarcpool__10Subdivider )))-> freelist__4Pool ), (((struct Pool *)((struct Pool *)(& __0this -> pwlarcpool__10Subdivider )))-> freelist__4Pool = (((struct
  493. Buffer *)(((struct Buffer *)(((void *)__0__X15 )))))))) ) ) ) ;
  494. __1jarc -> pwlArc__3Arc = 0 ;
  495. ( ( (((void )0 )), ( ((((struct Buffer *)(((struct Buffer *)(((void *)((struct PooledObj *)__1jarc )))))))-> next__6Buffer = ((struct Pool *)((struct Pool *)(&
  496. __0this -> arcpool__10Subdivider )))-> freelist__4Pool ), (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool = (((struct Buffer *)(((struct Buffer *)(((void *)((struct PooledObj *)__1jarc )))))))))
  497. ) ) ;
  498. }
  499. }
  500. }
  501. }
  502. int __glisMonotone__10SubdividerFP0 (struct Subdivider *__0this , Arc_ptr __1jarc )
  503. {
  504. struct TrimVertex *__1firstvert ;
  505. struct TrimVertex *__1lastvert ;
  506. __1firstvert = __1jarc -> pwlArc__3Arc -> pts__6PwlArc ;
  507. __1lastvert = (__1firstvert + (__1jarc -> pwlArc__3Arc -> npts__6PwlArc - 1 ));
  508. if (__1firstvert == __1lastvert )return 1 ;
  509. { struct TrimVertex *__1vert ;
  510. int __1sdir ;
  511. int __1tdir ;
  512. REAL __1diff ;
  513. __1vert = __1firstvert ;
  514. __1diff = (((__1vert [1 ]). param__10TrimVertex [0 ])- ((__1vert [0 ]). param__10TrimVertex [0 ]));
  515. if (__1diff == 0.0 )
  516. __1sdir = 1;
  517. else if (__1diff < 0.0 )
  518. __1sdir = 0;
  519. else
  520. __1sdir = 2;
  521. __1diff = (((__1vert [1 ]). param__10TrimVertex [1 ])- ((__1vert [0 ]). param__10TrimVertex [1 ]));
  522. if (__1diff == 0.0 )
  523. __1tdir = 1;
  524. else if (__1diff < 0.0 )
  525. __1tdir = 0;
  526. else
  527. __1tdir = 2;
  528. if ((__1sdir == 1)&& (__1tdir == 1))return 0 ;
  529. for(++ __1vert ;__1vert != __1lastvert ;__1vert ++ ) {
  530. __1diff = (((__1vert [1 ]). param__10TrimVertex [0 ])- ((__1vert [0 ]). param__10TrimVertex [0 ]));
  531. if (__1diff == 0.0 ){
  532. if (__1sdir != 1)return 0 ;
  533. }
  534. else
  535. if (__1diff < 0.0 ){
  536. if (__1sdir != 0)return 0 ;
  537. }
  538. else
  539. {
  540. if (__1sdir != 2)return 0 ;
  541. }
  542. __1diff = (((__1vert [1 ]). param__10TrimVertex [1 ])- ((__1vert [0 ]). param__10TrimVertex [1 ]));
  543. if (__1diff == 0.0 ){
  544. if (__1tdir != 1)return 0 ;
  545. }
  546. else
  547. if (__1diff < 0.0 ){
  548. if (__1tdir != 0)return 0 ;
  549. }
  550. else
  551. {
  552. if (__1tdir != 2)return 0 ;
  553. }
  554. }
  555. return 1 ;
  556. }
  557. }
  558. /* the end */