MESH_SFEdge.h

Go to the documentation of this file.
00001 #ifndef X3DTK_MESH_SFEDGE_H
00002 #define X3DTK_MESH_SFEDGE_H
00003 
00004 #include "MESH_BaseSFEdge.h"
00005 #include "MESH_SFEdgeContent.h"
00006 
00007 namespace X3DTK {
00008 namespace MESH {
00009 
00010 template<class MData, class VData, class EData, class FData, bool RW> class TemplateVertex;
00011 template<class MData, class VData, class EData, class FData, bool RW> class SFTemplateVertex;
00012 template<class MData, class VData, class EData, class FData, bool RW> class SFTemplateFace;
00013 template<class MData, class VData, class EData, class FData, bool RW> class EntityMFTemplateFace;
00014 
00021 template<class MData, class VData, class EData, class FData, bool RW>
00022 class SFTemplateEdge : public BaseSFEdge
00023 {
00024   friend class TemplateVertex<MData, VData, EData, FData, RW>;
00025   friend class TemplateMesh<MData, VData, EData, FData, RW>;
00026   friend class SFTemplateDirectEdge<MData, VData, EData, FData, RW>;
00027   friend class SFTemplateIndirectEdge<MData, VData, EData, FData, RW>;
00028   friend class SFTemplateFace<MData, VData, EData, FData, RW>;
00029 public:
00030   typedef EntityMFTemplateFace<MData, VData, EData, FData, RW> MFFace;
00031   
00033   inline SFTemplateEdge *getSymetric();
00035   virtual SFTemplateVertex<MData, VData, EData, FData, RW> *getFromVertex() const = 0;
00037   virtual SFTemplateVertex<MData, VData, EData, FData, RW> *getToVertex() const = 0;
00039   virtual const MFFace &getLeftFaces() const = 0;
00041   virtual const MFFace &getRightFaces() const = 0;
00045   MFFace getFaces() const;
00047   inline bool isBoundary() const;
00049   inline bool isNonManifold() const;
00051   inline EData &data();
00053   inline const EData &data() const;
00054 
00055 #ifdef TEMPLATE_SPECIALIZATION_SUPPORTED
00056 
00057   template<class F>  
00058   F &getData();
00060   template<class F>  
00061   F &ogetData();
00062 #endif
00063   
00064 protected:    
00066   SFTemplateEdge(SFTemplateEdgeContent<MData, VData, EData, FData, RW> *const edgeContent);
00068   virtual ~SFTemplateEdge();
00069   
00071   void setSymetric(SFTemplateEdge *symetric);
00073   virtual void addLeftFace(SFTemplateFace<MData, VData, EData, FData, RW> *face) = 0;
00075   virtual void addRightFace(SFTemplateFace<MData, VData, EData, FData, RW> *face) = 0;
00076 
00078   virtual void removeLeftFace(SFTemplateFace<MData, VData, EData, FData, RW> *face) = 0;
00080   virtual void removeRightFace(SFTemplateFace<MData, VData, EData, FData, RW> *face) = 0;
00081 
00082 private:
00083   SFTemplateEdgeContent<MData, VData, EData, FData, RW> *const _edgeContent;
00084   SFTemplateEdge *_symetric;
00085   
00087   void reverse(SFTemplateFace<MData, VData, EData, FData, RW> *face);
00088 };
00089 
00091 template<class MData, class VData, class EData, class FData, bool RW>
00092 std::ostream& operator<<(std::ostream& o, const SFTemplateEdge<MData, VData, EData, FData, RW> &e);
00093 
00094 }
00095 }
00096 
00097 #include "MESH_SFEdge.inl"
00098 
00099 #endif

Generated on Fri Jul 30 12:02:28 2004 for X3DToolKit by doxygen 1.3.6