Main Page | Modules | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

MESH_SFEdgeContent.h

Go to the documentation of this file.
00001 #ifndef X3DTK_MESH_SFEDGECONTENT_H
00002 #define X3DTK_MESH_SFEDGECONTENT_H
00003 
00004 #include "MESH_SceneGraphTypes.h"
00005 
00006 #include <vector>
00007 #include <algorithm>
00008 
00009 namespace X3DTK {
00010 namespace MESH {
00011 
00012 template<class VData, class EData, class FData, bool readOnly> class SFVertex;
00013 template<class FData, class VData, class EData, bool readOnly> class SFFace;
00014 
00021 template<class EData, class FData, class VData, bool readOnly = true>
00022 class SFEdgeContent
00023 {
00024   template<class A, class B, class C, class D, bool E> friend class Mesh;
00025   template<class A, class B, class C, bool D> friend class SFEdge;
00026   template<class A, class B, class C, bool D> friend class SFDirectEdge;
00027   template<class A, class B, class C, bool D> friend class SFIndirectEdge;
00028 public:
00029   typedef EntityMFFace<FData, VData, EData, readOnly> MFFace;
00030  
00032   inline SFVertex<VData, EData, FData, readOnly> *getFromVertex() const;
00034   inline SFVertex<VData, EData, FData, readOnly> *getToVertex() const;
00036   inline const MFFace &get1Faces() const;
00038   inline const MFFace &get2Faces() const;
00040   inline bool isBoundary() const;
00042   inline bool isNonManifold() const;
00044   inline EData &data();
00046   inline const EData &data() const;
00047 
00048 private:
00049   SFVertex<VData, EData, FData, readOnly> *const _from;
00050   SFVertex<VData, EData, FData, readOnly> *const _to;
00051   MFFace _r1Faces;
00052   MFFace _r2Faces;
00053   EData _data;
00054   
00056   SFEdgeContent(SFVertex<VData, EData, FData, readOnly> * from, SFVertex<VData, EData, FData, readOnly> *const to);
00058   ~SFEdgeContent();
00059     
00061   void add1Face(SFFace<FData, VData, EData, readOnly> *face);
00063   void add2Face(SFFace<FData, VData, EData, readOnly> *face);
00064   
00066   void remove1Face(SFFace<FData, VData, EData, readOnly> *face);
00068   void remove2Face(SFFace<FData, VData, EData, readOnly> *face);
00069   
00071   void reverse(SFFace<FData, VData, EData, readOnly> *face);
00072 };
00073 
00074 }
00075 }
00076 
00077 #include "MESH_SFEdgeContent.inl"
00078 
00079 #endif

Generated on Wed Apr 7 12:15:20 2004 for X3DToolKit by doxygen 1.3.3