40 #include "glimports.h"
43 #include "trimregion.h"
46 TrimRegion::TrimRegion(
void )
51 TrimRegion::setDu( REAL du )
57 TrimRegion::init(
long npts, Arc_ptr extrema )
59 left.init( npts, extrema, extrema->pwlArc->npts - 1 );
62 right.init( npts, extrema, 0 );
67 TrimRegion::getPts( Arc_ptr extrema )
69 left.getNextPts( extrema );
70 right.getPrevPts( extrema );
74 TrimRegion::getPts(
Backend &backend )
76 left.getNextPts( bot.vval, backend );
77 right.getPrevPts( bot.vval, backend );
81 TrimRegion::getGridExtent(
void )
83 getGridExtent( left.last(), right.last() );
89 bot.ustart = (long) ((l->param[0] - uarray.uarray[0])*oneOverDu);
90 if( l->param[0] >= uarray.uarray[bot.ustart] ) bot.ustart++;
92 assert( l->param[0] <= uarray.uarray[bot.ustart] );
93 assert( l->param[0] >= uarray.uarray[bot.ustart-1] );
95 bot.uend = (long) ((r->param[0] - uarray.uarray[0])*oneOverDu);
96 if( uarray.uarray[bot.uend] >= r->param[0] ) bot.uend--;
98 assert( r->param[0] >= uarray.uarray[bot.uend] );
99 assert( r->param[0] <= uarray.uarray[bot.uend+1] );
103 TrimRegion::canTile(
void )
107 TrimVertex *l = ( ll->param[0] > lf->param[0] ) ? ll : lf;
111 TrimVertex *r = ( rl->param[0] < rf->param[0] ) ? rl : rf;
112 return (l->param[0] <= r->param[0]) ? 1 : 0;