proj home

Files   Classes   Functions   Hierarchy  

tetrahedrondisplay< TET > Class Template Reference

Display the tetrahedron. More...

#include <tetrahedrondisplay.h>

Inheritance diagram for tetrahedrondisplay< TET >:
Collaboration diagram for tetrahedrondisplay< TET >:

List of all members.

Public Member Functions

 tetrahedrondisplay (gobjContainer &_gx, TET const &_tr)
 The graphics output and tetrahedron.
void turnon ()
 Turn all options on.
void draw ()
 Write the graphics as unprocessed commands to gx.

Public Attributes

gobjContainergx
 Unprocessed graphics.
TET const & tr
 The tetrahedron.
bool mesh
 Display the tetrahedron edges.
bool centroid
 Display the tetrahedron's centroid.
bool test
bool trianglecenterpoints
 Display the centers for each triangle face.
bool trianglecenters


Detailed Description

template<typename TET>
class tetrahedrondisplay< TET >

Display the tetrahedron.

The client can provide additional graphics by directly writing to gx when draw() is called.

Definition at line 20 of file tetrahedrondisplay.h.


Constructor & Destructor Documentation

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

The graphics output and tetrahedron.

Definition at line 43 of file tetrahedrondisplay.h.

00046     : gx(_gx), tr(_tr), mesh(1), centroid(1), test(1),
00047       trianglecenterpoints(0), trianglecenters(0) {}


Member Function Documentation

template<typename TET >
void tetrahedrondisplay< TET >::draw (  )  [inline, virtual]

Write the graphics as unprocessed commands to gx.

Implements gobj.

Definition at line 361 of file tetrahedrondisplay.h.

References tetrahedrondisplay< TET >::centroid, tetrahedrontriangledisplay< TET, TD >::draw(), tetrahedrondisplay< TET >::gx, tetrahedrondisplay< TET >::mesh, tetrahedrondisplay< TET >::test, tetrahedrontriangledisplaytdimacro, tetrahedrondisplay< TET >::tr, tetrahedrondisplay< TET >::trianglecenterpoints, tetrahedrondisplay< TET >::trianglecenters, and tetrahedrondisplay< TET >::turnon().

Referenced by tetrahedrontest::test01(), and tetrahedrontest::test02().

00362 {
00363   vector< gobj* > vi;
00364 
00365   if (mesh)
00366     vi.push_back(new tetrahedrondisplaymesh<TET>(gx,tr));
00367   if (centroid)
00368     vi.push_back(new tetrahedrondisplaycentroid<TET>(gx,tr));
00369   if (test)
00370     vi.push_back(new tetrahedrondisplaytest<TET>(gx,tr));
00371   if (trianglecenterpoints)
00372   {
00373 
00374     typedef triangledisplaypoints
00375       < triangle3D< typename TET::PTtype, typename TET::PDtype > > 
00376       tridisptype;
00377 //    typedef tetrahedron<typename TET::PTtype, typename TET::PDtype> 
00378 //      tettype;
00379 
00380     tetrahedrontriangledisplay< TET, tridisptype > tetd(gx,tr);
00381     tetrahedrontriangledisplaytdimacro(tetd, turnon() ); 
00382     tetd.draw();
00383   }
00384   if (trianglecenters)
00385   {
00386     typedef triangledisplay
00387       < triangle3D< typename TET::PTtype, typename TET::PDtype > > 
00388       tridisptype;
00389 
00390     tetrahedrontriangledisplay< TET, tridisptype > tetd(gx,tr);
00391     tetrahedrontriangledisplaytdimacro(tetd, turnon() ); 
00392     tetd.draw();
00393   } 
00394 
00395   for (uint i=0; i<vi.size(); ++i)
00396   {
00397     vi[i]->draw();
00398     delete vi[i];
00399   }
00400 }

template<typename TET >
void tetrahedrondisplay< TET >::turnon (  )  [inline]


Member Data Documentation

template<typename TET>
bool tetrahedrondisplay< TET >::centroid

template<typename TET>
gobjContainer& tetrahedrondisplay< TET >::gx

Unprocessed graphics.

Definition at line 25 of file tetrahedrondisplay.h.

Referenced by tetrahedrondisplay< TET >::draw().

template<typename TET>
bool tetrahedrondisplay< TET >::mesh

template<typename TET>
bool tetrahedrondisplay< TET >::test

template<typename TET>
TET const& tetrahedrondisplay< TET >::tr

The tetrahedron.

Definition at line 27 of file tetrahedrondisplay.h.

Referenced by tetrahedrondisplay< TET >::draw().

template<typename TET>
bool tetrahedrondisplay< TET >::trianglecenterpoints

template<typename TET>
bool tetrahedrondisplay< TET >::trianglecenters


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

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