Files Classes Functions Hierarchy
#include <triangledisplay.h>
Public Member Functions | |
| triangledisplayincenter (gobjContainer &_gx, TR const &_tr) | |
| The graphics output and triangle initialized. | |
| void | draw () |
| Write the graphics as gobj objects. | |
Constructs a circle inside the triangle touching the triangles sides at the angles bisectors.
Definition at line 256 of file triangledisplay.h.
| triangledisplayincenter< TR >::triangledisplayincenter | ( | gobjContainer & | _gx, | |
| TR const & | _tr | |||
| ) | [inline] |
| void triangledisplayincenter< TR >::draw | ( | ) | [inline, virtual] |
Write the graphics as gobj objects.
Implements gobj.
Definition at line 658 of file triangledisplay.h.
References gobjContainer::push(), r, and gobjQuadric::radius.
00659 { 00660 typename TR::PTtype b0; 00661 tr.bisectangle(b0,0); 00662 typename TR::PTtype b1; 00663 tr.bisectangle(b1,1); 00664 typename TR::PTtype b2; 00665 tr.bisectangle(b2,2); 00666 00667 gobjQuadric * gd = new gobjQuadric(); 00668 gd->radius=.02; 00669 gx.push( gd ); 00670 00671 gx.push( new gobjglColor3ub(127,255,212) ); 00672 gx.push( new gobjMySphereDraw(b0,gd) ); 00673 gx.push( new gobjMySphereDraw(b1,gd) ); 00674 gx.push( new gobjMySphereDraw(b2,gd) ); 00675 00676 gobjMyCircle * gc = new gobjMyCircle(); 00677 00678 //typename TR::PTtype center; 00679 //typename TR::PTtype circlenormal; 00680 point3<double> center; 00681 point3<double> circlenormal; 00682 double r; 00683 tr.innercircle(r,center,circlenormal); 00684 gx.push( new gobjMySphereDraw(center,gd) ); 00685 gx.push( new gobjMyCircleDraw(r,center,circlenormal,*gc) ); 00686 //gx.push_back( new gobjMyCircleDraw(r,x,*gc) ); 00687 00688 gx.push( new gobjglBegin(GL_LINES) ); 00689 gx.push( new gobjglVertex3f(tr.pi[0]) ); 00690 gx.push( new gobjglVertex3f(b0) ); 00691 gx.push( new gobjglVertex3f(tr.pi[1]) ); 00692 gx.push( new gobjglVertex3f(b1) ); 00693 gx.push( new gobjglVertex3f(tr.pi[2]) ); 00694 gx.push( new gobjglVertex3f(b2) ); 00695 gx.push( new gobjglEnd() ); 00696 }
1.5.8