ReactOS 0.4.16-dev-401-g45b008d
TrimRegion Class Reference

#include <trimregion.h>

Inheritance diagram for TrimRegion:
Collaboration diagram for TrimRegion:

Public Member Functions

 TrimRegion ()
 
void init (REAL)
 
void advance (REAL, REAL, REAL)
 
void setDu (REAL)
 
void init (long, Arc_ptr)
 
void getPts (Arc_ptr)
 
void getPts (Backend &)
 
void getGridExtent (TrimVertex *, TrimVertex *)
 
void getGridExtent (void)
 
int canTile (void)
 

Public Attributes

Trimline left
 
Trimline right
 
Gridline top
 
Gridline bot
 
Uarray uarray
 

Private Attributes

REAL oneOverDu
 

Detailed Description

Definition at line 46 of file trimregion.h.

Constructor & Destructor Documentation

◆ TrimRegion()

TrimRegion::TrimRegion ( void  )

Definition at line 45 of file trimregion.cc.

46{
47}

Member Function Documentation

◆ advance()

void TrimRegion::advance ( REAL  topVindex,
REAL  botVindex,
REAL  botVval 
)
inline

Definition at line 79 of file trimregion.h.

80{
81 top.vindex = (long) topVindex;
82 bot.vindex = (long) botVindex;
83 top.vval = bot.vval;
84 bot.vval = botVval;
85 top.ustart = bot.ustart;
86 top.uend = bot.uend;
87}
Gridline bot
Definition: trimregion.h:56
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
#define long
Definition: qsort.c:33
REAL vval
Definition: gridline.h:41
long uend
Definition: gridline.h:44
long ustart
Definition: gridline.h:43
long vindex
Definition: gridline.h:42

Referenced by Slicer::slice_old().

◆ canTile()

int TrimRegion::canTile ( void  )

Definition at line 102 of file trimregion.cc.

103{
104 TrimVertex *lf = left.first();
105 TrimVertex *ll = left.last();
106 TrimVertex *l = ( ll->param[0] > lf->param[0] ) ? ll : lf;
107
108 TrimVertex *rf = right.first();
109 TrimVertex *rl = right.last();
110 TrimVertex *r = ( rl->param[0] < rf->param[0] ) ? rl : rf;
111 return (l->param[0] <= r->param[0]) ? 1 : 0;
112}
w ll
Definition: byte_order.h:167
r l[0]
Definition: byte_order.h:168
REAL param[2]
Definition: trimvertex.h:45
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726

Referenced by Slicer::slice_old().

◆ getGridExtent() [1/2]

void TrimRegion::getGridExtent ( TrimVertex l,
TrimVertex r 
)

Definition at line 86 of file trimregion.cc.

87{
88 bot.ustart = (long) ((l->param[0] - uarray.uarray[0])*oneOverDu);
89 if( l->param[0] >= uarray.uarray[bot.ustart] ) bot.ustart++;
90// if( l->param[0] > uarray.uarray[bot.ustart] ) bot.ustart++;
91 assert( l->param[0] <= uarray.uarray[bot.ustart] );
92 assert( l->param[0] >= uarray.uarray[bot.ustart-1] );
93
94 bot.uend = (long) ((r->param[0] - uarray.uarray[0])*oneOverDu);
95 if( uarray.uarray[bot.uend] >= r->param[0] ) bot.uend--;
96// if( uarray.uarray[bot.uend] > r->param[0] ) bot.uend--;
97 assert( r->param[0] >= uarray.uarray[bot.uend] );
98 assert( r->param[0] <= uarray.uarray[bot.uend+1] );
99}
Uarray uarray
Definition: trimregion.h:57
REAL oneOverDu
Definition: trimregion.h:69
REAL * uarray
Definition: uarray.h:52
#define assert(x)
Definition: debug.h:53

◆ getGridExtent() [2/2]

void TrimRegion::getGridExtent ( void  )

Definition at line 80 of file trimregion.cc.

81{
82 getGridExtent( left.last(), right.last() );
83}
void getGridExtent(void)
Definition: trimregion.cc:80

Referenced by getGridExtent(), and Slicer::slice_old().

◆ getPts() [1/2]

void TrimRegion::getPts ( Arc_ptr  extrema)

Definition at line 66 of file trimregion.cc.

67{
68 left.getNextPts( extrema );
69 right.getPrevPts( extrema );
70}

Referenced by Slicer::slice_old().

◆ getPts() [2/2]

void TrimRegion::getPts ( Backend backend)

Definition at line 73 of file trimregion.cc.

74{
75 left.getNextPts( bot.vval, backend );
76 right.getPrevPts( bot.vval, backend );
77}

◆ init() [1/2]

void TrimRegion::init ( long  npts,
Arc_ptr  extrema 
)

Definition at line 56 of file trimregion.cc.

57{
58 left.init( npts, extrema, extrema->pwlArc->npts - 1 );
59 left.getNextPt();
60
61 right.init( npts, extrema, 0 );
62 right.getPrevPt();
63}

◆ init() [2/2]

void TrimRegion::init ( REAL  vval)
inline

Definition at line 73 of file trimregion.h.

74{
75 bot.vval = vval;
76}

Referenced by Slicer::slice_old().

◆ setDu()

void TrimRegion::setDu ( REAL  du)

Definition at line 50 of file trimregion.cc.

51{
52 oneOverDu = 1.0/du;
53}

Referenced by Slicer::setstriptessellation().

Member Data Documentation

◆ bot

◆ left

Trimline TrimRegion::left

Definition at line 53 of file trimregion.h.

Referenced by Hull::init().

◆ oneOverDu

REAL TrimRegion::oneOverDu
private

Definition at line 69 of file trimregion.h.

Referenced by getGridExtent(), and setDu().

◆ right

Trimline TrimRegion::right

Definition at line 54 of file trimregion.h.

Referenced by Hull::init().

◆ top

Gridline TrimRegion::top

Definition at line 55 of file trimregion.h.

Referenced by Hull::init().

◆ uarray


The documentation for this class was generated from the following files: