Files Classes Functions Hierarchy
#include <tessD1disp01.h>
Public Member Functions | |
| tessD1draw01linesmulticolor (TESS &tess_) | |
| Constructor. | |
| void | draw () |
| Draw to the global graphics stream. | |
Definition at line 106 of file tessD1disp01.h.
| tessD1draw01linesmulticolor< TESS, PT >::tessD1draw01linesmulticolor | ( | TESS & | tess_ | ) | [inline] |
| 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 }
1.5.8