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.

857 lines
28 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/arctess.c++ > */
  27. void *__vec_new (void *, int , int , void *);
  28. void __vec_ct (void *, int , int , void *);
  29. void __vec_dt (void *, int , int , void *);
  30. void __vec_delete (void *, int , int , void *, int , int );
  31. typedef int (*__vptp)(void);
  32. struct __mptr {short d; short i; __vptp f; };
  33. typedef unsigned int size_t ;
  34. // extern void *malloc (size_t );
  35. // extern void free (void *);
  36. typedef float REAL ;
  37. typedef void (*Pfvv )(void );
  38. typedef void (*Pfvf )(float *);
  39. typedef int (*cmpfunc )(void *, void *);
  40. typedef REAL Knot ;
  41. typedef REAL *Knot_ptr ;
  42. struct Buffer;
  43. struct Buffer {
  44. struct Buffer *next__6Buffer ;
  45. };
  46. struct Pool;
  47. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  48. struct Pool {
  49. struct Buffer *freelist__4Pool ;
  50. char *blocklist__4Pool [32];
  51. int nextblock__4Pool ;
  52. char *curblock__4Pool ;
  53. int buffersize__4Pool ;
  54. int nextsize__4Pool ;
  55. int nextfree__4Pool ;
  56. int initsize__4Pool ;
  57. char *name__4Pool ;
  58. int magic__4Pool ;
  59. };
  60. void __glgrow__4PoolFv (struct Pool *);
  61. struct PooledObj;
  62. struct PooledObj {
  63. char __W3__9PooledObj ;
  64. };
  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 BezierArc;
  99. struct TrimVertexPool;
  100. struct ArcTessellator;
  101. struct ArcTessellator {
  102. struct Pool *pwlarcpool__14ArcTessellator ;
  103. struct TrimVertexPool *trimvertexpool__14ArcTessellator ;
  104. };
  105. extern REAL __glgl_Bernstein__14ArcTessell0 [][24][24];
  106. struct Mapdesc;
  107. struct BezierArc;
  108. struct BezierArc {
  109. char __W3__9PooledObj ;
  110. REAL *cpts__9BezierArc ;
  111. int order__9BezierArc ;
  112. int stride__9BezierArc ;
  113. long type__9BezierArc ;
  114. struct Mapdesc *mapdesc__9BezierArc ;
  115. };
  116. struct TrimVertexPool;
  117. struct TrimVertexPool {
  118. struct Pool pool__14TrimVertexPool ;
  119. struct TrimVertex **vlist__14TrimVertexPool ;
  120. int nextvlistslot__14TrimVertexPool ;
  121. int vlistsize__14TrimVertexPool ;
  122. };
  123. extern struct __mptr* __ptbl_vec_____core_arctess_c_____ct_[];
  124. struct ArcTessellator *__gl__ct__14ArcTessellatorFR140 (struct ArcTessellator *__0this , struct TrimVertexPool *__1t , struct Pool *__1p )
  125. {
  126. void *__1__Xp00uzigaiaa ;
  127. if (__0this || (__0this = (struct ArcTessellator *)( (__1__Xp00uzigaiaa = malloc ( (sizeof (struct ArcTessellator))) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) ))(
  128. (__0this -> pwlarcpool__14ArcTessellator = __1p ), (__0this -> trimvertexpool__14ArcTessellator = __1t )) ;
  129. return __0this ;
  130. }
  131. void __gl__dt__14ArcTessellatorFv (struct ArcTessellator *__0this ,
  132. int __0__free )
  133. { if (__0this )
  134. if (__0this )if (__0__free & 1)( (((void *)__0this )?( free ( ((void
  135. *)__0this )) , 0 ) :( 0 ) )) ;
  136. }
  137. struct TrimVertex *__glget__14TrimVertexPoolFi (struct TrimVertexPool *, int );
  138. void __glbezier__14ArcTessellatorFP0 (struct ArcTessellator *__0this , struct Arc *__1arc , REAL __1s1 , REAL __1s2 , REAL __1t1 , REAL __1t2 )
  139. {
  140. ((void )0 );
  141. ((void )0 );
  142. { struct TrimVertex *__1p ;
  143. struct PwlArc *__0__X5 ;
  144. void *__1__Xbuffer00eohgaiaa ;
  145. __1p = __glget__14TrimVertexPoolFi ( (struct TrimVertexPool *)__0this -> trimvertexpool__14ArcTessellator , 2 ) ;
  146. __1arc -> pwlArc__3Arc = ((__0__X5 = (struct PwlArc *)( (((void *)( (((void )0 )), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ?(
  147. ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ))), (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool = ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  148. freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((! ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)__0this ->
  149. pwlarcpool__14ArcTessellator )) , 0 ) :( 0 ) ), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool -= ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  150. buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> curblock__4Pool + ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool ))))) ) )
  151. , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct PwlArc *)__0__X5 )-> pts__6PwlArc = __1p ), ( (((struct
  152. PwlArc *)__0__X5 )-> npts__6PwlArc = 2 ), ( (((struct PwlArc *)__0__X5 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X5 )))) ) ) :0 );
  153. ((__1p [0 ]). param__10TrimVertex [0 ])= __1s1 ;
  154. ((__1p [0 ]). param__10TrimVertex [1 ])= __1t1 ;
  155. ((__1p [1 ]). param__10TrimVertex [0 ])= __1s2 ;
  156. ((__1p [1 ]). param__10TrimVertex [1 ])= __1t2 ;
  157. ((void )0 );
  158. ( (((struct Arc *)__1arc )-> type__3Arc |= __glbezier_tag__3Arc )) ;
  159. }
  160. }
  161. void __glmakeSide__3ArcFP6PwlArc8ar0 (struct Arc *, struct PwlArc *, int );
  162. void __glpwl_left__14ArcTessellator0 (struct ArcTessellator *__0this , struct Arc *__1arc , REAL __1s , REAL __1t1 , REAL __1t2 , REAL __1rate )
  163. {
  164. ((void )0 );
  165. ((void )0 );
  166. { int __1nsteps ;
  167. REAL __1stepsize ;
  168. struct TrimVertex *__1newvert ;
  169. __1nsteps = (1 + (((int )((__1t1 - __1t2 )/ __1rate ))));
  170. __1stepsize = ((__1t1 - __1t2 )/ (((float )__1nsteps )));
  171. __1newvert = __glget__14TrimVertexPoolFi ( (struct TrimVertexPool *)__0this -> trimvertexpool__14ArcTessellator , __1nsteps + 1 ) ;
  172. { { int __1i ;
  173. struct PwlArc *__0__X6 ;
  174. void *__1__Xbuffer00eohgaiaa ;
  175. __1i = __1nsteps ;
  176. for(;__1i > 0 ;__1i -- ) {
  177. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s ;
  178. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t2 ;
  179. __1t2 += __1stepsize ;
  180. }
  181. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s ;
  182. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t1 ;
  183. __glmakeSide__3ArcFP6PwlArc8ar0 ( (struct Arc *)__1arc , (__0__X6 = (struct PwlArc *)( (((void *)( (((void )0 )), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  184. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ))), (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool = ((struct Pool *)__0this ->
  185. pwlarcpool__14ArcTessellator )-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((! ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct
  186. Pool *)__0this -> pwlarcpool__14ArcTessellator )) , 0 ) :( 0 ) ), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool -= ((struct Pool *)__0this ->
  187. pwlarcpool__14ArcTessellator )-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> curblock__4Pool + ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool ))))) )
  188. ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct PwlArc *)__0__X6 )-> pts__6PwlArc = __1newvert ), (
  189. (((struct PwlArc *)__0__X6 )-> npts__6PwlArc = (__1nsteps + 1 )), ( (((struct PwlArc *)__0__X6 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X6 )))) ) )
  190. :0 , 3) ;
  191. }
  192. }
  193. }
  194. }
  195. void __glpwl_right__14ArcTessellato0 (struct ArcTessellator *__0this , struct Arc *__1arc , REAL __1s , REAL __1t1 , REAL __1t2 , REAL __1rate )
  196. {
  197. ((void )0 );
  198. ((void )0 );
  199. { int __1nsteps ;
  200. REAL __1stepsize ;
  201. struct TrimVertex *__1newvert ;
  202. __1nsteps = (1 + (((int )((__1t2 - __1t1 )/ __1rate ))));
  203. __1stepsize = ((__1t2 - __1t1 )/ (((float )__1nsteps )));
  204. __1newvert = __glget__14TrimVertexPoolFi ( (struct TrimVertexPool *)__0this -> trimvertexpool__14ArcTessellator , __1nsteps + 1 ) ;
  205. { { int __1i ;
  206. struct PwlArc *__0__X7 ;
  207. void *__1__Xbuffer00eohgaiaa ;
  208. __1i = 0 ;
  209. for(;__1i < __1nsteps ;__1i ++ ) {
  210. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s ;
  211. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t1 ;
  212. __1t1 += __1stepsize ;
  213. }
  214. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s ;
  215. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t2 ;
  216. __glmakeSide__3ArcFP6PwlArc8ar0 ( (struct Arc *)__1arc , (__0__X7 = (struct PwlArc *)( (((void *)( (((void )0 )), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  217. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ))), (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool = ((struct Pool *)__0this ->
  218. pwlarcpool__14ArcTessellator )-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((! ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct
  219. Pool *)__0this -> pwlarcpool__14ArcTessellator )) , 0 ) :( 0 ) ), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool -= ((struct Pool *)__0this ->
  220. pwlarcpool__14ArcTessellator )-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> curblock__4Pool + ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool ))))) )
  221. ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct PwlArc *)__0__X7 )-> pts__6PwlArc = __1newvert ), (
  222. (((struct PwlArc *)__0__X7 )-> npts__6PwlArc = (__1nsteps + 1 )), ( (((struct PwlArc *)__0__X7 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X7 )))) ) )
  223. :0 , 1) ;
  224. }
  225. }
  226. }
  227. }
  228. void __glpwl_top__14ArcTessellatorF0 (struct ArcTessellator *__0this , struct Arc *__1arc , REAL __1t , REAL __1s1 , REAL __1s2 , REAL __1rate )
  229. {
  230. ((void )0 );
  231. ((void )0 );
  232. { int __1nsteps ;
  233. REAL __1stepsize ;
  234. struct TrimVertex *__1newvert ;
  235. __1nsteps = (1 + (((int )((__1s1 - __1s2 )/ __1rate ))));
  236. __1stepsize = ((__1s1 - __1s2 )/ (((float )__1nsteps )));
  237. __1newvert = __glget__14TrimVertexPoolFi ( (struct TrimVertexPool *)__0this -> trimvertexpool__14ArcTessellator , __1nsteps + 1 ) ;
  238. { { int __1i ;
  239. struct PwlArc *__0__X8 ;
  240. void *__1__Xbuffer00eohgaiaa ;
  241. __1i = __1nsteps ;
  242. for(;__1i > 0 ;__1i -- ) {
  243. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s2 ;
  244. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t ;
  245. __1s2 += __1stepsize ;
  246. }
  247. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s1 ;
  248. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t ;
  249. __glmakeSide__3ArcFP6PwlArc8ar0 ( (struct Arc *)__1arc , (__0__X8 = (struct PwlArc *)( (((void *)( (((void )0 )), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  250. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ))), (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool = ((struct Pool *)__0this ->
  251. pwlarcpool__14ArcTessellator )-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((! ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct
  252. Pool *)__0this -> pwlarcpool__14ArcTessellator )) , 0 ) :( 0 ) ), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool -= ((struct Pool *)__0this ->
  253. pwlarcpool__14ArcTessellator )-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> curblock__4Pool + ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool ))))) )
  254. ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct PwlArc *)__0__X8 )-> pts__6PwlArc = __1newvert ), (
  255. (((struct PwlArc *)__0__X8 )-> npts__6PwlArc = (__1nsteps + 1 )), ( (((struct PwlArc *)__0__X8 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X8 )))) ) )
  256. :0 , 2) ;
  257. }
  258. }
  259. }
  260. }
  261. void __glpwl_bottom__14ArcTessellat0 (struct ArcTessellator *__0this , struct Arc *__1arc , REAL __1t , REAL __1s1 , REAL __1s2 , REAL __1rate )
  262. {
  263. ((void )0 );
  264. ((void )0 );
  265. { int __1nsteps ;
  266. REAL __1stepsize ;
  267. struct TrimVertex *__1newvert ;
  268. __1nsteps = (1 + (((int )((__1s2 - __1s1 )/ __1rate ))));
  269. __1stepsize = ((__1s2 - __1s1 )/ (((float )__1nsteps )));
  270. __1newvert = __glget__14TrimVertexPoolFi ( (struct TrimVertexPool *)__0this -> trimvertexpool__14ArcTessellator , __1nsteps + 1 ) ;
  271. { { int __1i ;
  272. struct PwlArc *__0__X9 ;
  273. void *__1__Xbuffer00eohgaiaa ;
  274. __1i = 0 ;
  275. for(;__1i < __1nsteps ;__1i ++ ) {
  276. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s1 ;
  277. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t ;
  278. __1s1 += __1stepsize ;
  279. }
  280. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s2 ;
  281. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t ;
  282. __glmakeSide__3ArcFP6PwlArc8ar0 ( (struct Arc *)__1arc , (__0__X9 = (struct PwlArc *)( (((void *)( (((void )0 )), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  283. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ))), (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool = ((struct Pool *)__0this ->
  284. pwlarcpool__14ArcTessellator )-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((! ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct
  285. Pool *)__0this -> pwlarcpool__14ArcTessellator )) , 0 ) :( 0 ) ), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool -= ((struct Pool *)__0this ->
  286. pwlarcpool__14ArcTessellator )-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> curblock__4Pool + ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool ))))) )
  287. ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct PwlArc *)__0__X9 )-> pts__6PwlArc = __1newvert ), (
  288. (((struct PwlArc *)__0__X9 )-> npts__6PwlArc = (__1nsteps + 1 )), ( (((struct PwlArc *)__0__X9 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X9 )))) ) )
  289. :0 , 4) ;
  290. }
  291. }
  292. }
  293. }
  294. void __glpwl__14ArcTessellatorFP3Ar0 (struct ArcTessellator *__0this , struct Arc *__1arc , REAL __1s1 , REAL __1s2 , REAL __1t1 , REAL __1t2 , REAL __1rate )
  295. {
  296. ((void )0 );
  297. { int __1snsteps ;
  298. int __1tnsteps ;
  299. int __1nsteps ;
  300. REAL __1sstepsize ;
  301. REAL __1tstepsize ;
  302. struct TrimVertex *__1newvert ;
  303. __1snsteps = (1 + (((int )(( (((__1s2 - __1s1 )< 0.0 )?(- (__1s2 - __1s1 )):(__1s2 - __1s1 ))) / __1rate ))));
  304. __1tnsteps = (1 + (((int )(( (((__1t2 - __1t1 )< 0.0 )?(- (__1t2 - __1t1 )):(__1t2 - __1t1 ))) / __1rate ))));
  305. __1nsteps = ( ((__1snsteps < __1tnsteps )?__1tnsteps :__1snsteps )) ;
  306. __1sstepsize = ((__1s2 - __1s1 )/ (((float )__1nsteps )));
  307. __1tstepsize = ((__1t2 - __1t1 )/ (((float )__1nsteps )));
  308. __1newvert = __glget__14TrimVertexPoolFi ( (struct TrimVertexPool *)__0this -> trimvertexpool__14ArcTessellator , __1nsteps + 1 ) ;
  309. { { long __1i ;
  310. struct PwlArc *__0__X10 ;
  311. void *__1__Xbuffer00eohgaiaa ;
  312. __1i = 0 ;
  313. for(;__1i < __1nsteps ;__1i ++ ) {
  314. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s1 ;
  315. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t1 ;
  316. __1s1 += __1sstepsize ;
  317. __1t1 += __1tstepsize ;
  318. }
  319. ((__1newvert [__1i ]). param__10TrimVertex [0 ])= __1s2 ;
  320. ((__1newvert [__1i ]). param__10TrimVertex [1 ])= __1t2 ;
  321. __1arc -> pwlArc__3Arc = ((__0__X10 = (struct PwlArc *)( (((void *)( (((void )0 )), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ?(
  322. ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ))), (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool = ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  323. freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((! ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)__0this ->
  324. pwlarcpool__14ArcTessellator )) , 0 ) :( 0 ) ), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool -= ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  325. buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> curblock__4Pool + ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool ))))) ) )
  326. , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct PwlArc *)__0__X10 )-> pts__6PwlArc = __1newvert ), ( (((struct
  327. PwlArc *)__0__X10 )-> npts__6PwlArc = (__1nsteps + 1 )), ( (((struct PwlArc *)__0__X10 )-> type__6PwlArc = 0x8 ), ((((struct PwlArc *)__0__X10 )))) ) ) :0 );
  328. ( (((struct Arc *)__1arc )-> type__3Arc &= (~ __glbezier_tag__3Arc ))) ;
  329. ( (((struct Arc *)__1arc )-> type__3Arc &= -1793)) ;
  330. }
  331. }
  332. }
  333. }
  334. void __gltessellateLizNear__14ArcTes0 (struct ArcTessellator *__0this , struct Arc *__1arc , REAL __1geo_stepsize , REAL __1arc_stepsize , int __1isrational )
  335. {
  336. REAL __1s1 ;
  337. REAL __1s2 ;
  338. REAL __1t1 ;
  339. REAL __1t2 ;
  340. REAL __1stepsize ;
  341. struct BezierArc *__1b ;
  342. ((void )0 );
  343. ;
  344. ;
  345. ;
  346. ;
  347. __1stepsize = (__1geo_stepsize * __1arc_stepsize );
  348. __1b = __1arc -> bezierArc__3Arc ;
  349. if (__1isrational ){
  350. __1s1 = ((__1b -> cpts__9BezierArc [0 ])/ (__1b -> cpts__9BezierArc [2 ]));
  351. __1t1 = ((__1b -> cpts__9BezierArc [1 ])/ (__1b -> cpts__9BezierArc [2 ]));
  352. __1s2 = ((__1b -> cpts__9BezierArc [(__1b -> stride__9BezierArc + 0 )])/ (__1b -> cpts__9BezierArc [(__1b -> stride__9BezierArc + 2 )]));
  353. __1t2 = ((__1b -> cpts__9BezierArc [(__1b -> stride__9BezierArc + 1 )])/ (__1b -> cpts__9BezierArc [(__1b -> stride__9BezierArc + 2 )]));
  354. }
  355. else
  356. {
  357. __1s1 = (__1b -> cpts__9BezierArc [0 ]);
  358. __1t1 = (__1b -> cpts__9BezierArc [1 ]);
  359. __1s2 = (__1b -> cpts__9BezierArc [(__1b -> stride__9BezierArc + 0 )]);
  360. __1t2 = (__1b -> cpts__9BezierArc [(__1b -> stride__9BezierArc + 1 )]);
  361. }
  362. if (__1s1 == __1s2 )
  363. if (__1t1 < __1t2 )
  364. __glpwl_right__14ArcTessellato0 ( __0this , __1arc , __1s1 , __1t1 , __1t2 , __1stepsize ) ;
  365. else
  366. __glpwl_left__14ArcTessellator0 ( __0this , __1arc , __1s1 , __1t1 , __1t2 , __1stepsize ) ;
  367. else if (__1t1 == __1t2 )
  368. if (__1s1 < __1s2 )
  369. __glpwl_bottom__14ArcTessellat0 ( __0this , __1arc , __1t1 , __1s1 , __1s2 , __1stepsize ) ;
  370. else
  371. __glpwl_top__14ArcTessellatorF0 ( __0this , __1arc , __1t1 , __1s1 , __1s2 , __1stepsize ) ;
  372. else
  373. __glpwl__14ArcTessellatorFP3Ar0 ( __0this , __1arc , __1s1 , __1s2 , __1t1 , __1t2 , __1stepsize ) ;
  374. }
  375. void __gltrim_power_coeffs__14ArcTe0 (struct BezierArc *, REAL *, int );
  376. void __gltessellateNonlizNear__14Arc0 (struct ArcTessellator *__0this , struct Arc *__1arc , REAL __1geo_stepsize , REAL __1arc_stepsize , int __1isrational )
  377. {
  378. ((void )0 );
  379. { REAL __1stepsize ;
  380. int __1nsteps ;
  381. struct TrimVertex *__1vert ;
  382. REAL __1dp ;
  383. struct BezierArc *__1bezierArc ;
  384. struct PwlArc *__0__X11 ;
  385. void *__1__Xbuffer00eohgaiaa ;
  386. __1stepsize = (__1geo_stepsize * __1arc_stepsize );
  387. __1nsteps = (1 + (((int )(1.0 / __1stepsize ))));
  388. __1vert = __glget__14TrimVertexPoolFi ( (struct TrimVertexPool *)__0this -> trimvertexpool__14ArcTessellator , __1nsteps + 1 ) ;
  389. __1dp = (1.0 / __1nsteps );
  390. __1bezierArc = __1arc -> bezierArc__3Arc ;
  391. __1arc -> pwlArc__3Arc = ((__0__X11 = (struct PwlArc *)( (((void *)( (((void )0 )), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ?(
  392. ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool ))), (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> freelist__4Pool = ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  393. freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((! ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)__0this ->
  394. pwlarcpool__14ArcTessellator )) , 0 ) :( 0 ) ), ( (((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool -= ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )->
  395. buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> curblock__4Pool + ((struct Pool *)__0this -> pwlarcpool__14ArcTessellator )-> nextfree__4Pool ))))) ) )
  396. , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct PwlArc *)__0__X11 )-> type__6PwlArc = 0x8 ), ( (((struct
  397. PwlArc *)__0__X11 )-> pts__6PwlArc = 0 ), ( (((struct PwlArc *)__0__X11 )-> npts__6PwlArc = -1), ((((struct PwlArc *)__0__X11 )))) ) ) :0 );
  398. __1arc -> pwlArc__3Arc -> pts__6PwlArc = __1vert ;
  399. if (__1isrational ){
  400. REAL __2pow_u [24];
  401. REAL __2pow_v [24];
  402. REAL __2pow_w [24];
  403. __gltrim_power_coeffs__14ArcTe0 ( __1bezierArc , (float *)__2pow_u , 0 ) ;
  404. __gltrim_power_coeffs__14ArcTe0 ( __1bezierArc , (float *)__2pow_v , 1 ) ;
  405. __gltrim_power_coeffs__14ArcTe0 ( __1bezierArc , (float *)__2pow_w , 2 ) ;
  406. { REAL *__2b ;
  407. int __2step ;
  408. int __2ocanremove ;
  409. register long __2order ;
  410. __2b = __1bezierArc -> cpts__9BezierArc ;
  411. (__1vert -> param__10TrimVertex [0 ])= ((__2b [0 ])/ (__2b [2 ]));
  412. (__1vert -> param__10TrimVertex [1 ])= ((__2b [1 ])/ (__2b [2 ]));
  413. ;
  414. __2ocanremove = 0 ;
  415. __2order = __1bezierArc -> order__9BezierArc ;
  416. for(( (__2step = 1 ), (++ __1vert )) ;__2step < __1nsteps ;( (__2step ++ ), (__1vert ++ )) ) {
  417. register
  418. REAL __3p ;
  419. register REAL __3u ;
  420. register REAL __3v ;
  421. register REAL __3w ;
  422. __3p = (__1dp * __2step );
  423. __3u = (__2pow_u [0 ]);
  424. __3v = (__2pow_v [0 ]);
  425. __3w = (__2pow_w [0 ]);
  426. { { register int __3i ;
  427. __3i = 1 ;
  428. for(;__3i < __2order ;__3i ++ ) {
  429. __3u = ((__3u * __3p )+ (__2pow_u [__3i ]));
  430. __3v = ((__3v * __3p )+ (__2pow_v [__3i ]));
  431. __3w = ((__3w * __3p )+ (__2pow_w [__3i ]));
  432. }
  433. (__1vert -> param__10TrimVertex [0 ])= (__3u / __3w );
  434. (__1vert -> param__10TrimVertex [1 ])= (__3v / __3w );
  435. }
  436. }
  437. }
  438. __2b += ((__2order - 1 )* __1bezierArc -> stride__9BezierArc );
  439. (__1vert -> param__10TrimVertex [0 ])= ((__2b [0 ])/ (__2b [2 ]));
  440. (__1vert -> param__10TrimVertex [1 ])= ((__2b [1 ])/ (__2b [2 ]));
  441. }
  442. }
  443. else
  444. {
  445. REAL __2pow_u [24];
  446. REAL __2pow_v [24];
  447. __gltrim_power_coeffs__14ArcTe0 ( __1bezierArc , (float *)__2pow_u , 0 ) ;
  448. __gltrim_power_coeffs__14ArcTe0 ( __1bezierArc , (float *)__2pow_v , 1 ) ;
  449. { REAL *__2b ;
  450. int __2step ;
  451. int __2ocanremove ;
  452. register long __2order ;
  453. __2b = __1bezierArc -> cpts__9BezierArc ;
  454. (__1vert -> param__10TrimVertex [0 ])= (__2b [0 ]);
  455. (__1vert -> param__10TrimVertex [1 ])= (__2b [1 ]);
  456. ;
  457. __2ocanremove = 0 ;
  458. __2order = __1bezierArc -> order__9BezierArc ;
  459. for(( (__2step = 1 ), (++ __1vert )) ;__2step < __1nsteps ;( (__2step ++ ), (__1vert ++ )) ) {
  460. register
  461. REAL __3p ;
  462. register REAL __3u ;
  463. register REAL __3v ;
  464. __3p = (__1dp * __2step );
  465. __3u = (__2pow_u [0 ]);
  466. __3v = (__2pow_v [0 ]);
  467. { { register int __3i ;
  468. __3i = 1 ;
  469. for(;__3i < __1bezierArc -> order__9BezierArc ;__3i ++ ) {
  470. __3u = ((__3u * __3p )+ (__2pow_u [__3i ]));
  471. __3v = ((__3v * __3p )+ (__2pow_v [__3i ]));
  472. }
  473. (__1vert -> param__10TrimVertex [0 ])= __3u ;
  474. (__1vert -> param__10TrimVertex [1 ])= __3v ;
  475. }
  476. }
  477. }
  478. __2b += ((__2order - 1 )* __1bezierArc -> stride__9BezierArc );
  479. (__1vert -> param__10TrimVertex [0 ])= (__2b [0 ]);
  480. (__1vert -> param__10TrimVertex [1 ])= (__2b [1 ]);
  481. }
  482. }
  483. __1arc -> pwlArc__3Arc -> npts__6PwlArc = ((__1vert - __1arc -> pwlArc__3Arc -> pts__6PwlArc )+ 1 );
  484. }
  485. }
  486. extern REAL __glgl_Bernstein__14ArcTessell0 [][24][24];
  487. REAL __glgl_Bernstein__14ArcTessell0 [][24][24]= { { { 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , {
  488. 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 ,
  489. 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
  490. , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 ,
  491. 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 ,
  492. 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } } ,
  493. { { - 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 } , { 1 ,
  494. 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 ,
  495. 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,
  496. { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 ,
  497. 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
  498. 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } } , {
  499. { 1 , - 2 , 1 , 0 , 0 , 0 , 0 , 0 } , { - 2 ,
  500. 2 , 0 , 0 , 0 , 0 , 0 , 0 } , { 1 , 0 , 0 , 0 , 0 ,
  501. 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,
  502. { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 ,
  503. 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
  504. 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } } , {
  505. { - 1 , 3 , - 3 , 1 , 0 , 0 , 0 , 0 } , { 3 ,
  506. - 6 , 3 , 0 , 0 , 0 , 0 , 0 } , { - 3 , 3 , 0 ,
  507. 0 , 0 , 0 , 0 , 0 } , { 1 , 0 , 0 , 0 , 0 , 0 , 0 ,
  508. 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 ,
  509. 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 ,
  510. 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } }
  511. , { { 1 , - 4 , 6 , - 4 , 1 , 0 , 0 , 0 } ,
  512. { - 4 , 12 , - 12 , 4 , 0 , 0 , 0 , 0 } , { 6 ,
  513. - 12 , 6 , 0 , 0 , 0 , 0 , 0 } , { - 4 , 4 , 0 ,
  514. 0 , 0 , 0 , 0 , 0 } , { 1 , 0 , 0 , 0 , 0 , 0 , 0 ,
  515. 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 ,
  516. 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 ,
  517. 0 , 0 , 0 } } , { { - 1 , 5 , - 10 , 10 , -
  518. 5 , 1 , 0 , 0 } , { 5 , - 20 , 30 , - 20 , 5 , 0 ,
  519. 0 , 0 } , { - 10 , 30 , - 30 , 10 , 0 , 0 , 0 , 0 }
  520. , { 10 , - 20 , 10 , 0 , 0 , 0 , 0 , 0 } , { -
  521. 5 , 5 , 0 , 0 , 0 , 0 , 0 , 0 } , { 1 , 0 , 0 , 0 ,
  522. 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
  523. , { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } } , { {
  524. 1 , - 6 , 15 , - 20 , 15 , - 6 , 1 , 0 } , { -
  525. 6 , 30 , - 60 , 60 , - 30 , 6 , 0 , 0 } , { 15 , -
  526. 60 , 90 , - 60 , 15 , 0 , 0 , 0 } , { - 20 , 60 , -
  527. 60 , 20 , 0 , 0 , 0 , 0 } , { 15 , - 30 , 15 , 0 , 0 ,
  528. 0 , 0 , 0 } , { - 6 , 6 , 0 , 0 , 0 , 0 , 0 , 0 }
  529. , { 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 ,
  530. 0 , 0 , 0 , 0 , 0 , 0 } } , { { - 1 , 7 , -
  531. 21 , 35 , - 35 , 21 , - 7 , 1 } , { 7 , - 42 , 105 ,
  532. - 140 , 105 , - 42 , 7 , 0 } , { - 21 , 105 , - 210 ,
  533. 210 , - 105 , 21 , 0 , 0 } , { 35 , - 140 , 210 , - 140 ,
  534. 35 , 0 , 0 , 0 } , { - 35 , 105 , - 105 , 35 , 0 , 0 ,
  535. 0 , 0 } , { 21 , - 42 , 21 , 0 , 0 , 0 , 0 , 0 } ,
  536. { - 7 , 7 , 0 , 0 , 0 , 0 , 0 , 0 } , { 1 , 0 ,
  537. 0 , 0 , 0 , 0 , 0 , 0 } } } ;
  538. void __gltrim_power_coeffs__14ArcTe0 (struct BezierArc *__1bez_arc , REAL *__1p , int __1coord )
  539. {
  540. register int __1stride ;
  541. register int __1order ;
  542. register REAL *__1base ;
  543. REAL (*__1mat )[24][24];
  544. REAL (*__1lrow )[24];
  545. __1stride = __1bez_arc -> stride__9BezierArc ;
  546. __1order = __1bez_arc -> order__9BezierArc ;
  547. __1base = (__1bez_arc -> cpts__9BezierArc + __1coord );
  548. __1mat = (((REAL (*)[24][24])(__glgl_Bernstein__14ArcTessell0 [(__1order - 1 )])));
  549. __1lrow = (((REAL (*)[24])(((*__1mat ))[__1order ])));
  550. { { REAL (*__1row )[24];
  551. __1row = (((REAL (*)[24])(((*__1mat ))[0 ])));
  552. for(;__1row != __1lrow ;__1row ++ ) {
  553. register REAL __2s ;
  554. register REAL *__2point ;
  555. register REAL *__2mlast ;
  556. __2s = 0.0 ;
  557. __2point = __1base ;
  558. __2mlast = (float *)(((*__1row ))+ __1order );
  559. { { REAL *__2m ;
  560. __2m = (float *)((*__1row ));
  561. for(;__2m != __2mlast ;( (__2m ++ ), (__2point += __1stride )) )
  562. __2s += (((*__2m ))* ((*__2point )));
  563. ((*(__1p ++ )))= __2s ;
  564. }
  565. }
  566. }
  567. }
  568. }
  569. }
  570. /* the end */