24 #ifndef __VCG_FACE_PLUS_COMPONENT
25 #define __VCG_FACE_PLUS_COMPONENT
31 #include <vcg/space/color4.h>
32 #include <vcg/space/texcoord2.h>
43 inline typename T::VertexType * &V(
const int ) { assert(0);
static typename T::VertexType *vp=0;
return vp; }
44 inline const typename T::VertexType * V(
const int )
const { assert(0);
static typename T::VertexType *vp=0;
return vp; }
45 inline const typename T::VertexType * cV(
const int )
const { assert(0);
static typename T::VertexType *vp=0;
return vp; }
46 inline typename T::VertexType * &FVp(
const int i ) {
return this->V(i); }
47 inline const typename T::VertexType * FVp(
const int i )
const {
return this->cV(i); }
48 inline const typename T::VertexType * cFVp(
const int i )
const {
return this->cV(i); }
49 inline typename T::CoordType &P(
const int ) { assert(0);
static typename T::CoordType coord(0, 0, 0);
return coord; }
50 inline typename T::CoordType P(
const int )
const { assert(0);
static typename T::CoordType coord(0, 0, 0);
return coord; }
51 inline const typename T::CoordType &cP(
const int )
const { assert(0);
static typename T::CoordType coord(0, 0, 0);
return coord; }
53 static bool HasVertexRef() {
return false; }
54 static bool HasFVAdjacency() {
return false; }
56 typedef typename T::VertexType::NormalType NormalType;
57 typedef NormalType WedgeNormalType;
58 NormalType &N() {
static NormalType dummy_normal(0, 0, 0); assert(0);
return dummy_normal; }
59 const NormalType& N()
const {
static NormalType dummy_normal(0, 0, 0);
return dummy_normal; }
60 const NormalType& cN()
const {
static NormalType dummy_normal(0, 0, 0);
return dummy_normal; }
61 WedgeNormalType &WN(
int) {
static NormalType dummy_normal(0, 0, 0); assert(0);
return dummy_normal; }
62 const WedgeNormalType& WN(
int)
const {
static NormalType dummy_normal(0, 0, 0);
return dummy_normal; }
63 const WedgeNormalType& cWN(
int)
const {
static NormalType dummy_normal(0, 0, 0);
return dummy_normal; }
66 typedef int WedgeTexCoordType;
67 typedef vcg::TexCoord2<float,1> TexCoordType;
68 TexCoordType &WT(
const int) {
static TexCoordType dummy_texture; assert(0);
return dummy_texture;}
69 const TexCoordType & WT(
const int)
const {
static TexCoordType dummy_texture;
return dummy_texture;}
70 const TexCoordType &cWT(
const int)
const {
static TexCoordType dummy_texture;
return dummy_texture;}
73 int &Flags() {
static int dummyflags(0); assert(0);
return dummyflags; }
74 int Flags()
const {
return 0; }
75 int cFlags()
const {
return 0; }
76 static bool HasFlags() {
return false; }
78 inline void InitIMark() { }
79 inline int &IMark() { assert(0);
static int tmp=-1;
return tmp;}
80 inline int IMark()
const {
return 0;}
81 inline int cIMark()
const {
return 0;}
84 typedef float QualityType;
88 ColorType &C() {
static ColorType dumcolor(vcg::Color4b::White); assert(0);
return dumcolor; }
89 const ColorType& C()
const {
static ColorType dumcolor(vcg::Color4b::White); assert(0);
return dumcolor; }
90 const ColorType& cC()
const {
static ColorType dumcolor(vcg::Color4b::White); assert(0);
return dumcolor; }
92 const WedgeColorType& WC(
const int)
const {
static ColorType dumcolor(vcg::Color4b::White); assert(0);
return dumcolor; }
93 const WedgeColorType& cWC(
const int)
const {
static ColorType dumcolor(vcg::Color4b::White); assert(0);
return dumcolor; }
94 QualityType &Q() {
static QualityType dummyQuality(0); assert(0);
return dummyQuality; }
95 const QualityType& Q()
const {
static QualityType dummyQuality(0); assert(0);
return dummyQuality; }
96 const QualityType& cQ()
const {
static QualityType dummyQuality(0); assert(0);
return dummyQuality; }
101 static bool HasColor() {
return false; }
102 static bool HasQuality() {
return false; }
103 static bool HasQuality3() {
return false; }
104 static bool HasMark() {
return false; }
105 static bool HasNormal() {
return false; }
107 static bool HasWedgeColor() {
return false; }
108 static bool HasWedgeNormal() {
return false; }
109 static bool HasWedgeTexCoord() {
return false; }
112 inline bool IsColorEnabled( )
const {
return T::FaceType::HasColor(); }
113 inline bool IsCurvatureDirEnabled( )
const {
return T::FaceType::HasCurvatureDir(); }
114 inline bool IsMarkEnabled( )
const {
return T::FaceType::HasMark(); }
115 inline bool IsNormalEnabled( )
const {
return T::FaceType::HasNormal(); }
116 inline bool IsQualityEnabled( )
const {
return T::FaceType::HasQuality(); }
117 inline bool IsQuality3Enabled( )
const {
return T::FaceType::HasQuality3(); }
119 inline bool IsWedgeColorEnabled( )
const {
return T::FaceType::HasWedgeColor(); }
120 inline bool IsWedgeNormalEnabled( )
const {
return T::FaceType::HasWedgeNormal(); }
121 inline bool IsWedgeTexCoordEnabled( )
const {
return T::FaceType::HasWedgeTexCoord(); }
123 typedef int VFAdjType;
124 typename T::FacePointer &VFp(
int) {
static typename T::FacePointer fp=0; assert(0);
return fp; }
125 typename T::FacePointer VFp(
int)
const {
static typename T::FacePointer fp=0; assert(0);
return fp; }
126 const typename T::FacePointer &cVFp(
int)
const {
static typename T::FacePointer fp=0; assert(0);
return fp; }
127 typename T::FacePointer &FFp(
int) {
static typename T::FacePointer fp=0; assert(0);
return fp; }
128 typename T::FacePointer FFp(
int)
const {
static typename T::FacePointer fp=0; assert(0);
return fp; }
129 const typename T::FacePointer &cFFp(
int)
const {
static typename T::FacePointer fp=0; assert(0);
return fp; }
130 typename T::EdgePointer &FEp(
int) {
static typename T::EdgePointer fp=0; assert(0);
return fp; }
131 typename T::EdgePointer FEp(
int)
const {
static typename T::EdgePointer fp=0; assert(0);
return fp; }
132 const typename T::EdgePointer &cFEp(
int)
const {
static typename T::EdgePointer fp=0; assert(0);
return fp; }
133 typename T::HEdgePointer &FHp() {
static typename T::HEdgePointer fp=0; assert(0);
return fp; }
134 typename T::HEdgePointer FHp()
const {
static typename T::HEdgePointer fp=0; assert(0);
return fp; }
135 const typename T::HEdgePointer &cFHp()
const {
static typename T::HEdgePointer fp=0; assert(0);
return fp; }
136 char &VFi(
int) {
static char z=0; assert(0);
return z;}
137 char VFi(
int)
const {
static char z=0; assert(0);
return z;}
138 char cVFi(
int)
const {
static char z=0; assert(0);
return z;}
139 char &FFi(
int) {
static char z=0; assert(0);
return z;}
140 char FFi(
int)
const {
static char z=0; assert(0);
return z;}
141 char cFFi(
int)
const {
static char z=0; assert(0);
return z;}
142 bool IsVFInitialized(
const int j)
const {
return static_cast<const typename T::FaceType *
>(
this)->cVFi(j)!=-1;}
143 void VFClear(
int j) {
144 if(IsVFInitialized(j)) {
145 static_cast<typename T::FacePointer
>(
this)->VFp(j)=0;
146 static_cast<typename T::FacePointer
>(
this)->VFi(j)=-1;
149 static bool HasVFAdjacency() {
return false; }
150 static bool HasFFAdjacency() {
return false; }
151 static bool HasFEAdjacency() {
return false; }
152 static bool HasFHAdjacency() {
return false; }
154 typedef typename T::VertexType::CurvatureDirType CurvatureDirType;
155 typedef typename T::CoordType CurVecType;
156 typedef typename T::ScalarType CurScalarType;
157 CurVecType &PD1() {
static typename T::CoordType dummy(0, 0, 0); assert(0);
return dummy; }
158 CurVecType &PD2() {
static typename T::CoordType dummy(0, 0, 0); assert(0);
return dummy; }
159 const CurVecType& PD1()
const {
static typename T::CoordType dummy(0, 0, 0); assert(0);
return dummy; }
160 const CurVecType& PD2()
const {
static typename T::CoordType dummy(0, 0, 0); assert(0);
return dummy; }
161 const CurVecType& cPD1()
const {
static typename T::CoordType dummy(0, 0, 0); assert(0);
return dummy; }
162 const CurVecType& cPD2()
const {
static typename T::CoordType dummy(0, 0, 0); assert(0);
return dummy; }
164 CurScalarType &K1() {
static typename T::ScalarType dummy(0); assert(0);
return dummy; }
165 CurScalarType &K2() {
static typename T::ScalarType dummy(0); assert(0);
return dummy; }
166 const CurScalarType& K1()
const {
static typename T::ScalarType dummy(0); assert(0);
return dummy; }
167 const CurScalarType& K2()
const {
static typename T::ScalarType dummy(0); assert(0);
return dummy; }
168 const CurScalarType& cK1()
const {
static typename T::ScalarType dummy(0); assert(0);
return dummy; }
169 const CurScalarType& cK2()
const {
static typename T::ScalarType dummy(0); assert(0);
return dummy; }
171 static bool HasCurvatureDir() {
return false; }
174 static bool HasPolyInfo() {
return false; }
176 template <
class RightValueType>
177 void ImportData(
const RightValueType & rightF) {T::ImportData(rightF);}
178 inline void Alloc(
const int & ns) {T::Alloc(ns);}
179 inline void Dealloc(){T::Dealloc();}
180 static void Name(std::vector<std::string> & name){T::Name(name);}
198 typedef typename T::VertexType::CoordType CoordType;
199 typedef typename T::VertexType::ScalarType ScalarType;
201 inline typename T::VertexType * &V(
const int j ) { assert(j>=0 && j<3);
return v[j]; }
202 inline const typename T::VertexType *
V (
const int j)
const { assert(j>=0 && j<3);
return v[j]; }
203 inline const typename T::VertexType * cV(
const int j )
const { assert(j>=0 && j<3);
return v[j]; }
205 inline CoordType &P(
const int j ) { assert(j>=0 && j<3);
return v[j]->P(); }
206 inline const CoordType &
P(
const int j )
const { assert(j>=0 && j<3);
return v[j]->P(); }
207 inline const CoordType &cP(
const int j )
const { assert(j>=0 && j<3);
return v[j]->cP(); }
209 inline typename T::VertexType * & V0(
const int j ) {
return V(j);}
210 inline typename T::VertexType * &
V1(
const int j ) {
return V((j+1)%3);}
211 inline typename T::VertexType * &
V2(
const int j ) {
return V((j+2)%3);}
212 inline const typename T::VertexType *
V0(
const int j )
const {
return V(j);}
213 inline const typename T::VertexType *
V1(
const int j )
const {
return V((j+1)%3);}
214 inline const typename T::VertexType *
V2(
const int j )
const {
return V((j+2)%3);}
215 inline const typename T::VertexType *
cV0(
const int j )
const {
return cV(j);}
216 inline const typename T::VertexType * cV1(
const int j )
const {
return cV((j+1)%3);}
217 inline const typename T::VertexType * cV2(
const int j )
const {
return cV((j+2)%3);}
219 inline CoordType & P0(
const int j ) {
return V(j)->P();}
220 inline CoordType & P1(
const int j ) {
return V((j+1)%3)->P();}
221 inline CoordType & P2(
const int j ) {
return V((j+2)%3)->P();}
222 inline const CoordType & P0(
const int j )
const {
return V(j)->P();}
223 inline const CoordType & P1(
const int j )
const {
return V((j+1)%3)->P();}
224 inline const CoordType & P2(
const int j )
const {
return V((j+2)%3)->P();}
225 inline const CoordType & cP0(
const int j )
const {
return cV(j)->P();}
226 inline const CoordType & cP1(
const int j )
const {
return cV((j+1)%3)->P();}
227 inline const CoordType & cP2(
const int j )
const {
return cV((j+2)%3)->P();}
232 template <
class RightValueType>
233 void ImportData(
const RightValueType & rightF){ T::ImportData(rightF);}
234 inline void Alloc(
const int & ns){T::Alloc(ns);}
235 inline void Dealloc(){T::Dealloc();}
237 static bool HasVertexRef() {
return true; }
238 static bool HasFVAdjacency() {
return true; }
240 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"VertexRef"));T::Name(name);}
243 typename T::VertexType *v[3];
248 typedef A NormalType;
249 inline NormalType &N() {
return _norm; }
250 inline const NormalType &N()
const {
return _norm; }
251 inline const NormalType &cN()
const {
return _norm; }
252 template <
class RightValueType>
253 void ImportData(
const RightValueType & rightF)
255 if(rightF.IsNormalEnabled()) N().Import(rightF.cN());
256 T::ImportData(rightF);
259 inline void Alloc(
const int & ns){T::Alloc(ns);}
260 inline void Dealloc(){T::Dealloc();}
261 static bool HasNormal() {
return true; }
262 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"NormalAbs"));T::Name(name);}
270 typedef typename T::VertexType::NormalType WedgeNormalType;
271 inline WedgeNormalType &WN(
int j) {
return _wnorm[j]; }
272 inline const WedgeNormalType &WN(
int j)
const {
return _wnorm[j]; }
273 inline const WedgeNormalType &cWN(
int j)
const {
return _wnorm[j]; }
274 template <
class RightValueType>
275 void ImportData(
const RightValueType & rightF){
if(rightF.IsWedgeNormalEnabled())
for (
int i=0; i<3; ++i) { WN(i) = rightF.cWN(i); } T::ImportData(rightF);}
276 inline void Alloc(
const int & ns){T::Alloc(ns);}
277 inline void Dealloc(){T::Dealloc();}
278 static bool HasWedgeNormal() {
return true; }
279 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeNormal"));T::Name(name);}
282 WedgeNormalType _wnorm[3];
287 typedef A WedgeNormalType;
288 inline WedgeNormalType &WN(
int i) {
return _wn[i]; }
289 inline const WedgeNormalType &WN(
int i)
const {
return _wn[i]; }
290 inline const WedgeNormalType &cWN(
int i)
const {
return _wn[i]; }
291 template <
class RightValueType>
292 void ImportData(
const RightValueType & rightF){
if(RightValueType::HasWedgeNormal())
for (
int i=0; i<3; ++i) { WN(i) = rightF.cWN(i); } T::ImportData(rightF);}
293 inline void Alloc(
const int & ns){T::Alloc(ns);}
294 inline void Dealloc(){T::Dealloc();}
295 static bool HasWedgeNormal() {
return true; }
296 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeRealNormal"));T::Name(name);}
299 WedgeNormalType _wn[3];
303 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeRealNormal2s"));TT::Name(name);}};
305 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeRealNormal2f"));TT::Name(name);}};
307 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeRealNormal2d"));TT::Name(name);}};
310 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Normal3s"));T::Name(name);}
313 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Normal3f"));T::Name(name);}
316 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Normal3d"));T::Name(name);}
324 typedef int WedgeTexCoordType;
325 typedef A TexCoordType;
326 TexCoordType &WT(
const int i) {
return _wt[i]; }
327 const TexCoordType &WT(
const int i)
const {
return _wt[i]; }
328 const TexCoordType &cWT(
const int i)
const {
return _wt[i]; }
329 template <
class RightValueType>
330 void ImportData(
const RightValueType & rightF){
331 if(rightF.IsWedgeTexCoordEnabled())
332 for (
int i=0; i<3; ++i) { WT(i) = rightF.cWT(i); }
333 T::ImportData(rightF);
335 inline void Alloc(
const int & ns){T::Alloc(ns);}
336 inline void Dealloc(){T::Dealloc();}
337 static bool HasWedgeTexCoord() {
return true; }
338 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeTexCoord"));T::Name(name);}
345 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeTexCoord2s"));TT::Name(name);}
348 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeTexCoord2f"));TT::Name(name);}
351 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeTexCoord2d"));TT::Name(name);}
362 typedef int FlagType;
363 int &Flags() {
return _flags; }
364 int Flags()
const {
return _flags; }
365 int cFlags()
const {
return _flags; }
366 template <
class RightValueType>
367 void ImportData(
const RightValueType & rightF){
368 if(RightValueType::HasFlags())
369 Flags() = rightF.cFlags();
370 T::ImportData(rightF);
372 inline void Alloc(
const int & ns){T::Alloc(ns);}
373 inline void Dealloc(){T::Dealloc();}
374 static bool HasFlags() {
return true; }
375 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"BitFlags"));T::Name(name);}
382 template <
class A,
class T>
class Color:
public T {
385 Color():_color(vcg::Color4b::White) {}
386 ColorType &C() {
return _color; }
387 const ColorType &C()
const {
return _color; }
388 const ColorType &cC()
const {
return _color; }
389 template <
class RightValueType>
390 void ImportData(
const RightValueType & rightF){
391 if(rightF.IsColorEnabled()) C() = rightF.cC();
392 T::ImportData(rightF);
394 inline void Alloc(
const int & ns){T::Alloc(ns);}
395 inline void Dealloc(){T::Dealloc();}
396 static bool HasColor() {
return true; }
397 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Color"));T::Name(name);}
405 typedef A WedgeColorType;
406 WedgeColorType &WC(
int i) {
return _color[i]; }
407 const WedgeColorType &WC(
int i)
const {
return _color[i]; }
408 const WedgeColorType &cWC(
int i)
const {
return _color[i]; }
410 template <
class RightValueType>
411 void ImportData(
const RightValueType & rightF){
412 if (rightF.IsWedgeColorEnabled())
414 for (
int i=0; i<3; ++i) { WC(i) = rightF.cWC(i); }
416 T::ImportData(rightF);
419 static bool HasWedgeColor() {
return true; }
420 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeColor"));T::Name(name);}
423 WedgeColorType _color[3];
427 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeColor4b"));T::Name(name);}
430 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"WedgeColor4f"));T::Name(name);}
433 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Color4b"));T::Name(name);}
437 template <
class A,
class T>
class Quality:
public T {
439 typedef A QualityType;
441 QualityType &Q() {
return _quality; }
442 const QualityType &Q()
const {
return _quality; }
443 const QualityType &cQ()
const {
return _quality; }
444 template <
class RightValueType>
445 void ImportData(
const RightValueType & rightF){
446 if(rightF.IsQualityEnabled())
448 T::ImportData(rightF);
450 inline void Alloc(
const int & ns){T::Alloc(ns);}
451 inline void Dealloc(){T::Dealloc();}
452 static bool HasQuality() {
return true; }
453 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Quality"));T::Name(name);}
455 QualityType _quality;
459 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Qualitys"));T::Name(name);}
462 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Qualityf"));T::Name(name);}
465 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Qualityd"));T::Name(name);}
469 template <
class A,
class T>
class Quality3:
public T {
475 template <
class RightValueType>
476 void ImportData(
const RightValueType & rightF){
477 if(rightF.IsQuality3Enabled()) Q3() = rightF.cQ3();
478 T::ImportData(rightF);
480 inline void Alloc(
const int & ns){T::Alloc(ns);}
481 inline void Dealloc(){T::Dealloc();}
482 static bool HasQuality3() {
return true; }
483 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Quality3"));T::Name(name);}
489 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Quality3s"));T::Name(name);}
492 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Quality3f"));T::Name(name);}
495 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Quality3d"));T::Name(name);}
504 template <
class T>
class Mark:
public T {
507 inline int &IMark() {
return _imark;}
508 inline int IMark()
const {
return _imark;}
509 inline int cIMark()
const {
return _imark;}
510 inline void InitIMark() { _imark = 0; }
511 static bool HasMark() {
return true; }
512 template <
class RightValueType>
513 void ImportData(
const RightValueType & rightF){
514 if(rightF.IsMarkEnabled())
515 IMark() = rightF.cIMark();
516 T::ImportData(rightF);
518 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"Mark"));T::Name(name);}
528 typedef S CurScalarType;
536 typedef A CurvatureDirType;
537 typedef typename CurvatureDirType::CurVecType CurVecType;
538 typedef typename CurvatureDirType::CurScalarType CurScalarType;
540 CurVecType &PD1() {
return _curv.max_dir; }
541 CurVecType &PD2() {
return _curv.min_dir; }
542 const CurVecType &PD1()
const {
return _curv.max_dir; }
543 const CurVecType &PD2()
const {
return _curv.min_dir; }
544 const CurVecType &cPD1()
const {
return _curv.max_dir; }
545 const CurVecType &cPD2()
const {
return _curv.min_dir; }
547 CurScalarType &K1() {
return _curv.k1; }
548 CurScalarType &K2() {
return _curv.k2; }
549 const CurScalarType &K1()
const {
return _curv.k1; }
550 const CurScalarType &K2()
const {
return _curv.k2; }
551 const CurScalarType &cK1()
const {
return _curv.k1; }
552 const CurScalarType &cK2()
const {
return _curv.k2; }
553 template <
class RightValueType>
554 void ImportData(
const RightValueType & rightF ) {
555 if(rightF.IsCurvatureDirEnabled()) {
556 PD1() = rightF.cPD1(); PD2() = rightF.cPD2();
557 K1() = rightF.cK1(); K2() = rightF.cK2();
559 TT::ImportData(rightF);
562 static bool HasCurvatureDir() {
return true; }
563 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"CurvatureDir"));TT::Name(name);}
566 CurvatureDirType _curv;
571 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"CurvatureDirf"));T::Name(name);}
574 public:
static void Name(std::vector<std::string> & name){name.push_back(std::string(
"CurvatureDird"));T::Name(name);}
594 template <
class T>
class VFAdj:
public T {
604 typename T::FacePointer &VFp(
const int j) { assert(j>=0 && j<3);
return _vfp[j]; }
605 typename T::FacePointer VFp(
const int j)
const { assert(j>=0 && j<3);
return _vfp[j]; }
606 const typename T::FacePointer &cVFp(
const int j)
const { assert(j>=0 && j<3);
return _vfp[j]; }
607 char &VFi(
const int j) {
return _vfi[j]; }
608 char VFi(
const int j)
const {
return _vfi[j]; }
609 char cVFi(
const int j)
const {
return _vfi[j]; }
610 template <
class RightValueType>
611 void ImportData(
const RightValueType & rightF){T::ImportData(rightF);}
612 inline void Alloc(
const int & ns){T::Alloc(ns);}
613 inline void Dealloc(){T::Dealloc();}
614 static bool HasVFAdjacency() {
return true; }
615 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"VFAdj"));T::Name(name);}
618 typename T::FacePointer _vfp[3] ;
623 template <
class T>
class EFAdj:
public T {
633 typename T::FacePointer &EFp(
const int j) { assert(j>=0 && j<3);
return _efp[j]; }
634 const typename T::FacePointer &cEFp(
const int j)
const { assert(j>=0 && j<3);
return _efp[j]; }
635 char &VFi(
const int j) {
return _efi[j]; }
636 char VFi(
const int j)
const {
return _efi[j]; }
637 template <
class RightValueType>
638 void ImportData(
const RightValueType & rightF){T::ImportData(rightF);}
639 inline void Alloc(
const int & ns){T::Alloc(ns);}
640 inline void Dealloc(){T::Dealloc();}
641 static bool HasEFAdjacency() {
return true; }
642 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"EFAdj"));T::Name(name);}
645 typename T::FacePointer _efp[3] ;
664 template <
class T>
class FFAdj:
public T {
671 typename T::FacePointer &FFp(
const int j) { assert(j>=0 && j<3);
return _ffp[j]; }
672 typename T::FacePointer FFp(
const int j)
const { assert(j>=0 && j<3);
return _ffp[j]; }
673 const typename T::FacePointer &cFFp(
const int j)
const { assert(j>=0 && j<3);
return _ffp[j]; }
674 char &FFi(
const int j) {
return _ffi[j]; }
675 char FFi(
const int j)
const {
return _ffi[j]; }
676 char cFFi(
const int j)
const {
return _ffi[j]; }
678 typename T::FacePointer &FFp1(
const int j ) {
return FFp((j+1)%3);}
679 typename T::FacePointer &FFp2(
const int j ) {
return FFp((j+2)%3);}
680 typename T::FacePointer FFp1(
const int j )
const {
return FFp((j+1)%3);}
681 typename T::FacePointer FFp2(
const int j )
const {
return FFp((j+2)%3);}
682 const typename T::FacePointer &cFFp1(
const int j )
const {
return FFp((j+1)%3);}
683 const typename T::FacePointer &cFFp2(
const int j )
const {
return FFp((j+2)%3);}
685 template <
class RightValueType>
686 void ImportData(
const RightValueType & rightF){T::ImportData(rightF);}
687 inline void Alloc(
const int & ns){T::Alloc(ns);}
688 inline void Dealloc(){T::Dealloc();}
689 static bool HasFFAdjacency() {
return true; }
690 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"FFAdj"));T::Name(name);}
693 typename T::FacePointer _ffp[3] ;
700 template <
class T>
class FEAdj:
public T {
708 typename T::EdgePointer &FEp(
int j) { assert(j>=0 && j<3);
return _fep[j]; }
709 typename T::EdgePointer FEp(
int j)
const { assert(j>=0 && j<3);
return _fep[j]; }
710 const typename T::EdgePointer &cFEp(
int j)
const { assert(j>=0 && j<3);
return _fep[j]; }
712 typename T::EdgePointer &FEp1(
int j ) {
return FEp((j+1)%3);}
713 typename T::EdgePointer &FEp2(
int j ) {
return FEp((j+2)%3);}
714 typename T::EdgePointer FEp1(
int j )
const {
return FEp((j+1)%3);}
715 typename T::EdgePointer FEp2(
int j )
const {
return FEp((j+2)%3);}
717 template <
class RightValueType>
718 void ImportData(
const RightValueType & rightF){T::ImportData(rightF);}
719 inline void Alloc(
const int & ns){T::Alloc(ns);}
720 inline void Dealloc(){T::Dealloc();}
721 static bool HasFEAdjacency() {
return true; }
722 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"FEAdj"));T::Name(name);}
725 typename T::EdgePointer _fep[3] ;
731 template <
class T>
class FHAdj:
public T {
734 typename T::HEdgePointer &FHp( ) {
return _fh; }
735 typename T::HEdgePointer FHp( )
const {
return _fh; }
736 const typename T::HEdgePointer &cFHp( )
const {
return _fh; }
738 template <
class RightValueType>
739 void ImportData(
const RightValueType & rightF){T::ImportData(rightF);}
740 inline void Alloc(
const int & ns){T::Alloc(ns);}
741 inline void Dealloc(){T::Dealloc();}
742 static bool HasFHAdjacency() {
return true; }
743 static void Name(std::vector<std::string> & name){name.push_back(std::string(
"FHAdj"));T::Name(name);}
746 typename T::HEdgePointer _fh ;
Component: Per face Flags
Definition: component.h:359
Definition: component.h:432
Definition: component.h:382
Definition: component.h:534
Definition: component.h:573
Definition: component.h:570
Definition: component.h:623
Definition: component.h:41
Definition: component.h:700
Component: Per Face Face-Face adjacency relation
Definition: component.h:664
Definition: component.h:731
Per vertex Incremental Mark.
Definition: component.h:504
Definition: component.h:315
Definition: component.h:312
Definition: component.h:309
Definition: component.h:246
Definition: component.h:469
Definition: component.h:494
Definition: component.h:491
Definition: component.h:488
Definition: component.h:437
Definition: component.h:464
Definition: component.h:461
Definition: component.h:458
Component: Per Face Vertex-Face adjacency relation
Definition: component.h:594
The references to the vertexes of a triangular face.
Definition: component.h:190
T::VertexType *& V1(const int j)
Return the pointer to the j-th vertex of the face.
Definition: component.h:210
const T::VertexType * V(const int j) const
The pointer to the i-th vertex.
Definition: component.h:202
const T::VertexType * V2(const int j) const
Return the pointer to the ((j+1)%3)-th vertex of the face.
Definition: component.h:214
const T::VertexType * V0(const int j) const
Return the pointer to the ((j+2)%3)-th vertex of the face.
Definition: component.h:212
const T::VertexType * cV0(const int j) const
Return the pointer to the ((j+2)%3)-th vertex of the face.
Definition: component.h:215
const T::VertexType * V1(const int j) const
Return the pointer to the j-th vertex of the face.
Definition: component.h:213
const CoordType & P(const int j) const
Shortcut: the position of the i-th vertex (equivalent to V(i)->P() )
Definition: component.h:206
T::VertexType *& V2(const int j)
Return the pointer to the ((j+1)%3)-th vertex of the face.
Definition: component.h:211
Definition: component.h:426
Definition: component.h:429
Definition: component.h:403
Definition: component.h:268
Definition: component.h:306
Definition: component.h:304
Definition: component.h:302
Definition: component.h:285
Definition: component.h:350
Definition: component.h:347
Definition: component.h:344
Definition: component.h:322
Definition: namespaces.dox:6
Definition: component.h:526