proj home

Files   Classes   Functions   Hierarchy  

regionD2tessdisplaymesh< TS, Indx > Class Template Reference

Display the outside polygon mesh as a dotted line. More...

#include <regionD2tessdisplay.h>

Inheritance diagram for regionD2tessdisplaymesh< TS, Indx >:
Collaboration diagram for regionD2tessdisplaymesh< TS, Indx >:

List of all members.

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

gobjContainergr
 Unprocessed graphics.
TS & tess
 The tesselation.
bool multicolored
 Randomly color the mesh.


Detailed Description

template<typename TS, typename Indx>
class regionD2tessdisplaymesh< TS, Indx >

Display the outside polygon mesh as a dotted line.

Definition at line 15 of file regionD2tessdisplay.h.


Constructor & Destructor Documentation

template<typename TS , typename Indx >
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) {}


Member Function Documentation

template<typename TS , typename Indx >
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 }


Member Data Documentation

template<typename TS , typename Indx >
gobjContainer& regionD2tessdisplaymesh< TS, Indx >::gr

Unprocessed graphics.

Definition at line 20 of file regionD2tessdisplay.h.

Referenced by regionD2tessdisplaymesh< TS, Indx >::draw().

template<typename TS , typename Indx >
bool regionD2tessdisplaymesh< TS, Indx >::multicolored

Randomly color the mesh.

Definition at line 25 of file regionD2tessdisplay.h.

Referenced by regionD2tessdisplaymesh< TS, Indx >::draw().

template<typename TS , typename Indx >
TS& regionD2tessdisplaymesh< TS, Indx >::tess

The tesselation.

Definition at line 22 of file regionD2tessdisplay.h.

Referenced by regionD2tessdisplaymesh< TS, Indx >::draw().


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

Generated on Fri Mar 4 00:50:12 2011 for Chelton Evans Source by  doxygen 1.5.8