proj home

Files   Classes   Functions   Hierarchy  

simplexD2tessindexedtest.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <string>
00003 using namespace std;
00004 
00005 #include <simplexD2tessindexed.h>
00006 #include <simplexD2tessindexedtest.h>
00007 #include <point.h>
00008 #include <print.h>
00009 #include <tokenizer.h>
00010 
00011 
00012 
00013 void simplexD2tessindexedtest::test01()
00014 {
00015   double pt1[] = 
00016   { 
00017     0.0, 0.0, 
00018     2.0, 0.0,
00019     0.0, 2.0,
00020     2.0, 2.0,
00021     1.0, 3.0,
00022     0.0, 0.0
00023   };
00024 
00025   uint vi1[] =
00026   {
00027     0,0,0,
00028     3,2,5,
00029     3,4,2,
00030     5,1,3
00031   };
00032 
00033   simplexD2tessindexed<point2<double>,double,uint> tess;
00034 
00035   tess.construct(pt1,6,vi1,4);
00036 
00037   string s = (string)tess;
00038 
00039   cout << "***" << endl;
00040   cout << s;
00041   cout << "***" << endl;
00042 }
00043   
00044 void simplexD2tessindexedtest::test02()
00045 {
00046   cout << "Read file tess002.txt to a string." << endl;
00047 
00048   string s;
00049   bool res = tokenizermisc::readfile(s,"tess002.txt");
00050   cout << SHOW(res) << endl;
00051 
00052   cout << s << endl;
00053 
00054   simplexD2tessindexed<point2<double>,double,uint> tess;
00055 
00056   cout << "Check to see what was read in" << endl;
00057 
00058   tess.serializeInverse(s);
00059 
00060   cout << (string)tess << endl;
00061 }
00062 
00063 void simplexD2tessindexedtest::test03()
00064 {
00065   cout << "Read file tess001.txt to a string." << endl;
00066 
00067   string s;
00068   bool res = tokenizermisc::readfile(s,"tess001.txt");
00069   cout << SHOW(res) << endl;
00070 
00071   cout << s << endl;
00072 
00073   simplexD2tessindexed<point2<double>,double,uint> tess;
00074 
00075   cout << "Check to see what was read in" << endl;
00076 
00077   tess.serializeInverse(s);
00078 
00079   cout << (string)tess << endl;
00080 
00081 
00082   cout << "Change the winding to anticlockwise." << endl;
00083   tess.windinganticlockwise();
00084   cout << (string)tess << endl;
00085 }
00086 

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