proj home

Files   Classes   Functions   Hierarchy  

triangledisplaygergonnepoint< TR > Class Template Reference

Display the triangle's Gergonne point. Find the inner circle intersection points with the triangle. Their intersection with their opposite points generates the Gergonne point. More...

#include <triangledisplay.h>

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

List of all members.

Public Member Functions

 triangledisplaygergonnepoint (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 triangledisplaygergonnepoint< TR >

Display the triangle's Gergonne point. Find the inner circle intersection points with the triangle. Their intersection with their opposite points generates the Gergonne point.

Definition at line 335 of file triangledisplay.h.


Constructor & Destructor Documentation

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

The graphics output and triangle initialized.

Definition at line 345 of file triangledisplay.h.

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


Member Function Documentation

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

Write the graphics as gobj objects.

Implements gobj.

Definition at line 700 of file triangledisplay.h.

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

00701 {
00702   gobjQuadric * gd = new gobjQuadric();
00703   gd->radius=.02;
00704   gx.push( gd );
00705 
00706   gx.push( new gobjglColor3ub(127,255,212) );
00707   gobjMyCircle * gc = new gobjMyCircle();
00708   //typename TR::PTtype center;
00709   //typename TR::PTtype circlenormal;
00710   point3<double> center;
00711   point3<double> circlenormal;
00712   double r;
00713   tr.innercircle(r,center,circlenormal);
00714   gx.push( new gobjMySphereDraw(center,gd) );
00715   gx.push( new gobjMyCircleDraw(r,center,circlenormal,*gc) );
00716 
00717   typename TR::PTtype c0;
00718   tr.incenteri(c0,0);
00719   typename TR::PTtype c1;
00720   tr.incenteri(c1,1);
00721   typename TR::PTtype c2;
00722   tr.incenteri(c2,2);
00723 
00724   gx.push( new gobjglColor3ub(127,255,0) );
00725   gx.push( new gobjMySphereDraw(c0,gd) );
00726   gx.push( new gobjMySphereDraw(c1,gd) );
00727   gx.push( new gobjMySphereDraw(c2,gd) );
00728 
00729   typename TR::PTtype gp;
00730   tr.gergonnepoint(gp);
00731   gx.push( new gobjMySphereDraw(gp,gd) );
00732 
00733   gx.push( new gobjglBegin(GL_LINES) );
00734   gx.push( new gobjglVertex3f(tr.pi[0]) );
00735   gx.push( new gobjglVertex3f(c0) );
00736   gx.push( new gobjglVertex3f(tr.pi[1]) );
00737   gx.push( new gobjglVertex3f(c1) );
00738   gx.push( new gobjglVertex3f(tr.pi[2]) );
00739   gx.push( new gobjglVertex3f(c2) );
00740   gx.push( new gobjglEnd() );
00741 }


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