proj home

Files   Classes   Functions   Hierarchy  

triangledisplaymidpoints< TR > Class Template Reference

Display the triangle's midpoints. More...

#include <triangledisplay.h>

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

List of all members.

Public Member Functions

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

Display the triangle's midpoints.

Definition at line 132 of file triangledisplay.h.


Constructor & Destructor Documentation

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

The graphics output and triangle initialized.

Definition at line 142 of file triangledisplay.h.

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


Member Function Documentation

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

Write the graphics as gobj objects.

Implements gobj.

Definition at line 502 of file triangledisplay.h.

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

00503 {
00504   gobjQuadric * gd = new gobjQuadric();
00505   gd->radius=.02;
00506   gx.push( gd );
00507 
00508   typename TR::PTtype m0;
00509   tr.midpoint(m0,0);
00510   typename TR::PTtype m1;
00511   tr.midpoint(m1,1);
00512   typename TR::PTtype m2;
00513   tr.midpoint(m2,2);
00514 
00515   gx.push( new gobjglColor3ub(255,0,255) );
00516   gx.push( new gobjMySphereDraw(m0,gd) );
00517   gx.push( new gobjMySphereDraw(m1,gd) );
00518   gx.push( new gobjMySphereDraw(m2,gd) );
00519 }


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