ReactOS 0.4.15-dev-5672-gf73ac17
Hull Class Reference

#include <hull.h>

Inheritance diagram for Hull:
Collaboration diagram for Hull:

Classes

struct  Side
 

Public Member Functions

 Hull (void)
 
 ~Hull (void)
 
void init (void)
 
GridTrimVertexnextlower (GridTrimVertex *)
 
GridTrimVertexnextupper (GridTrimVertex *)
 
- Public Member Functions inherited from TrimRegion
 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)
 

Private Attributes

Side lower
 
Side upper
 
Trimline fakeleft
 
Trimline fakeright
 

Additional Inherited Members

- Public Attributes inherited from TrimRegion
Trimline left
 
Trimline right
 
Gridline top
 
Gridline bot
 
Uarray uarray
 

Detailed Description

Definition at line 47 of file hull.h.

Constructor & Destructor Documentation

◆ Hull()

Hull::Hull ( void  )

Definition at line 51 of file hull.cc.

52{}

◆ ~Hull()

Hull::~Hull ( void  )

Definition at line 54 of file hull.cc.

55{}

Member Function Documentation

◆ init()

void Hull::init ( void  )

Definition at line 63 of file hull.cc.

64{
65 TrimVertex *lfirst = left.first();
66 TrimVertex *llast = left.last();
67 if( lfirst->param[0] <= llast->param[0] ) {
68 fakeleft.init( left.first() );
70 lower.left = &left;
71 } else {
72 fakeleft.init( left.last() );
74 upper.left = &left;
75 }
76 upper.left->last();
77 lower.left->first();
78
79 if( top.ustart <= top.uend ) {
80 upper.line = &top;
81 upper.index = top.ustart;
82 } else
83 upper.line = 0;
84
85 if( bot.ustart <= bot.uend ) {
86 lower.line = &bot;
88 } else
89 lower.line = 0;
90
91 TrimVertex *rfirst = right.first();
92 TrimVertex *rlast = right.last();
93 if( rfirst->param[0] <= rlast->param[0] ) {
94 fakeright.init( right.last() );
96 upper.right = &right;
97 } else {
98 fakeright.init( right.first() );
100 lower.right = &right;
101 }
102 upper.right->first();
103 lower.right->last();
104}
Side upper
Definition: hull.h:63
Trimline fakeleft
Definition: hull.h:64
Side lower
Definition: hull.h:62
Trimline fakeright
Definition: hull.h:65
Gridline bot
Definition: trimregion.h:56
Trimline right
Definition: trimregion.h:54
Trimline left
Definition: trimregion.h:53
Gridline top
Definition: trimregion.h:55
REAL param[2]
Definition: trimvertex.h:45
TrimVertex * first(void)
Definition: trimline.h:93
void init(TrimVertex *)
Definition: trimline.cc:58
TrimVertex * last(void)
Definition: trimline.h:99
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
long uend
Definition: gridline.h:44
long ustart
Definition: gridline.h:43
long index
Definition: hull.h:59
Trimline * left
Definition: hull.h:56
Trimline * right
Definition: hull.h:58
Gridline * line
Definition: hull.h:57

Referenced by Mesher::mesh(), Slicer::outline(), and Slicer::slice_old().

◆ nextlower()

GridTrimVertex * Hull::nextlower ( GridTrimVertex gv)

Definition at line 142 of file hull.cc.

143{
144 if( lower.left ) {
145 gv->set( lower.left->next() );
146 if( gv->isTrimVert() ) return gv;
147 lower.left = 0;
148 }
149
150 if( lower.line ) {
152 gv->set( lower.index, lower.line->vindex );
153 if( lower.index++ == lower.line->uend ) lower.line = 0;
154 return gv;
155 }
156
157 if( lower.right ) {
158 gv->set( lower.right->prev() );
159 if( gv->isTrimVert() ) return gv;
160 lower.right = 0;
161 }
162
163 return 0;
164}
void set(long, long)
Uarray uarray
Definition: trimregion.h:57
TrimVertex * prev(void)
Definition: trimline.h:87
TrimVertex * next(void)
Definition: trimline.h:81
REAL * uarray
Definition: uarray.h:52
REAL vval
Definition: gridline.h:41
long vindex
Definition: gridline.h:42

Referenced by Mesher::finishLower(), Mesher::mesh(), and Slicer::outline().

◆ nextupper()

GridTrimVertex * Hull::nextupper ( GridTrimVertex gv)

Definition at line 116 of file hull.cc.

117{
118 if( upper.left ) {
119 gv->set( upper.left->prev() );
120 if( gv->isTrimVert() ) return gv;
121 upper.left = 0;
122 }
123
124 if( upper.line ) {
127 gv->set( upper.index, upper.line->vindex );
128 if( upper.index++ == upper.line->uend ) upper.line = 0;
129 return gv;
130 }
131
132 if( upper.right ) {
133 gv->set( upper.right->next() );
134 if( gv->isTrimVert() ) return gv;
135 upper.right = 0;
136 }
137
138 return 0;
139}
#define assert(x)
Definition: debug.h:53

Referenced by Mesher::finishUpper(), Mesher::mesh(), and Slicer::outline().

Member Data Documentation

◆ fakeleft

Trimline Hull::fakeleft
private

Definition at line 64 of file hull.h.

Referenced by init().

◆ fakeright

Trimline Hull::fakeright
private

Definition at line 65 of file hull.h.

Referenced by init().

◆ lower

Side Hull::lower
private

Definition at line 62 of file hull.h.

Referenced by init(), nextlower(), and Slicer::outline().

◆ upper

Side Hull::upper
private

Definition at line 63 of file hull.h.

Referenced by init(), nextupper(), and Slicer::outline().


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