proj home

Files   Classes   Functions   Hierarchy  

tessD1draw01linesmulticolor< TESS, PT > Class Template Reference

Display the lines with direction. The solid line is the start, the broken the end. More...

#include <tessD1disp01.h>

Inheritance diagram for tessD1draw01linesmulticolor< TESS, PT >:
Collaboration diagram for tessD1draw01linesmulticolor< TESS, PT >:

List of all members.

Public Member Functions

 tessD1draw01linesmulticolor (TESS &tess_)
 Constructor.
void draw ()
 Draw to the global graphics stream.


Detailed Description

template<typename TESS, typename PT>
class tessD1draw01linesmulticolor< TESS, PT >

Display the lines with direction. The solid line is the start, the broken the end.

Definition at line 106 of file tessD1disp01.h.


Constructor & Destructor Documentation

template<typename TESS , typename PT >
tessD1draw01linesmulticolor< TESS, PT >::tessD1draw01linesmulticolor ( TESS &  tess_  )  [inline]

Constructor.

Definition at line 112 of file tessD1disp01.h.

00113     : tess(tess_) {}


Member Function Documentation

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

Draw to the global graphics stream.

Reimplemented from gobjContainer.

Definition at line 182 of file tessD1disp01.h.

References gobjContainer::gobjContainer(), gobjpush, gobjContainer::push(), and r.

00183 {
00184   gobjContainer & y = * new gobjContainer(true);
00185 
00186   y.push( new gobjglPushAttrib(GL_CURRENT_BIT) );
00187   y.push( new gobjglPushAttrib(GL_LIGHTING_BIT) );
00188 
00189   y.push( new gobjglDisable(GL_LIGHTING) );
00190 
00191   random11<double> r;
00192 
00193   // Display the solid lines
00194   for (uint i=1; i<tess.vi.size(); ++i)
00195   {
00196     PT p0(tess.pts[tess.vi[i].pi[0]]);
00197     PT p1(tess.pts[tess.vi[i].pi[1]]);
00198     PT q0((p0+p1)*0.5);
00199 
00200     y.push( new gobjglColor3f(r(),r(),r()) );
00201 
00202     y.push( new gobjglBegin(GL_LINES) );
00203     y.push(new gobjglVertex2f(p0));
00204     y.push(new gobjglVertex2f(q0));
00205     y.push( new gobjglEnd() );
00206 
00207     y.push( new gobjglEnable(GL_LINE_STIPPLE) );
00208     y.push( new gobjglLineStipple(1,0x00FF) );
00209     y.push( new gobjglBegin(GL_LINES) );
00210     y.push(new gobjglVertex2f(p1));
00211     y.push(new gobjglVertex2f(q0));
00212     y.push( new gobjglEnd() );
00213     y.push( new gobjglDisable(GL_LINE_STIPPLE) );
00214   }
00215 
00216   y.push( new gobjglPopAttrib() );
00217   y.push( new gobjglPopAttrib() );
00218 
00219   gobjpush(&y);
00220 }


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

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