Files Classes Functions Hierarchy
#include <triangledisplay.h>
Public Member Functions | |
| triangledisplaycircumcenter (gobjContainer &_gx, TR const &_tr) | |
| The graphics output and triangle initialized. | |
| void | draw () |
| Write the graphics as gobj objects. | |
The perpendicular bisectors meet and a circle passes through the vertexes.
Definition at line 230 of file triangledisplay.h.
| triangledisplaycircumcenter< TR >::triangledisplaycircumcenter | ( | gobjContainer & | _gx, | |
| TR const & | _tr | |||
| ) | [inline] |
| void triangledisplaycircumcenter< TR >::draw | ( | ) | [inline, virtual] |
Write the graphics as gobj objects.
Implements gobj.
Definition at line 609 of file triangledisplay.h.
References gobjContainer::push(), r, and gobjQuadric::radius.
00610 { 00611 typename TR::PTtype cc; 00612 tr.circumcenter(cc); 00613 00614 gobjQuadric * gd = new gobjQuadric(); 00615 gd->radius=.02; 00616 gx.push( gd ); 00617 00618 gobjMyCircle * gc = new gobjMyCircle(); 00619 gx.push( new gobjglColor3ub(255,0,0) ); 00620 gx.push( new gobjMySphereDraw(cc,gd) ); 00621 00622 00623 typename TR::PTtype m0; 00624 tr.midpoint(m0,0); 00625 typename TR::PTtype m1; 00626 tr.midpoint(m1,1); 00627 typename TR::PTtype m2; 00628 tr.midpoint(m2,2); 00629 00630 gx.push( new gobjglBegin(GL_LINES) ); 00631 gx.push( new gobjglVertex3f(cc) ); 00632 gx.push( new gobjglVertex3f(m0) ); 00633 gx.push( new gobjglVertex3f(cc) ); 00634 gx.push( new gobjglVertex3f(m1) ); 00635 gx.push( new gobjglVertex3f(cc) ); 00636 gx.push( new gobjglVertex3f(m2) ); 00637 gx.push( new gobjglEnd() ); 00638 00639 gx.push( gc ); 00640 00641 point3<double> center; 00642 point3<double> circlenormal; 00643 double r; 00644 tr.outercircle(r,center,circlenormal); 00645 gx.push( new gobjMySphereDraw(center,gd) ); 00646 gx.push( new gobjMyCircleDraw(r,center,circlenormal,*gc) ); 00647 00648 /* 00649 point3<double> cc2(cc); 00650 point3<double> radius(cc2); 00651 radius.x -= tr.pi[0].x; 00652 radius.y -= tr.pi[0].y; 00653 gx.push_back( new gobjMyCircleDraw(sqrt(radius.dot()),cc2,*gc) ); 00654 */ 00655 }
1.5.8