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.

638 lines
27 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/trimline.c++ > */
  27. void *__vec_new (void *, int , int , void *);
  28. void __vec_ct (void *, int , int , void *);
  29. void __vec_dt (void *, int , int , void *);
  30. void __vec_delete (void *, int , int , void *, int , int );
  31. typedef int (*__vptp)(void);
  32. struct __mptr {short d; short i; __vptp f; };
  33. typedef unsigned int size_t ;
  34. // extern void *malloc (size_t );
  35. // extern void free (void *);
  36. struct Arc;
  37. struct Backend;
  38. typedef float REAL ;
  39. typedef void (*Pfvv )(void );
  40. typedef void (*Pfvf )(float *);
  41. typedef int (*cmpfunc )(void *, void *);
  42. typedef REAL Knot ;
  43. typedef REAL *Knot_ptr ;
  44. struct TrimVertex;
  45. struct TrimVertex {
  46. REAL param__10TrimVertex [2];
  47. long nuid__10TrimVertex ;
  48. };
  49. typedef struct TrimVertex *TrimVertex_p ;
  50. struct Buffer;
  51. struct Buffer {
  52. struct Buffer *next__6Buffer ;
  53. };
  54. struct Pool;
  55. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  56. struct Pool {
  57. struct Buffer *freelist__4Pool ;
  58. char *blocklist__4Pool [32];
  59. int nextblock__4Pool ;
  60. char *curblock__4Pool ;
  61. int buffersize__4Pool ;
  62. int nextsize__4Pool ;
  63. int nextfree__4Pool ;
  64. int initsize__4Pool ;
  65. char *name__4Pool ;
  66. int magic__4Pool ;
  67. };
  68. void __glgrow__4PoolFv (struct Pool *);
  69. struct PooledObj;
  70. struct PooledObj {
  71. char __W3__9PooledObj ;
  72. };
  73. struct PwlArc;
  74. struct PwlArc {
  75. char __W3__9PooledObj ;
  76. struct TrimVertex *pts__6PwlArc ;
  77. int npts__6PwlArc ;
  78. long type__6PwlArc ;
  79. };
  80. struct Bin;
  81. struct Arc;
  82. struct BezierArc;
  83. typedef struct Arc *Arc_ptr ;
  84. enum arc_side { arc_none = 0, arc_right = 1, arc_top = 2, arc_left = 3, arc_bottom = 4} ;
  85. struct Arc;
  86. struct Arc {
  87. char __W3__9PooledObj ;
  88. Arc_ptr prev__3Arc ;
  89. Arc_ptr next__3Arc ;
  90. Arc_ptr link__3Arc ;
  91. struct BezierArc *bezierArc__3Arc ;
  92. struct PwlArc *pwlArc__3Arc ;
  93. long type__3Arc ;
  94. long nuid__3Arc ;
  95. };
  96. extern int __glbezier_tag__3Arc ;
  97. extern int __glarc_tag__3Arc ;
  98. extern int __gltail_tag__3Arc ;
  99. struct Jarcloc;
  100. struct Jarcloc {
  101. struct Arc *arc__7Jarcloc ;
  102. struct TrimVertex *p__7Jarcloc ;
  103. struct TrimVertex *plast__7Jarcloc ;
  104. };
  105. struct Trimline;
  106. struct Trimline {
  107. struct TrimVertex **pts__8Trimline ;
  108. long numverts__8Trimline ;
  109. long i__8Trimline ;
  110. long size__8Trimline ;
  111. struct Jarcloc jarcl__8Trimline ;
  112. struct TrimVertex t__8Trimline ;
  113. struct TrimVertex b__8Trimline ;
  114. struct TrimVertex *tinterp__8Trimline ;
  115. struct TrimVertex *binterp__8Trimline ;
  116. };
  117. struct GridVertex;
  118. struct GridVertex {
  119. long gparam__10GridVertex [2];
  120. };
  121. struct GridTrimVertex;
  122. struct GridTrimVertex {
  123. char __W3__9PooledObj ;
  124. struct TrimVertex dummyt__14GridTrimVertex ;
  125. struct GridVertex dummyg__14GridTrimVertex ;
  126. struct TrimVertex *t__14GridTrimVertex ;
  127. struct GridVertex *g__14GridTrimVertex ;
  128. };
  129. typedef struct GridTrimVertex *GridTrimVertex_p ;
  130. struct BasicCurveEvaluator;
  131. struct BasicSurfaceEvaluator;
  132. struct Backend;
  133. struct Backend {
  134. struct BasicCurveEvaluator *curveEvaluator__7Backend ;
  135. struct BasicSurfaceEvaluator *surfaceEvaluator__7Backend ;
  136. int wireframetris__7Backend ;
  137. int wireframequads__7Backend ;
  138. int npts__7Backend ;
  139. REAL mesh__7Backend [3][4];
  140. int meshindex__7Backend ;
  141. };
  142. extern struct __mptr* __ptbl_vec_____core_trimline_c_____ct_[];
  143. struct Trimline *__gl__ct__8TrimlineFv (struct Trimline *__0this )
  144. {
  145. void *__1__Xp00uzigaiaa ;
  146. if (__0this || (__0this = (struct Trimline *)( (__1__Xp00uzigaiaa = malloc ( (sizeof (struct Trimline))) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) )){
  147. __0this -> size__8Trimline = 0 ;
  148. __0this -> pts__8Trimline = 0 ;
  149. __0this -> numverts__8Trimline = 0 ;
  150. __0this -> tinterp__8Trimline = (& __0this -> t__8Trimline );
  151. __0this -> binterp__8Trimline = (& __0this -> b__8Trimline );
  152. } return __0this ;
  153. }
  154. void __gl__dt__8TrimlineFv (struct Trimline *__0this ,
  155. int __0__free )
  156. {
  157. void *__1__X5 ;
  158. if (__0this ){
  159. if (__0this -> pts__8Trimline )( (__1__X5 = (void *)__0this -> pts__8Trimline ), ( (__1__X5 ?( free ( __1__X5 ) ,
  160. 0 ) :( 0 ) )) ) ;
  161. if (__0this )if (__0__free & 1)( (((void *)__0this )?( free ( ((void *)__0this )) , 0 ) :( 0 ) ))
  162. ;
  163. }
  164. }
  165. static void grow__8TrimlineFl (struct Trimline *, long );
  166. static void append__8TrimlineFP10TrimVertex (struct Trimline *, struct TrimVertex *);
  167. void __glinit__8TrimlineFP10TrimVer0 (struct Trimline *__0this , struct TrimVertex *__1v )
  168. {
  169. ( (__0this -> numverts__8Trimline = 0 )) ;
  170. grow__8TrimlineFl ( __0this , (long )1 ) ;
  171. append__8TrimlineFP10TrimVertex ( __0this , __1v ) ;
  172. }
  173. void __glinit__8TrimlineFlP3ArcT1 (struct Trimline *__0this , long __1npts , Arc_ptr __1jarc , long __1last )
  174. {
  175. void *__1__X6 ;
  176. void *__1__Xp00uzigaiaa ;
  177. ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = __1jarc ), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (&
  178. (__1jarc -> pwlArc__3Arc -> pts__6PwlArc [((long )0 )]))), (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (__1jarc -> pwlArc__3Arc -> pts__6PwlArc [__1last ])))) )
  179. ;
  180. ( ((__0this -> size__8Trimline < (__1npts + 2 ))?( ( (__0this -> size__8Trimline = (2 * (__1npts + 2 ))), ( (__0this -> pts__8Trimline ?(
  181. ( (__1__X6 = (void *)__0this -> pts__8Trimline ), ( (__1__X6 ?( free ( __1__X6 ) , 0 ) :( 0 ) ))
  182. ) , 0 ) :( 0 ) ), (__0this -> pts__8Trimline = (struct TrimVertex **)(((struct TrimVertex **)( (__1__Xp00uzigaiaa = malloc ( ((sizeof
  183. (struct TrimVertex *))* __0this -> size__8Trimline )) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) )))) ) , 0 ) :( 0 )
  184. )) ;
  185. }
  186. void __glgetNextPt__8TrimlineFv (struct Trimline *__0this )
  187. {
  188. ((*__0this -> binterp__8Trimline ))= (*( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc ==
  189. ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc )?( ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this ->
  190. jarcl__8Trimline ))-> arc__7Jarcloc -> next__3Arc ), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  191. arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  192. arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), (((void )0 ))) ) )
  193. , 0 ) :( 0 ) ), (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc ++ )) ) );
  194. }
  195. void __glgetPrevPt__8TrimlineFv (struct Trimline *__0this )
  196. {
  197. ((*__0this -> binterp__8Trimline ))= (*( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc ==
  198. ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc )?( ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this ->
  199. jarcl__8Trimline ))-> arc__7Jarcloc -> prev__3Arc ), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  200. arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), ( (((struct Jarcloc *)(& __0this ->
  201. jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), (((void )0 ))) ) )
  202. , 0 ) :( 0 ) ), (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc -- )) ) );
  203. }
  204. long __glinterpvert__8TrimlineSFP100 (struct TrimVertex *, struct TrimVertex *, struct TrimVertex *, REAL );
  205. void __gltriangle__7BackendFP10Trim0 (struct Backend *, struct TrimVertex *, struct TrimVertex *, struct TrimVertex *);
  206. void __glgetNextPts__8TrimlineFfR7B0 (struct Trimline *__0this , REAL __1vval , struct Backend *__1backend )
  207. {
  208. register struct TrimVertex *__1p ;
  209. struct TrimVertex *__1__Xtmp00aesmaigk ;
  210. ( (__0this -> numverts__8Trimline = 0 )) ;
  211. ( (__1__Xtmp00aesmaigk = __0this -> tinterp__8Trimline ), ( (__0this -> tinterp__8Trimline = __0this -> binterp__8Trimline ), (__0this -> binterp__8Trimline = __1__Xtmp00aesmaigk )) ) ;
  212. ( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __0this -> tinterp__8Trimline )) ;
  213. ((void )0 );
  214. ;
  215. for(__1p = ( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  216. plast__7Jarcloc )?( ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> next__3Arc ), (
  217. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), (
  218. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(&
  219. __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), (((void )0 ))) ) ) , 0 ) :( 0 )
  220. ), (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc ++ )) ) ;(__1p -> param__10TrimVertex [1 ])>= __1vval ;__1p = ( (((void )0 )),
  221. ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc )?( ( (((struct Jarcloc *)(&
  222. __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> next__3Arc ), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  223. p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  224. plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc ->
  225. npts__6PwlArc - 1 )]))), (((void )0 ))) ) ) , 0 ) :( 0 ) ), (((struct Jarcloc *)(& __0this ->
  226. jarcl__8Trimline ))-> p__7Jarcloc ++ )) ) ) {
  227. ( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __1p ))
  228. ;
  229. }
  230. if (__glinterpvert__8TrimlineSFP100 ( ( (__0this -> i__8Trimline = __0this -> numverts__8Trimline ), (__0this -> pts__8Trimline [(-- __0this -> i__8Trimline )])) , __1p , __0this ->
  231. binterp__8Trimline , __1vval ) ){
  232. __0this -> binterp__8Trimline -> nuid__10TrimVertex = __1p -> nuid__10TrimVertex ;
  233. __gltriangle__7BackendFP10Trim0 ( (struct Backend *)__1backend , __1p , __0this -> binterp__8Trimline , ( (__0this -> i__8Trimline = __0this -> numverts__8Trimline ), (__0this -> pts__8Trimline [(-- __0this ->
  234. i__8Trimline )])) ) ;
  235. ( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __0this -> binterp__8Trimline )) ;
  236. }
  237. ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc == (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ])))?(((struct
  238. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this ->
  239. jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))):(((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  240. arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))))) ;
  241. (( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc )?(
  242. ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> prev__3Arc ), ( (((struct
  243. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this ->
  244. jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(&
  245. __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), (((void )0 ))) ) ) , 0 ) :( 0 ) ),
  246. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc -- )) ) );
  247. ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc == (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ])))?(((struct
  248. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this ->
  249. jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))):(((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  250. arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))))) ;
  251. }
  252. void __glgetPrevPts__8TrimlineFfR7B0 (struct Trimline *__0this , REAL __1vval , struct Backend *__1backend )
  253. {
  254. register struct TrimVertex *__1q ;
  255. struct TrimVertex *__1__Xtmp00aesmaigk ;
  256. ( (__0this -> numverts__8Trimline = 0 )) ;
  257. ( (__1__Xtmp00aesmaigk = __0this -> tinterp__8Trimline ), ( (__0this -> tinterp__8Trimline = __0this -> binterp__8Trimline ), (__0this -> binterp__8Trimline = __1__Xtmp00aesmaigk )) ) ;
  258. ( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __0this -> tinterp__8Trimline )) ;
  259. ((void )0 );
  260. ;
  261. for(__1q = ( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  262. plast__7Jarcloc )?( ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> prev__3Arc ), (
  263. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(&
  264. __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct
  265. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), (((void )0 ))) ) ) , 0 ) :( 0 )
  266. ), (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc -- )) ) ;(__1q -> param__10TrimVertex [1 ])>= __1vval ;__1q = ( (((void )0 )),
  267. ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc )?( ( (((struct Jarcloc *)(&
  268. __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> prev__3Arc ), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  269. p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc ->
  270. npts__6PwlArc - 1 )]))), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc ->
  271. pwlArc__3Arc -> pts__6PwlArc [0 ]))), (((void )0 ))) ) ) , 0 ) :( 0 ) ), (((struct Jarcloc *)(& __0this ->
  272. jarcl__8Trimline ))-> p__7Jarcloc -- )) ) ) {
  273. ( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __1q ))
  274. ;
  275. }
  276. if (__glinterpvert__8TrimlineSFP100 ( __1q , ( (__0this -> i__8Trimline = __0this -> numverts__8Trimline ), (__0this -> pts__8Trimline [(-- __0this -> i__8Trimline )])) , __0this ->
  277. binterp__8Trimline , __1vval ) ){
  278. __0this -> binterp__8Trimline -> nuid__10TrimVertex = __1q -> nuid__10TrimVertex ;
  279. __gltriangle__7BackendFP10Trim0 ( (struct Backend *)__1backend , ( (__0this -> i__8Trimline = __0this -> numverts__8Trimline ), (__0this -> pts__8Trimline [(-- __0this -> i__8Trimline )])) , __0this ->
  280. binterp__8Trimline , __1q ) ;
  281. ( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __0this -> binterp__8Trimline )) ;
  282. }
  283. ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc == (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ])))?(((struct
  284. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this ->
  285. jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))):(((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  286. arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))))) ;
  287. (( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc )?(
  288. ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> next__3Arc ), ( (((struct
  289. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), ( (((struct
  290. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this ->
  291. jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), (((void )0 ))) ) ) , 0 ) :( 0 ) ),
  292. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc ++ )) ) );
  293. ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc == (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ])))?(((struct
  294. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(& __0this ->
  295. jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))):(((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  296. arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))))) ;
  297. }
  298. void __glgetNextPts__8TrimlineFP3Ar0 (struct Trimline *__0this , Arc_ptr __1botarc )
  299. {
  300. struct TrimVertex *__1__Xtmp00aesmaigk ;
  301. ( (__0this -> numverts__8Trimline = 0 )) ;
  302. ( (__1__Xtmp00aesmaigk = __0this -> tinterp__8Trimline ), ( (__0this -> tinterp__8Trimline = __0this -> binterp__8Trimline ), (__0this -> binterp__8Trimline = __1__Xtmp00aesmaigk )) ) ;
  303. ( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __0this -> tinterp__8Trimline )) ;
  304. { struct PwlArc *__1lastpwl ;
  305. struct TrimVertex *__1lastpt1 ;
  306. struct TrimVertex *__1lastpt2 ;
  307. register struct TrimVertex *__1p ;
  308. __1lastpwl = __1botarc -> prev__3Arc -> pwlArc__3Arc ;
  309. __1lastpt1 = (& (__1lastpwl -> pts__6PwlArc [(__1lastpwl -> npts__6PwlArc - 1 )]));
  310. __1lastpt2 = __1botarc -> pwlArc__3Arc -> pts__6PwlArc ;
  311. __1p = ( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  312. plast__7Jarcloc )?( ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> next__3Arc ), (
  313. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), (
  314. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(&
  315. __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), (((void )0 ))) ) ) , 0 ) :( 0 )
  316. ), (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc ++ )) ) ;
  317. for(( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __1p )) ;__1p != __1lastpt2 ;( (((void )0 )), ((__0this -> pts__8Trimline [(__0this ->
  318. numverts__8Trimline ++ )])= __1p )) ) {
  319. ((void )0 );
  320. __1p = ( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  321. plast__7Jarcloc )?( ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> next__3Arc ), (
  322. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), (
  323. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(&
  324. __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), (((void )0 ))) ) ) , 0 ) :( 0 )
  325. ), (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc ++ )) ) ;
  326. }
  327. }
  328. }
  329. void __glgetPrevPts__8TrimlineFP3Ar0 (struct Trimline *__0this , Arc_ptr __1botarc )
  330. {
  331. struct TrimVertex *__1__Xtmp00aesmaigk ;
  332. ( (__0this -> numverts__8Trimline = 0 )) ;
  333. ( (__1__Xtmp00aesmaigk = __0this -> tinterp__8Trimline ), ( (__0this -> tinterp__8Trimline = __0this -> binterp__8Trimline ), (__0this -> binterp__8Trimline = __1__Xtmp00aesmaigk )) ) ;
  334. ( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __0this -> tinterp__8Trimline )) ;
  335. { struct PwlArc *__1lastpwl ;
  336. struct TrimVertex *__1lastpt1 ;
  337. struct TrimVertex *__1lastpt2 ;
  338. register struct TrimVertex *__1q ;
  339. __1lastpwl = __1botarc -> prev__3Arc -> pwlArc__3Arc ;
  340. __1lastpt1 = (& (__1lastpwl -> pts__6PwlArc [(__1lastpwl -> npts__6PwlArc - 1 )]));
  341. __1lastpt2 = __1botarc -> pwlArc__3Arc -> pts__6PwlArc ;
  342. __1q = ( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  343. plast__7Jarcloc )?( ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> prev__3Arc ), (
  344. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(&
  345. __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct
  346. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), (((void )0 ))) ) ) , 0 ) :( 0 )
  347. ), (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc -- )) ) ;
  348. for(( (((void )0 )), ((__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __1q )) ;__1q != __1lastpt1 ;( (((void )0 )), ((__0this -> pts__8Trimline [(__0this ->
  349. numverts__8Trimline ++ )])= __1q )) ) {
  350. ((void )0 );
  351. __1q = ( (((void )0 )), ( ((((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc == ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))->
  352. plast__7Jarcloc )?( ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc = ((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> prev__3Arc ), (
  353. (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc = (& (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [(((struct Jarcloc *)(&
  354. __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> npts__6PwlArc - 1 )]))), ( (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> plast__7Jarcloc = (& (((struct
  355. Jarcloc *)(& __0this -> jarcl__8Trimline ))-> arc__7Jarcloc -> pwlArc__3Arc -> pts__6PwlArc [0 ]))), (((void )0 ))) ) ) , 0 ) :( 0 )
  356. ), (((struct Jarcloc *)(& __0this -> jarcl__8Trimline ))-> p__7Jarcloc -- )) ) ;
  357. }
  358. }
  359. }
  360. long __glinterpvert__8TrimlineSFP100 (struct TrimVertex *__1a , struct TrimVertex *__1b , struct TrimVertex *__1c , REAL __1vval )
  361. {
  362. REAL __1denom ;
  363. __1denom = ((__1a -> param__10TrimVertex [1 ])- (__1b -> param__10TrimVertex [1 ]));
  364. if (__1denom != 0 ){
  365. if (__1vval == (__1a -> param__10TrimVertex [1 ])){
  366. (__1c -> param__10TrimVertex [0 ])= (__1a -> param__10TrimVertex [0 ]);
  367. (__1c -> param__10TrimVertex [1 ])= (__1a -> param__10TrimVertex [1 ]);
  368. __1c -> nuid__10TrimVertex = __1a -> nuid__10TrimVertex ;
  369. return (long )0 ;
  370. }
  371. else
  372. if (__1vval == (__1b -> param__10TrimVertex [1 ])){
  373. (__1c -> param__10TrimVertex [0 ])= (__1b -> param__10TrimVertex [0 ]);
  374. (__1c -> param__10TrimVertex [1 ])= (__1b -> param__10TrimVertex [1 ]);
  375. __1c -> nuid__10TrimVertex = __1b -> nuid__10TrimVertex ;
  376. return (long )0 ;
  377. }
  378. else
  379. {
  380. REAL __3r ;
  381. __3r = (((__1a -> param__10TrimVertex [1 ])- __1vval )/ __1denom );
  382. (__1c -> param__10TrimVertex [0 ])= ((__1a -> param__10TrimVertex [0 ])- (__3r * ((__1a -> param__10TrimVertex [0 ])- (__1b -> param__10TrimVertex [0 ]))));
  383. (__1c -> param__10TrimVertex [1 ])= __1vval ;
  384. return (long )1 ;
  385. }
  386. }
  387. else
  388. {
  389. (__1c -> param__10TrimVertex [0 ])= (__1a -> param__10TrimVertex [0 ]);
  390. (__1c -> param__10TrimVertex [1 ])= (__1a -> param__10TrimVertex [1 ]);
  391. __1c -> nuid__10TrimVertex = __1a -> nuid__10TrimVertex ;
  392. return (long )0 ;
  393. }
  394. }
  395. static void append__8TrimlineFP10TrimVertex (struct Trimline *__0this ,
  396. struct TrimVertex *__1v )
  397. {
  398. ((void )0 );
  399. (__0this -> pts__8Trimline [(__0this -> numverts__8Trimline ++ )])= __1v ;
  400. }
  401. static void grow__8TrimlineFl (struct Trimline *__0this ,
  402. long __1npts )
  403. {
  404. void *__1__X6 ;
  405. void *__1__Xp00uzigaiaa ;
  406. if (__0this -> size__8Trimline < __1npts ){
  407. void *__1__X6 ;
  408. void *__1__Xp00uzigaiaa ;
  409. __0this -> size__8Trimline = (2 * __1npts );
  410. if (__0this -> pts__8Trimline )( (__1__X6 = (void *)__0this -> pts__8Trimline ), ( (__1__X6 ?( free ( __1__X6 ) , 0 ) :(
  411. 0 ) )) ) ;
  412. __0this -> pts__8Trimline = (struct TrimVertex **)(((struct TrimVertex **)( (__1__Xp00uzigaiaa = malloc ( ((sizeof (struct TrimVertex *))* __0this -> size__8Trimline )) ), (__1__Xp00uzigaiaa ?(((void
  413. *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) ));
  414. }
  415. }
  416. /* the end */