00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097 #ifndef __VCG_FACE_PLUS_COMPONENT
00098 #define __VCG_FACE_PLUS_COMPONENT
00099
00100 #include <vector>
00101 #include <vcg/space/triangle3.h>
00102 #include <vcg/space/texcoord2.h>
00103 #include <vcg/space/color4.h>
00104
00105 namespace vcg {
00106
00107 namespace face {
00108
00109
00110
00111
00112
00113
00114
00115 template <class T> class EmptyVertexRef: public T {
00116 public:
00117
00118
00119 inline typename T::VertexType * & V( const int ) { assert(0); static typename T::VertexType *vp=0; return vp; }
00120 inline typename T::VertexType * const & V( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
00121 inline typename T::VertexType * cV( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
00122
00123 inline typename T::VertexType * & FVp( const int i ) { return this->V(i); }
00124 inline typename T::VertexType * const & FVp( const int i) const { return this->V(i); }
00125 inline typename T::VertexType * cFVp( const int i ) const { return this->cV(i); }
00126
00127 inline typename T::CoordType & P( const int ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
00128 inline const typename T::CoordType & P( const int ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
00129 inline const typename T::CoordType &cP( const int ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
00130 template <class RightF>
00131 void ImportData(const RightF & rightF) {T::ImportData(rightF);}
00132 inline void Alloc(const int & ns){T::Alloc(ns);}
00133 inline void Dealloc(){T::Dealloc();}
00134 static bool HasVertexRef() { return false; }
00135 static bool HasFVAdjacency() { return false; }
00136 static void Name(std::vector<std::string> & name){T::Name(name);}
00137
00138 };
00139 template <class T> class VertexRef: public T {
00140 public:
00141 VertexRef(){
00142 v[0]=0;
00143 v[1]=0;
00144 v[2]=0;
00145 }
00146
00147 typedef typename T::VertexType::CoordType CoordType;
00148 typedef typename T::VertexType::ScalarType ScalarType;
00149
00150 inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<3); return v[j]; }
00151 inline typename T::VertexType * const & V( const int j ) const { assert(j>=0 && j<3); return v[j]; }
00152 inline typename T::VertexType * cV( const int j ) const { assert(j>=0 && j<3); return v[j]; }
00153
00154
00155 inline CoordType & P( const int j ) { assert(j>=0 && j<3); return v[j]->P(); }
00156 inline const CoordType & P( const int j ) const { assert(j>=0 && j<3); return v[j]->cP(); }
00157 inline const CoordType &cP( const int j ) const { assert(j>=0 && j<3); return v[j]->cP(); }
00158
00162 inline typename T::VertexType * & V0( const int j ) { return V(j);}
00163 inline typename T::VertexType * & V1( const int j ) { return V((j+1)%3);}
00164 inline typename T::VertexType * & V2( const int j ) { return V((j+2)%3);}
00165 inline typename T::VertexType * const V0( const int j ) const { return V(j);}
00166 inline typename T::VertexType * const V1( const int j ) const { return V((j+1)%3);}
00167 inline typename T::VertexType * const V2( const int j ) const { return V((j+2)%3);}
00168 inline typename T::VertexType * cV0( const int j ) const { return cV(j);}
00169 inline typename T::VertexType * cV1( const int j ) const { return cV((j+1)%3);}
00170 inline typename T::VertexType * cV2( const int j ) const { return cV((j+2)%3);}
00171
00173 inline CoordType & P0( const int j ) { return V(j)->P();}
00174 inline CoordType & P1( const int j ) { return V((j+1)%3)->P();}
00175 inline CoordType & P2( const int j ) { return V((j+2)%3)->P();}
00176 inline const CoordType & P0( const int j ) const { return V(j)->P();}
00177 inline const CoordType & P1( const int j ) const { return V((j+1)%3)->P();}
00178 inline const CoordType & P2( const int j ) const { return V((j+2)%3)->P();}
00179 inline const CoordType & cP0( const int j ) const { return cV(j)->P();}
00180 inline const CoordType & cP1( const int j ) const { return cV((j+1)%3)->P();}
00181 inline const CoordType & cP2( const int j ) const { return cV((j+2)%3)->P();}
00182
00183 inline typename T::VertexType * & UberV( const int j ) { assert(j>=0 && j<3); return v[j]; }
00184 inline const typename T::VertexType * const & UberV( const int j ) const { assert(j>=0 && j<3); return v[j]; }
00185
00186
00187
00188
00189 template <class RightF>
00190 void ImportData(const RightF & rightF){ T::ImportData(rightF);}
00191 inline void Alloc(const int & ns){T::Alloc(ns);}
00192 inline void Dealloc(){T::Dealloc();}
00193
00194 static bool HasVertexRef() { return true; }
00195 static bool HasFVAdjacency() { return true; }
00196
00197 static void Name(std::vector<std::string> & name){name.push_back(std::string("VertexRef"));T::Name(name);}
00198
00199
00200 private:
00201 typename T::VertexType *v[3];
00202 };
00203
00204
00205
00206
00207
00208 template <class T> class EmptyNormal: public T {
00209 public:
00210
00211 typedef typename T::VertexType::NormalType NormalType;
00212 NormalType &N() { static NormalType dummy_normal(0, 0, 0); assert(0); return dummy_normal; }
00213 const NormalType &cN() const { static NormalType dummy_normal(0, 0, 0); return dummy_normal; }
00214 NormalType &WN(int) { static NormalType dummy_normal(0, 0, 0); assert(0); return dummy_normal; }
00215 const NormalType cWN(int) const { static NormalType dummy_normal(0, 0, 0); return dummy_normal; }
00216
00217 template <class RightF>
00218 void ImportData(const RightF & rightF){ T::ImportData(rightF);}
00219 static bool HasWedgeNormal() { return false; }
00220 static bool HasFaceNormal() { return false; }
00221 static bool HasWedgeNormalOcc() { return false; }
00222 static bool HasFaceNormalOcc() { return false; }
00223 static bool HasWedgeNormalOcf() { return false; }
00224 static bool HasFaceNormalOcf() { return false; }
00225
00226
00227 static void Name(std::vector<std::string> & name){ T::Name(name);}
00228
00229 };
00230 template <class T> class NormalFromVert: public T {
00231 public:
00232 typedef typename T::VertexType::NormalType NormalType;
00233 NormalType &N() { return _norm; }
00234 NormalType &cN() const { return _norm; }
00235 template <class RightF>
00236 void ImportData(const RightF & rightF){ N() = rightF.cN(); T::ImportData(rightF);}
00237 inline void Alloc(const int & ns){T::Alloc(ns);}
00238 inline void Dealloc(){T::Dealloc();}
00239 static bool HasFaceNormal() { return true; }
00240
00241
00242 static void Name(std::vector<std::string> & name){name.push_back(std::string("NormalFromVert"));T::Name(name);}
00243
00244 private:
00245 NormalType _norm;
00246 };
00247
00248
00249 template <class T>
00250 void ComputeNormal(T &f) { f.N() = vcg::Normal<T>(f); }
00251
00252 template <class T>
00253 void ComputeNormalizedNormal(T &f) { f.N() = vcg::NormalizedNormal<T>(f); }
00254
00255 template <class A, class T> class NormalAbs: public T {
00256 public:
00257 typedef A NormalType;
00258 NormalType &N() { return _norm; }
00259 NormalType cN() const { return _norm; }
00260 template <class RightF>
00261 void ImportData(const RightF & rightF)
00262 {
00263 N().Import(rightF.cN());
00264 T::ImportData( rightF);
00265 }
00266
00267 inline void Alloc(const int & ns){T::Alloc(ns);}
00268 inline void Dealloc(){T::Dealloc();}
00269 static bool HasFaceNormal() { return true; }
00270 static void Name(std::vector<std::string> & name){name.push_back(std::string("NormalAbs"));T::Name(name);}
00271
00272 private:
00273 NormalType _norm;
00274 };
00275
00276 template <class T> class WedgeNormal: public T {
00277 public:
00278 typedef typename T::VertexType::NormalType NormalType;
00279 NormalType &WN(const int j) { return _wnorm[j]; }
00280 const NormalType cWN(const int j) const { return _wnorm[j]; }
00281 template <class RightF>
00282 void ImportData(const RightF & rightF){ for (int i=0; i<3; ++i) { WN(i) = rightF.cWN(i); } T::ImportData(rightF);}
00283 inline void Alloc(const int & ns){T::Alloc(ns);}
00284 inline void Dealloc(){T::Dealloc();}
00285 static bool HasWedgeNormal() { return true; }
00286 static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeNormal"));T::Name(name);}
00287
00288 private:
00289 NormalType _wnorm[3];
00290 };
00291
00292 template <class A, class T> class WedgeRealNormal: public T {
00293 public:
00294 typedef A NormalType;
00295 NormalType &WN(const int i) { return _wn[i]; }
00296 NormalType const &cWN(const int i) const { return _wn[i]; }
00297 template <class RightF>
00298 void ImportData(const RightF & rightF){ for (int i=0; i<3; ++i) { WN(i) = rightF.cWN(i); } T::ImportData(rightF);}
00299 inline void Alloc(const int & ns){T::Alloc(ns);}
00300 inline void Dealloc(){T::Dealloc();}
00301 static bool HasWedgeNormal() { return true; }
00302 static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeRealNormal"));T::Name(name);}
00303
00304 private:
00305 NormalType _wn[3];
00306 };
00307
00308 template <class TT> class WedgeRealNormal3s: public WedgeRealNormal<vcg::Point3s, TT> {
00309 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeRealNormal2s"));TT::Name(name);}};
00310
00311 template <class TT> class WedgeRealNormal3f: public WedgeRealNormal<vcg::Point3f, TT> {
00312 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeRealNormal2f"));TT::Name(name);}};
00313
00314 template <class TT> class WedgeRealNormal3d: public WedgeRealNormal<vcg::Point3d, TT> {
00315 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeRealNormal2d"));TT::Name(name);}};
00316
00317
00318 template <class T> class Normal3s: public NormalAbs<vcg::Point3s, T> {
00319 public:static void Name(std::vector<std::string> & name){name.push_back(std::string("Normal3s"));T::Name(name);}
00320 };
00321 template <class T> class Normal3f: public NormalAbs<vcg::Point3f, T> {
00322 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Normal3f"));T::Name(name);}
00323 };
00324 template <class T> class Normal3d: public NormalAbs<vcg::Point3d, T> {
00325 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Normal3d"));T::Name(name);}
00326 };
00327
00328
00329
00330
00331 template <class T> class EmptyWedgeTexCoord: public T {
00332 public:
00333 typedef int WedgeTexCoordType;
00334 typedef vcg::TexCoord2<float,1> TexCoordType;
00335 TexCoordType &WT(const int) { static TexCoordType dummy_texture; assert(0); return dummy_texture;}
00336 TexCoordType const &cWT(const int) const { static TexCoordType dummy_texture; return dummy_texture;}
00337 template <class RightF>
00338 void ImportData(const RightF & rightF){ T::ImportData(rightF);}
00339 inline void Alloc(const int & ns){T::Alloc(ns);}
00340 inline void Dealloc(){T::Dealloc();}
00341 static bool HasWedgeTexCoord() { return false; }
00342 static bool HasWedgeTexCoordOcc() { return false; }
00343 static void Name(std::vector<std::string> & name){T::Name(name);}
00344
00345 };
00346 template <class A, class T> class WedgeTexCoord: public T {
00347 public:
00348 typedef int WedgeTexCoordType;
00349 typedef A TexCoordType;
00350 TexCoordType &WT(const int i) { return _wt[i]; }
00351 TexCoordType const &cWT(const int i) const { return _wt[i]; }
00352 template <class RightF>
00353 void ImportData(const RightF & rightF){ for (int i=0; i<3; ++i) { WT(i) = rightF.cWT(i); } T::ImportData(rightF);}
00354 inline void Alloc(const int & ns){T::Alloc(ns);}
00355 inline void Dealloc(){T::Dealloc();}
00356 static bool HasWedgeTexCoord() { return true; }
00357 static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexCoord"));T::Name(name);}
00358
00359 private:
00360 TexCoordType _wt[3];
00361 };
00362
00363 template <class TT> class WedgeTexCoord2s: public WedgeTexCoord<TexCoord2<short,1>, TT> {
00364 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexCoord2s"));TT::Name(name);}
00365 };
00366 template <class TT> class WedgeTexCoord2f: public WedgeTexCoord<TexCoord2<float,1>, TT> {
00367 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexCoord2f"));TT::Name(name);}
00368 };
00369 template <class TT> class WedgeTexCoord2d: public WedgeTexCoord<TexCoord2<double,1>, TT> {
00370 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeTexCoord2d"));TT::Name(name);}
00371 };
00372
00373
00374 template <class T> class EmptyBitFlags: public T {
00375 public:
00377 int &Flags() { static int dummyflags(0); assert(0); return dummyflags; }
00378 int Flags() const { return 0; }
00379 template <class RightF>
00380 void ImportData(const RightF & rightF){ T::ImportData(rightF);}
00381 inline void Alloc(const int & ns){T::Alloc(ns);}
00382 inline void Dealloc(){T::Dealloc();}
00383 static bool HasFlags() { return false; }
00384 static bool HasFlagsOcc() { return false; }
00385 static void Name(std::vector<std::string> & name){T::Name(name);}
00386
00387 };
00388
00389 template <class T> class BitFlags: public T {
00390 public:
00391 BitFlags(){_flags=0;}
00392 int &Flags() {return _flags; }
00393 int Flags() const {return _flags; }
00394 const int & cFlags() const {return _flags; }
00395 template <class RightF>
00396 void ImportData(const RightF & rightF){ Flags() = rightF.cFlags();T::ImportData(rightF);}
00397 inline void Alloc(const int & ns){T::Alloc(ns);}
00398 inline void Dealloc(){T::Dealloc();}
00399 static bool HasFlags() { return true; }
00400 static void Name(std::vector<std::string> & name){name.push_back(std::string("BitFlags"));T::Name(name);}
00401
00402
00403 private:
00404 int _flags;
00405 };
00406
00407
00408
00409 template <class T> class EmptyColorMarkQuality: public T {
00410 public:
00411 typedef int MarkType;
00412 inline void InitIMark() { }
00413 inline int & IMark() { assert(0); static int tmp=-1; return tmp;}
00414 inline int IMark() const {return 0;}
00415
00416 typedef float QualityType;
00417 typedef vcg::Color4b ColorType;
00418 ColorType &C() { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
00419 const ColorType &cC() const { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
00420 ColorType &WC(const int) { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
00421 const ColorType &cWC(const int) const { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
00422 QualityType &Q() { static QualityType dummyQuality(0); assert(0); return dummyQuality; }
00423 const QualityType &cQ() const { static QualityType dummyQuality(0); assert(0); return dummyQuality; }
00424
00425 static bool HasFaceColor() { return false; }
00426 static bool HasFaceColorOcc() { return false;}
00427 static bool HasFaceColorOcf() { return false;}
00428
00429 static bool HasWedgeColor() { return false; }
00430 static bool HasWedgeColorOcc() { return false; }
00431 static bool HasWedgeColorOcf() { return false; }
00432
00433 static bool HasFaceQuality() { return false; }
00434 static bool HasFaceQualityOcc() { return false; }
00435 static bool HasFaceQualityOcf() { return false;}
00436
00437 static bool HasMark() { return false; }
00438 static bool HasMarkOcc() { return false; }
00439 static bool HasMarkOcfb() { return false; }
00440
00441 static void Name(std::vector<std::string> & name){T::Name(name);}
00442 template <class RightF>
00443 void ImportData(const RightF & rightF){ T::ImportData(rightF);}
00444 inline void Alloc(const int & ns){T::Alloc(ns);}
00445 inline void Dealloc(){T::Dealloc();}
00446
00447 };
00448 template <class A, class T> class Color: public T {
00449 public:
00450 typedef A ColorType;
00451 Color():_color(vcg::Color4b::White) {}
00452 ColorType &C() { return _color; }
00453 const ColorType &cC() const { return _color; }
00454 template <class RightF>
00455 void ImportData(const RightF & rightF){ C() = rightF.cC();T::ImportData(rightF);}
00456 inline void Alloc(const int & ns){T::Alloc(ns);}
00457 inline void Dealloc(){T::Dealloc();}
00458 static bool HasFaceColor() { return true; }
00459 static void Name(std::vector<std::string> & name){name.push_back(std::string("Color"));T::Name(name);}
00460
00461 private:
00462 ColorType _color;
00463 };
00464
00465 template <class A, class T> class WedgeColor: public T {
00466 public:
00467 typedef A ColorType;
00468 ColorType &WC(const int i) { return _color[i]; }
00469 const ColorType &WC(const int i) const { return _color[i]; }
00470 const ColorType &cWC(const int i) const { return _color[i]; }
00471
00472 template <class RightF>
00473 void ImportData(const RightF & rightF){ if (RightF::HasWedgeColor()) { for (int i=0; i<3; ++i) { WC(i) = rightF.cWC(i); } T::ImportData(rightF); } }
00474 static bool HasWedgeColor() { return true; }
00475 static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeColor"));T::Name(name);}
00476
00477 private:
00478 ColorType _color[3];
00479 };
00480
00481 template <class T> class WedgeColor4b: public WedgeColor<vcg::Color4b, T> {
00482 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeColor4b"));T::Name(name);}
00483 };
00484
00485 template <class T> class WedgeColor4f: public WedgeColor<vcg::Color4f, T> {
00486 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeColor4f"));T::Name(name);}
00487 };
00488
00489 template <class T> class Color4b: public Color<vcg::Color4b, T> { public:
00490 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Color4b"));T::Name(name);}
00491 };
00492
00493
00494
00495 template <class A, class T> class Quality: public T {
00496 public:
00497 typedef A QualityType;
00498 QualityType &Q() { return _quality; }
00499 const QualityType &cQ() const { return _quality; }
00500 template <class RightF>
00501 void ImportData(const RightF & rightF){ if(RightF::HasFaceQuality()) Q() = rightF.cQ();T::ImportData(rightF);}
00502 inline void Alloc(const int & ns){T::Alloc(ns);}
00503 inline void Dealloc(){T::Dealloc();}
00504 static bool HasFaceQuality() { return true; }
00505 static bool HasFaceQualityOcc() { return true; }
00506 static void Name(std::vector<std::string> & name){name.push_back(std::string("Quality"));T::Name(name);}
00507 private:
00508 QualityType _quality;
00509 };
00510
00511 template <class T> class Qualitys: public Quality<short, T> {
00512 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Qualitys"));T::Name(name);}
00513 };
00514 template <class T> class Qualityf: public Quality<float, T> {
00515 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Qualityf"));T::Name(name);}
00516 };
00517 template <class T> class Qualityd: public Quality<double, T> {
00518 public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Qualityd"));T::Name(name);}
00519 };
00520
00521
00522 template <class T> class Mark: public T {
00523 public:
00524 static bool HasMark() { return true; }
00525 static bool HasMarkOcc() { return true; }
00526 inline void InitIMark() { _imark = 0; }
00527 inline int & IMark() { return _imark;}
00528 inline const int & IMark() const {return _imark;}
00529 template <class RightF>
00530 void ImportData(const RightF & rightF){ IMark() = rightF.IMark();T::ImportData(rightF);}
00531 static void Name(std::vector<std::string> & name){name.push_back(std::string("Mark"));T::Name(name);}
00532
00533 private:
00534 int _imark;
00535 };
00536
00537
00538
00539
00540
00541 template <class T> class EmptyAdj: public T {
00542 public:
00543 typedef int VFAdjType;
00544 typename T::FacePointer &VFp(const int) { static typename T::FacePointer fp=0; assert(0); return fp; }
00545 typename T::FacePointer const cVFp(const int) const { static typename T::FacePointer const fp=0; return fp; }
00546 typename T::FacePointer &FFp(const int) { static typename T::FacePointer fp=0; assert(0); return fp; }
00547 typename T::FacePointer const cFFp(const int) const { static typename T::FacePointer const fp=0; return fp; }
00548 typename T::EdgePointer &FEp(const int) { static typename T::EdgePointer fp=0; assert(0); return fp; }
00549 typename T::EdgePointer const cFEp(const int) const { static typename T::EdgePointer const fp=0; return fp; }
00550 typename T::HEdgePointer &FHp() { static typename T::HEdgePointer fp=0; assert(0); return fp; }
00551 typename T::HEdgePointer const cFHp() const { static typename T::HEdgePointer const fp=0; assert(0);return fp; }
00552 char &VFi(const int j){(void)j; static char z=0; assert(0); return z;};
00553 char &FFi(const int j){(void)j; static char z=0; assert(0); return z;};
00554 const char &cVFi(const int j){(void)j; static char z=0; return z;};
00555 const char &cFFi(const int j) const {(void)j; static char z=0; return z;};
00556 template <class RightF>
00557 void ImportData(const RightF & rightF){ T::ImportData(rightF);}
00558 inline void Alloc(const int & ns){T::Alloc(ns);}
00559 inline void Dealloc(){T::Dealloc();}
00560 static bool HasVFAdjacency() { return false; }
00561 static bool HasFFAdjacency() { return false; }
00562 static bool HasFEAdjacency() { return false; }
00563 static bool HasFHAdjacency() { return false; }
00564
00565 static bool HasFFAdjacencyOcc() { return false; }
00566 static bool HasVFAdjacencyOcc() { return false; }
00567 static bool HasFEAdjacencyOcc() { return false; }
00568 static bool HasFHAdjacencyOcc() { return false; }
00569
00570 static void Name(std::vector<std::string> & name){T::Name(name);}
00571
00572 };
00573
00574 template <class T> class VFAdj: public T {
00575 public:
00576 VFAdj(){
00577 _vfp[0]=0;
00578 _vfp[1]=0;
00579 _vfp[2]=0;
00580 }
00581 typename T::FacePointer &VFp(const int j) { assert(j>=0 && j<3); return _vfp[j]; }
00582 typename T::FacePointer const VFp(const int j) const { assert(j>=0 && j<3); return _vfp[j]; }
00583 typename T::FacePointer const cVFp(const int j) const { assert(j>=0 && j<3); return _vfp[j]; }
00584 char &VFi(const int j) {return _vfi[j]; }
00585 template <class RightF>
00586 void ImportData(const RightF & rightF){T::ImportData(rightF);}
00587 inline void Alloc(const int & ns){T::Alloc(ns);}
00588 inline void Dealloc(){T::Dealloc();}
00589 static bool HasVFAdjacency() { return true; }
00590 static bool HasVFAdjacencyOcc() { return false; }
00591 static void Name(std::vector<std::string> & name){name.push_back(std::string("VFAdj"));T::Name(name);}
00592
00593 private:
00594 typename T::FacePointer _vfp[3] ;
00595 char _vfi[3] ;
00596 };
00597
00598
00599
00600 template <class T> class FFAdj: public T {
00601 public:
00602 FFAdj(){
00603 _ffp[0]=0;
00604 _ffp[1]=0;
00605 _ffp[2]=0;
00606 }
00607 typename T::FacePointer &FFp(const int j) { assert(j>=0 && j<3); return _ffp[j]; }
00608 typename T::FacePointer const FFp(const int j) const { assert(j>=0 && j<3); return _ffp[j]; }
00609 typename T::FacePointer const cFFp(const int j) const { assert(j>=0 && j<3); return _ffp[j]; }
00610 char &FFi(const int j) { return _ffi[j]; }
00611 const char &cFFi(const int j) const { return _ffi[j]; }
00612
00613 typename T::FacePointer &FFp1( const int j ) { return FFp((j+1)%3);}
00614 typename T::FacePointer &FFp2( const int j ) { return FFp((j+2)%3);}
00615 typename T::FacePointer const FFp1( const int j ) const { return FFp((j+1)%3);}
00616 typename T::FacePointer const FFp2( const int j ) const { return FFp((j+2)%3);}
00617
00618 template <class RightF>
00619 void ImportData(const RightF & rightF){T::ImportData(rightF);}
00620 inline void Alloc(const int & ns){T::Alloc(ns);}
00621 inline void Dealloc(){T::Dealloc();}
00622 static bool HasFFAdjacency() { return true; }
00623 static bool HasFFAdjacencyOcc() { return false; }
00624 static void Name(std::vector<std::string> & name){name.push_back(std::string("FFAdj"));T::Name(name);}
00625
00626 private:
00627 typename T::FacePointer _ffp[3] ;
00628 char _ffi[3] ;
00629 };
00630
00631
00632
00633
00634 template <class T> class FEAdj: public T {
00635 public:
00636 FEAdj(){
00637 _fep[0]=0;
00638 _fep[1]=0;
00639 _fep[2]=0;
00640 }
00641 typename T::FacePointer &FEp(const int j) { assert(j>=0 && j<3); return _fep[j]; }
00642 typename T::FacePointer const FEp(const int j) const { assert(j>=0 && j<3); return _fep[j]; }
00643 typename T::FacePointer const cFEp(const int j) const { assert(j>=0 && j<3); return _fep[j]; }
00644 char &FEi(const int j) { return _fei[j]; }
00645 const char &cFEi(const int j) const { return _fei[j]; }
00646
00647 typename T::FacePointer &FEp1( const int j ) { return FEp((j+1)%3);}
00648 typename T::FacePointer &FEp2( const int j ) { return FEp((j+2)%3);}
00649 typename T::FacePointer const FEp1( const int j ) const { return FEp((j+1)%3);}
00650 typename T::FacePointer const FEp2( const int j ) const { return FEp((j+2)%3);}
00651
00652 template <class RightF>
00653 void ImportData(const RightF & rightF){T::ImportData(rightF);}
00654 inline void Alloc(const int & ns){T::Alloc(ns);}
00655 inline void Dealloc(){T::Dealloc();}
00656 static bool HasFEAdjacency() { return true; }
00657 static void Name(std::vector<std::string> & name){name.push_back(std::string("FEAdj"));T::Name(name);}
00658
00659 private:
00660 typename T::FacePointer _fep[3] ;
00661 char _fei[3] ;
00662 };
00663
00664
00665
00666
00667 template <class T> class FHAdj: public T {
00668 public:
00669 FHAdj(){_fh=0;}
00670 typename T::HEdgePointer &FHp( ) { return _fh; }
00671 typename T::HEdgePointer const cFHp( ) const { return _fh; }
00672
00673 template <class RightF>
00674 void ImportData(const RightF & rightF){T::ImportData(rightF);}
00675 inline void Alloc(const int & ns){T::Alloc(ns);}
00676 inline void Dealloc(){T::Dealloc();}
00677 static bool HasFHAdjacency() { return true; }
00678 static void Name(std::vector<std::string> & name){name.push_back(std::string("FHAdj"));T::Name(name);}
00679
00680 private:
00681 typename T::HEdgePointer _fh ;
00682 };
00683 }
00684 }
00685 #endif