ReactOS  0.4.11-dev-721-g95bc44e
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 ( void  )

Definition at line 45 of file trimregion.cc.

46 {
47 }

Member Function Documentation

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

Definition at line 79 of file trimregion.h.

Referenced by Slicer::slice_old().

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 }
long uend
Definition: gridline.h:44
Gridline bot
Definition: trimregion.h:56
long ustart
Definition: gridline.h:43
unsigned long
Definition: typeof.h:99
REAL vval
Definition: gridline.h:41
long vindex
Definition: gridline.h:42
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
int TrimRegion::canTile ( void  )

Definition at line 102 of file trimregion.cc.

Referenced by Slicer::slice_old().

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 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
r l[0]
Definition: byte_order.h:167
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
w ll
Definition: byte_order.h:166
REAL param[2]
Definition: trimvertex.h:45
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 }
REAL oneOverDu
Definition: trimregion.h:69
long uend
Definition: gridline.h:44
Gridline bot
Definition: trimregion.h:56
long ustart
Definition: gridline.h:43
#define assert(x)
Definition: debug.h:53
REAL * uarray
Definition: uarray.h:52
unsigned long
Definition: typeof.h:99
Uarray uarray
Definition: trimregion.h:57
REAL param[2]
Definition: trimvertex.h:45
void TrimRegion::getGridExtent ( void  )

Definition at line 80 of file trimregion.cc.

Referenced by Slicer::slice_old().

81 {
82  getGridExtent( left.last(), right.last() );
83 }
void getGridExtent(void)
Definition: trimregion.cc:80
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
void TrimRegion::getPts ( Arc_ptr  extrema)

Definition at line 66 of file trimregion.cc.

Referenced by Slicer::slice_old().

67 {
68  left.getNextPts( extrema );
69  right.getPrevPts( extrema );
70 }
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
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 }
Gridline bot
Definition: trimregion.h:56
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
REAL vval
Definition: gridline.h:41
void TrimRegion::init ( REAL  vval)
inline

Definition at line 73 of file trimregion.h.

Referenced by Slicer::slice_old().

74 {
75  bot.vval = vval;
76 }
Gridline bot
Definition: trimregion.h:56
REAL vval
Definition: gridline.h:41
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 }
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
void TrimRegion::setDu ( REAL  du)

Definition at line 50 of file trimregion.cc.

Referenced by Slicer::setstriptessellation().

51 {
52  oneOverDu = 1.0/du;
53 }
REAL oneOverDu
Definition: trimregion.h:69

Member Data Documentation

Trimline TrimRegion::left

Definition at line 53 of file trimregion.h.

Referenced by Hull::init().

REAL TrimRegion::oneOverDu
private

Definition at line 69 of file trimregion.h.

Referenced by getGridExtent(), and setDu().

Trimline TrimRegion::right

Definition at line 54 of file trimregion.h.

Referenced by Hull::init().

Gridline TrimRegion::top

Definition at line 55 of file trimregion.h.

Referenced by Hull::init().


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