Files Classes Functions Hierarchy
#include <triangledisplay.h>
Public Member Functions | |
| triangledisplaycentroid (gobjContainer &_gx, TR const &_tr) | |
| The graphics output and triangle initialized. | |
| void | draw () |
| Write the graphics as gobj objects. | |
Definition at line 179 of file triangledisplay.h.
| triangledisplaycentroid< TR >::triangledisplaycentroid | ( | gobjContainer & | _gx, | |
| TR const & | _tr | |||
| ) | [inline] |
| void triangledisplaycentroid< TR >::draw | ( | ) | [inline, virtual] |
Write the graphics as gobj objects.
Implements gobj.
Definition at line 544 of file triangledisplay.h.
References gobjContainer::push(), and gobjQuadric::radius.
00545 { 00546 typename TR::PTtype m0; 00547 tr.midpoint(m0,0); 00548 typename TR::PTtype m1; 00549 tr.midpoint(m1,1); 00550 typename TR::PTtype m2; 00551 tr.midpoint(m2,2); 00552 00553 gx.push( new gobjglColor3ub(0,255,0) ); 00554 gx.push( new gobjglBegin(GL_LINES) ); 00555 gx.push( new gobjglVertex3f(tr.pi[0]) ); 00556 gx.push( new gobjglVertex3f(m0) ); 00557 gx.push( new gobjglVertex3f(tr.pi[1]) ); 00558 gx.push( new gobjglVertex3f(m1) ); 00559 gx.push( new gobjglVertex3f(tr.pi[2]) ); 00560 gx.push( new gobjglVertex3f(m2) ); 00561 gx.push( new gobjglEnd() ); 00562 00563 typename TR::PTtype mc; 00564 tr.centroid(mc); 00565 00566 gobjQuadric * gd = new gobjQuadric(); 00567 gd->radius=.02; 00568 gx.push( gd ); 00569 gx.push( new gobjMySphereDraw(mc,gd) ); 00570 }
1.5.8