proj home

Files   Classes   Functions   Hierarchy  

triangledisplayorthocenter< TR > Class Template Reference

Display the triangle's orthocenter where altitudes intersect with the opposite vertex and each other. More...

#include <triangledisplay.h>

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

List of all members.

Public Member Functions

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

Display the triangle's orthocenter where altitudes intersect with the opposite vertex and each other.

Definition at line 204 of file triangledisplay.h.


Constructor & Destructor Documentation

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

The graphics output and triangle initialized.

Definition at line 214 of file triangledisplay.h.

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


Member Function Documentation

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

Write the graphics as gobj objects.

Implements gobj.

Definition at line 573 of file triangledisplay.h.

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

00574 {
00575   typename TR::PTtype vc;
00576   tr.orthocenter(vc);
00577 
00578   gx.push( new gobjglColor3ub(184,134,11) );
00579   typename TR::PTtype v0;
00580   tr.orthocenteri(v0,0);
00581   typename TR::PTtype v1;
00582   tr.orthocenteri(v1,1);
00583   typename TR::PTtype v2;
00584   tr.orthocenteri(v2,2);
00585 
00586   gobjQuadric * gd = new gobjQuadric();
00587   gd->radius=.02;
00588   gx.push( gd );
00589 
00590   gx.push( new gobjMySphereDraw(v0,gd) );
00591   gx.push( new gobjMySphereDraw(v1,gd) );
00592   gx.push( new gobjMySphereDraw(v2,gd) );
00593 
00594   gx.push( new gobjglColor3ub(255,215,0) );
00595   gx.push( new gobjglBegin(GL_LINES) );
00596   gx.push( new gobjglVertex3f(tr.pi[0]) );
00597   gx.push( new gobjglVertex3f(v0) );
00598   gx.push( new gobjglVertex3f(tr.pi[1]) );
00599   gx.push( new gobjglVertex3f(v1) );
00600   gx.push( new gobjglVertex3f(tr.pi[2]) );
00601   gx.push( new gobjglVertex3f(v2) );
00602   gx.push( new gobjglEnd() );
00603 
00604   //gx.push_back( new gobjglColor3ub(124,184,14) );
00605   gx.push( new gobjMySphereDraw(vc,gd) );
00606 }


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