Files Classes Functions Hierarchy
#include <simplexD1tessindexed.h>
Public Member Functions | |
| simplexD1tessindexed () | |
| pts and vi have their first element as nulls. | |
| void | construct (PD const *points, INDX const pointsize, INDX const *lines, INDX const linessize) |
| From arrays build the vectors. | |
| operator stringc () const | |
| Serialize this object. | |
| void | serializeInverse (stringc &s) |
| Read in/construct an object. | |
| boolc | operator== (simplexD1tessindexed< PT, PD, INDX > const &s2) const |
| simplexD2tessindexed () | |
| pts and vi have their first element as nulls. | |
| void | construct (PTS points, INDX const pointsize, INDX const *lines, INDX const linessize) |
| From arrays build the vectors. | |
| operator stringc () const | |
| Serialize this object. | |
| void | serializeInverse (stringc &s) |
| Read in/construct an object. | |
Public Attributes | |
| vector< PT > | pts |
| List of points. | |
| vector< simplexD1indexed< INDX > > | vi |
| List of triangles. | |
| PTS | pts |
| List of points. | |
| VI | vi |
| List of triangles. | |
number of points+1 0.0 0.0 x y ... number of lines+1 0 0 a b ...
Definition at line 31 of file simplexD1tessindexed.h.
| simplexD1tessindexed< PT, PD, INDX >::simplexD1tessindexed | ( | ) | [inline] |
pts and vi have their first element as nulls.
Definition at line 97 of file simplexD1tessindexed.h.
References simplexD1tessindexed< PT, PD, INDX >::pts, and simplexD1tessindexed< PT, PD, INDX >::vi.
00098 { 00099 pts.push_back(PT()); 00100 vi.push_back( simplexD1indexed<INDX>() ); 00101 }
| void simplexD1tessindexed< PT, PD, INDX >::construct | ( | PTS | points, | |
| INDX const | pointsize, | |||
| INDX const * | lines, | |||
| INDX const | linessize | |||
| ) |
From arrays build the vectors.
| void simplexD1tessindexed< PT, PD, INDX >::construct | ( | PD const * | points, | |
| INDX const | pointsize, | |||
| INDX const * | lines, | |||
| INDX const | linessize | |||
| ) | [inline] |
From arrays build the vectors.
Definition at line 169 of file simplexD1tessindexed.h.
References pts, and vectorreadingD2().
Referenced by simplexD1tessindexedtest::test01().
00175 { 00176 vectorreadingD2(pts,points,pointsize); 00177 vectorreadingD2(vi,lines,linessize); 00178 }
| simplexD1tessindexed< PT, PD, INDX >::operator stringc | ( | ) | const |
Serialize this object.
| simplexD1tessindexed< PT, PD, INDX >::operator stringc | ( | ) | const [inline] |
Serialize this object.
Definition at line 150 of file simplexD1tessindexed.h.
References simplexD1tessindexed< PT, PD, INDX >::pts, and simplexD1tessindexed< PT, PD, INDX >::vi.
00151 { 00152 stringstream ss; 00153 00154 uint imax = pts.size(); 00155 ss << imax << "\n"; 00156 for (uint i=0; i<imax; ++i) 00157 ss << pts[i] << "\n"; 00158 imax = vi.size(); 00159 ss << imax << "\n"; 00160 for (uint i=0; i<imax; ++i) 00161 ss << vi[i] << "\n"; 00162 00163 return ss.str(); 00164 }
| boolc simplexD1tessindexed< PT, PD, INDX >::operator== | ( | simplexD1tessindexed< PT, PD, INDX > const & | s2 | ) | const [inline] |
Definition at line 58 of file simplexD1tessindexed.h.
References simplexD1tessindexed< PT, PD, INDX >::pts, and simplexD1tessindexed< PT, PD, INDX >::vi.
00059 { 00060 //cout << "Tesing sizes" << endl; 00061 //cout << SHOW(pts.size()) << endl; 00062 //cout << SHOW(s2.pts.size()) << endl; 00063 if (pts.size()!=s2.pts.size()) 00064 return false; 00065 00066 if (vi.size()!=s2.vi.size()) 00067 return false; 00068 00069 //cout << "Checking points" << endl; 00070 for (uint i=0; i<pts.size(); ++i) 00071 { 00072 if (pts[i]!=s2.pts[i]) 00073 return false; 00074 } 00075 //cout << "Checking indexes" << endl; 00076 for (uint i=0; i<vi.size(); ++i) 00077 { 00078 if (!(vi[i]==s2.vi[i])) 00079 return false; 00080 } 00081 00082 return true; 00083 }
| void simplexD1tessindexed< PT, PD, INDX >::serializeInverse | ( | stringc & | s | ) |
Read in/construct an object.
| void simplexD1tessindexed< PT, PD, INDX >::serializeInverse | ( | stringc & | s | ) | [inline] |
Read in/construct an object.
Definition at line 105 of file simplexD1tessindexed.h.
References simplexD1tessindexed< PT, PD, INDX >::pts, tokenizer::readaslinesgeneral(), tokenizer::reset(), and simplexD1tessindexed< PT, PD, INDX >::vi.
Referenced by simplexD1tessapp01::simplexD1tessapp01(), simplexD1tessindexedtest::test02(), and simplexD1tessindexedtest::unittest01().
00106 { 00107 pts.clear(); 00108 vi.clear(); 00109 00110 tokenizer tokenstream; 00111 tokenstream.readaslinesgeneral(s); 00112 00113 tokenstream.reset(); 00114 uint ptssize; 00115 stringstream(tokenstream()) >> ptssize; 00116 ++tokenstream; 00117 //cout << "ptssize=" << ptssize << endl; 00118 00119 PD x,y; 00120 for (uint i=0; i<ptssize; ++i) 00121 { 00122 stringstream(tokenstream()) >> x; 00123 ++tokenstream; 00124 stringstream(tokenstream()) >> y; 00125 ++tokenstream; 00126 //cout << "x=" << x << " y=" << y << endl; 00127 pts.push_back( PT(x,y) ); 00128 } 00129 00130 uint visize; 00131 stringstream(tokenstream()) >> visize; 00132 ++tokenstream; 00133 //cout << "visize=" << visize << endl; 00134 INDX a,b; 00135 for (uint i=0; i<visize; ++i) 00136 { 00137 stringstream(tokenstream()) >> a; 00138 ++tokenstream; 00139 stringstream(tokenstream()) >> b; 00140 ++tokenstream; 00141 //cout << "a=" << a << " b=" << b << " c=" << c << endl; 00142 00143 vi.push_back( simplexD1indexed<INDX>(a,b) ); 00144 } 00145 00146 }
| simplexD1tessindexed< PT, PD, INDX >::simplexD2tessindexed | ( | ) |
pts and vi have their first element as nulls.
| PTS simplexD1tessindexed< PT, PD, INDX >::pts |
| vector< PT > simplexD1tessindexed< PT, PD, INDX >::pts |
List of points.
Definition at line 36 of file simplexD1tessindexed.h.
Referenced by simplexD1tessapp01::keyboard(), simplexD1tessindexed< PT, PD, INDX >::operator stringc(), simplexD1tessindexed< PT, PD, INDX >::operator==(), simplexD1tessindexed< PT, PD, INDX >::serializeInverse(), and simplexD1tessindexed< PT, PD, INDX >::simplexD1tessindexed().
| VI simplexD1tessindexed< PT, PD, INDX >::vi |
| vector< simplexD1indexed<INDX> > simplexD1tessindexed< PT, PD, INDX >::vi |
List of triangles.
Definition at line 38 of file simplexD1tessindexed.h.
Referenced by simplexD1tessapp01::keyboard(), simplexD1tessindexed< PT, PD, INDX >::operator stringc(), simplexD1tessindexed< PT, PD, INDX >::operator==(), simplexD1tessindexed< PT, PD, INDX >::serializeInverse(), and simplexD1tessindexed< PT, PD, INDX >::simplexD1tessindexed().
1.5.8