proj home

Files   Classes   Functions   Hierarchy  

tessD2draw02simplexindex< TESS, PT, INDX > Class Template Reference

Draw the simplex index. More...

#include <tessD2draw02.h>

Inheritance diagram for tessD2draw02simplexindex< TESS, PT, INDX >:
Collaboration diagram for tessD2draw02simplexindex< TESS, PT, INDX >:

List of all members.

Public Member Functions

 tessD2draw02simplexindex (TESS &tess_, bool &isdrawn_)
 Red indexes.
void draw ()
 Draw to the global graphics stream.

Public Attributes

gobjglColor3f col
 Change the text color.
boolisdrawn
 Toggle the display.


Detailed Description

template<typename TESS, typename PT, typename INDX>
class tessD2draw02simplexindex< TESS, PT, INDX >

Draw the simplex index.

Definition at line 62 of file tessD2draw02.h.


Constructor & Destructor Documentation

template<typename TESS, typename PT, typename INDX>
tessD2draw02simplexindex< TESS, PT, INDX >::tessD2draw02simplexindex ( TESS &  tess_,
bool isdrawn_ 
) [inline]

Red indexes.

Definition at line 74 of file tessD2draw02.h.

00075     : tess(tess_), col(1.0,0.0,0.0), isdrawn(isdrawn_) {}


Member Function Documentation

template<typename TESS , typename PT , typename INDX >
void tessD2draw02simplexindex< TESS, PT, INDX >::draw (  )  [inline, virtual]

Draw to the global graphics stream.

Implements gobj.

Definition at line 344 of file tessD2draw02.h.

References tessD2draw02simplexindex< TESS, PT, INDX >::col, gobjpush, tessD2draw02simplexindex< TESS, PT, INDX >::isdrawn, and gobjContainer::push().

00345 {
00346   gobjContainer & y = * new gobjContainer(true);
00347 
00348   y.push( new gobjglPushAttrib(GL_CURRENT_BIT) );
00349   y.push( new gobjglPushAttrib(GL_LIGHTING_BIT) );
00350 
00351   y.push( new gobjglDisable(GL_LIGHTING) );
00352 
00353   y.push( new gobjglColor3f(col) );
00354 
00355   vector< point2<double> > pts;
00356   INDX sz=tess.vi.size();
00357   pts.resize(sz);
00358   for (INDX i=1; i<sz; ++i)
00359     processtriangle(pts[i],tess.vi[i],tess.pts);
00360     
00361   pointsdisplay2D< PT > dp(y,pts);
00362 
00363   y.push( new gobjglPopAttrib() );
00364   y.push( new gobjglPopAttrib() );
00365 
00366   gobjSwitch<bool&> * s = 
00367     new gobjSwitch<bool&>(&y,isdrawn);
00368 
00369   gobjpush(s);
00370 }


Member Data Documentation

template<typename TESS, typename PT, typename INDX>
gobjglColor3f tessD2draw02simplexindex< TESS, PT, INDX >::col

Change the text color.

Definition at line 68 of file tessD2draw02.h.

Referenced by tessD2draw02simplexindex< TESS, PT, INDX >::draw().

template<typename TESS, typename PT, typename INDX>
bool& tessD2draw02simplexindex< TESS, PT, INDX >::isdrawn

Toggle the display.

Definition at line 71 of file tessD2draw02.h.

Referenced by tessD2draw02simplexindex< TESS, PT, INDX >::draw().


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

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