proj home

Files   Classes   Functions   Hierarchy  

virtualtetrahedron.h

Go to the documentation of this file.
00001 #ifndef VIRTUALTETRAHEDRON_H
00002 #define VIRTUALTETRAHEDRON_H
00003 
00004 #include <iostream>
00005 using namespace std;
00006 
00007 typedef unsigned int uint;
00008 typedef unsigned int const uintc;
00009 
00010 class virtualtetrahedron
00011 {
00012 public:
00013 
00014   // Indexes to points.  The order is important.
00015   // The first 3 points are seen as clockwise
00016   // from the perspective of the 4th point.
00017   uint v[4];
00018 
00019   virtualtetrahedron();
00020 
00021   // Each of the tetrahedrons verticies refers to a point. 
00022   void set(uintc a, uintc b, uintc c, uintc d)
00023     { v[0]=a; v[1]=b; v[2]=c; v[3]=d; }
00024 
00025   // v[0..2] anticlockwise, v[3]=base
00026   void set(uintc base);
00027 
00028   // Rotate the base triangle.
00029   void clockwise();
00030   
00031   // Rotate the base triangle.
00032   void anticlockwise();
00033 
00034   // Move the base triangle on tetrahedron surface.
00035   void left();
00036 
00037   // Move the base triangle on tetrahedron surface.
00038   void right();
00039 
00040   // Move the base triangle on tetrahedron surface. 
00041   void down();
00042 
00043   // v[] has 0,1,2,3 in any order.
00044   bool const validstate() const;
00045 
00046 };
00047 
00048 ostream & operator << (ostream& os, virtualtetrahedron const & x);
00049 
00050 #endif
00051 

Generated on Fri Mar 4 00:49:31 2011 for Chelton Evans Source by  doxygen 1.5.8