proj home

Files   Classes   Functions   Hierarchy  

tessD1draw01lines< 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 tessD1draw01lines< TESS, PT >:
Collaboration diagram for tessD1draw01lines< TESS, PT >:

List of all members.

Public Member Functions

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

Public Attributes

gobjglColor3ub col
 Change the text color.


Detailed Description

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

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

Definition at line 81 of file tessD1disp01.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 90 of file tessD1disp01.h.

00091     : tess(tess_), col(255,165,0) {}


Member Function Documentation

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

Draw to the global graphics stream.

Reimplemented from gobjContainer.

Definition at line 231 of file tessD1disp01.h.

References tessD1draw01lines< TESS, PT >::col, gobjContainer::gobjContainer(), gobjpush, and gobjContainer::push().

00232 {
00233   gobjContainer & y = * new gobjContainer(true);
00234 
00235   y.push( new gobjglPushAttrib(GL_CURRENT_BIT) );
00236   y.push( new gobjglPushAttrib(GL_LIGHTING_BIT) );
00237 
00238   y.push( new gobjglDisable(GL_LIGHTING) );
00239 
00240   y.push( new gobjglColor3ub(col) );
00241 
00242   // Display the solid lines
00243   y.push( new gobjglBegin(GL_LINES) );
00244   for (uint i=1; i<tess.vi.size(); ++i)
00245   {
00246     PT p0(tess.pts[tess.vi[i].pi[0]]);
00247     PT p1(tess.pts[tess.vi[i].pi[1]]);
00248     PT q0((p0+p1)*0.5);
00249 
00250     y.push(new gobjglVertex2f(p0));
00251     y.push(new gobjglVertex2f(q0));
00252   }
00253   y.push( new gobjglEnd() );
00254 
00255   // Display the broken lines
00256   y.push( new gobjglEnable(GL_LINE_STIPPLE) );
00257   y.push( new gobjglLineStipple(1,0x00FF) );
00258 
00259   y.push( new gobjglBegin(GL_LINES) );
00260   for (uint i=1; i<tess.vi.size(); ++i)
00261   {
00262     PT p0(tess.pts[tess.vi[i].pi[0]]);
00263     PT p1(tess.pts[tess.vi[i].pi[1]]);
00264     PT q0((p0+p1)*0.5);
00265 
00266     y.push(new gobjglVertex2f(p1));
00267     y.push(new gobjglVertex2f(q0));
00268   }
00269   y.push( new gobjglEnd() );
00270   y.push( new gobjglDisable(GL_LINE_STIPPLE) );
00271 
00272 
00273   y.push( new gobjglPopAttrib() );
00274   y.push( new gobjglPopAttrib() );
00275 
00276   gobjpush(&y);
00277 }


Member Data Documentation

template<typename TESS , typename PT >
gobjglColor3ub tessD1draw01lines< TESS, PT >::col

Change the text color.

Definition at line 87 of file tessD1disp01.h.

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


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