Files Classes Functions Hierarchy
#include <tetrahedrondisplay.h>
Public Member Functions | |
| tetrahedrondisplaycentroid (gobjContainer &_gx, TET const &_tr) | |
| The graphics output and tetrahedron. | |
| void | draw () |
| Write the graphics as gobj objects. | |
Definition at line 85 of file tetrahedrondisplay.h.
| tetrahedrondisplaycentroid< TET >::tetrahedrondisplaycentroid | ( | gobjContainer & | _gx, | |
| TET const & | _tr | |||
| ) | [inline] |
| void tetrahedrondisplaycentroid< TET >::draw | ( | ) | [inline, virtual] |
Write the graphics as gobj objects.
Implements gobj.
Definition at line 296 of file tetrahedrondisplay.h.
References gobjContainer::push(), and gobjQuadric::radius.
00297 { 00298 gx.push( new gobjglColor3ub(0,255,0) ); 00299 00300 gobjQuadric * gd = new gobjQuadric(); 00301 gd->radius=.02; 00302 gx.push( gd ); 00303 00304 typename TET::PTtype c; 00305 tr.centroid(c); 00306 00307 typename TET::PTtype c0 = (tr.pi[1]+tr.pi[2]+tr.pi[3])/3.0; 00308 typename TET::PTtype c1 = (tr.pi[0]+tr.pi[2]+tr.pi[3])/3.0; 00309 typename TET::PTtype c2 = (tr.pi[1]+tr.pi[0]+tr.pi[3])/3.0; 00310 typename TET::PTtype c3 = (tr.pi[1]+tr.pi[0]+tr.pi[2])/3.0; 00311 00312 gx.push( new gobjMySphereDraw(c,gd) ); 00313 00314 gx.push( new gobjglBegin(GL_LINES) ); 00315 gx.push( new gobjglVertex3f(tr.pi[0]) ); 00316 gx.push( new gobjglVertex3f(c0) ); 00317 gx.push( new gobjglVertex3f(tr.pi[1]) ); 00318 gx.push( new gobjglVertex3f(c1) ); 00319 gx.push( new gobjglVertex3f(tr.pi[2]) ); 00320 gx.push( new gobjglVertex3f(c2) ); 00321 gx.push( new gobjglVertex3f(tr.pi[3]) ); 00322 gx.push( new gobjglVertex3f(c3) ); 00323 gx.push( new gobjglEnd() ); 00324 00325 }
1.5.8