proj home

Files   Classes   Functions   Hierarchy  

triangledisplayfermatpoint< TR > Class Template Reference

Display the Fermat point. More...

#include <triangledisplay.h>

Inheritance diagram for triangledisplayfermatpoint< TR >:
Collaboration diagram for triangledisplayfermatpoint< TR >:

List of all members.

Public Member Functions

 triangledisplayfermatpoint (gobjContainer &_gx, TR const &_tr)
 The graphics output and triangle initialized.
void draw ()
 Write the graphics as gobj objects.


Detailed Description

template<typename TR>
class triangledisplayfermatpoint< TR >

Display the Fermat point.

Construct equilateral trianges on the sides with new points E[i]. Line pi[i],E[i] uniquely intersect.

Definition at line 282 of file triangledisplay.h.


Constructor & Destructor Documentation

template<typename TR >
triangledisplayfermatpoint< TR >::triangledisplayfermatpoint ( gobjContainer _gx,
TR const &  _tr 
) [inline]

The graphics output and triangle initialized.

Definition at line 292 of file triangledisplay.h.

00295     : gx(_gx), tr(_tr) {}


Member Function Documentation

template<typename TR >
void triangledisplayfermatpoint< TR >::draw (  )  [inline, virtual]

Write the graphics as gobj objects.

Implements gobj.

Definition at line 426 of file triangledisplay.h.

References gobjContainer::push(), and gobjQuadric::radius.

00427 {
00428   gx.push( new gobjglColor3ub(0,0,139) );
00429 
00430   gobjQuadric * gd = new gobjQuadric();
00431   gd->radius=.02;
00432   gx.push( gd );
00433 
00434   typename TR::PTtype e0;
00435   tr.equilaterali(e0,0);
00436   typename TR::PTtype e1;
00437   tr.equilaterali(e1,1);
00438   typename TR::PTtype e2;
00439   tr.equilaterali(e2,2);
00440 
00441   gx.push( new gobjMySphereDraw(e0,gd) );
00442   gx.push( new gobjMySphereDraw(e1,gd) );
00443   gx.push( new gobjMySphereDraw(e2,gd) );
00444 
00445   gx.push( new gobjglBegin(GL_LINES) );
00446 
00447   gx.push( new gobjglVertex3f(tr.pi[1]) );
00448   gx.push( new gobjglVertex3f(e0) );
00449   gx.push( new gobjglVertex3f(tr.pi[2]) );
00450   gx.push( new gobjglVertex3f(e0) );
00451 
00452   gx.push( new gobjglVertex3f(tr.pi[0]) );
00453   gx.push( new gobjglVertex3f(e1) );
00454   gx.push( new gobjglVertex3f(tr.pi[2]) );
00455   gx.push( new gobjglVertex3f(e1) );
00456 
00457   gx.push( new gobjglVertex3f(tr.pi[0]) );
00458   gx.push( new gobjglVertex3f(e2) );
00459   gx.push( new gobjglVertex3f(tr.pi[1]) );
00460   gx.push( new gobjglVertex3f(e2) );
00461 
00462   gx.push( new gobjglEnd() );
00463 
00464   gx.push( new gobjglColor3ub(148,0,211) );
00465   typename TR::PTtype fp;
00466   tr.fermatpoint(fp);
00467   gx.push( new gobjMySphereDraw(fp,gd) );
00468 
00469 
00470 
00471   gx.push( new gobjglBegin(GL_LINES) );
00472 
00473   gx.push( new gobjglVertex3f(tr.pi[0]) );
00474   gx.push( new gobjglVertex3f(e0) );
00475   gx.push( new gobjglVertex3f(tr.pi[1]) );
00476   gx.push( new gobjglVertex3f(e1) );
00477   gx.push( new gobjglVertex3f(tr.pi[2]) );
00478   gx.push( new gobjglVertex3f(e2) );
00479 
00480   gx.push( new gobjglEnd() );
00481 }


The documentation for this class was generated from the following file:

Generated on Fri Mar 4 00:50:21 2011 for Chelton Evans Source by  doxygen 1.5.8