Files Classes Functions Hierarchy
#include <regionD2tessdisplay.h>
Public Member Functions | |
| regionD2tessdisplaymesh (gobjContainer &gr_, TS &tess_, boolc _multicolored=true) | |
| The graphics output, first link and coloring option set. | |
| void | draw () |
| Write the graphics as gobj objects. | |
Public Attributes | |
| gobjContainer & | gr |
| Unprocessed graphics. | |
| TS & | tess |
| The tesselation. | |
| bool | multicolored |
| Randomly color the mesh. | |
Definition at line 15 of file regionD2tessdisplay.h.
| regionD2tessdisplaymesh< TS, Indx >::regionD2tessdisplaymesh | ( | gobjContainer & | gr_, | |
| TS & | tess_, | |||
| boolc | _multicolored = true | |||
| ) | [inline] |
The graphics output, first link and coloring option set.
Definition at line 29 of file regionD2tessdisplay.h.
00034 : gr(gr_), tess(tess_), multicolored(_multicolored) {}
| void regionD2tessdisplaymesh< TS, Indx >::draw | ( | ) | [inline, virtual] |
Write the graphics as gobj objects.
Implements gobj.
Definition at line 137 of file regionD2tessdisplay.h.
References regionD2tessdisplaymesh< TS, Indx >::gr, regionD2tessdisplaymesh< TS, Indx >::multicolored, gobjContainer::push(), r, pnlinkiterconst< Indx >::reset(), and regionD2tessdisplaymesh< TS, Indx >::tess.
00138 { 00139 //cout << "regionD2tessdisplaymesh<TS,Indx>::draw()" << endl; 00140 gr.push( new gobjglEnable(GL_LINE_STIPPLE) ); 00141 gr.push( new gobjglLineStipple(1,0x1C47) ); 00142 00143 gr.push( new gobjglBegin(GL_LINES) ); 00144 00145 Indx imax = tess.vi.size(); 00146 for (Indx i=0; i<imax; ++i) 00147 { 00148 if ( tess.vi[i].isnull()) 00149 continue; 00150 00151 //cout << SHOW(i) << endl; 00152 00153 if (multicolored) 00154 { 00155 random11<double> r; 00156 gr.push(new gobjglColor3f(r(),r(),r())); 00157 } 00158 00159 pnlinkiterconst<Indx> k(tess.vi[i].start); 00160 k.reset(); 00161 do 00162 { 00163 //cout << SHOW(k->plink) << " " << SHOW(k->next->plink) << endl; 00164 gr.push( new gobjglVertex2f(tess.pts[k->plink]) ); 00165 gr.push( new gobjglVertex2f(tess.pts[k->next->plink]) ); 00166 ++k; 00167 } while (!k); 00168 } 00169 00170 gr.push( new gobjglEnd() ); 00171 gr.push(new gobjglDisable(GL_LINE_STIPPLE)); 00172 }
| gobjContainer& regionD2tessdisplaymesh< TS, Indx >::gr |
Unprocessed graphics.
Definition at line 20 of file regionD2tessdisplay.h.
Referenced by regionD2tessdisplaymesh< TS, Indx >::draw().
| bool regionD2tessdisplaymesh< TS, Indx >::multicolored |
Randomly color the mesh.
Definition at line 25 of file regionD2tessdisplay.h.
Referenced by regionD2tessdisplaymesh< TS, Indx >::draw().
| TS& regionD2tessdisplaymesh< TS, Indx >::tess |
The tesselation.
Definition at line 22 of file regionD2tessdisplay.h.
Referenced by regionD2tessdisplaymesh< TS, Indx >::draw().
1.5.8