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

MESH_SFVertex.h

Go to the documentation of this file.
00001 #ifndef X3DTK_MESH_SFVERTEX_H
00002 #define X3DTK_MESH_SFVERTEX_H
00003 
00004 #include "MESH_SceneGraphTypes.h"
00005 #include "TypeList.h"
00006 
00007 #include <vector>
00008 
00009 namespace X3DTK {
00010 namespace MESH {
00011 
00012 template<class EData, class FData, class VData, bool readOnly> class SFEdge;
00013 template<class FData, class VData, class EData, bool readOnly> class SFFace;
00014 
00021 template<class VData, class EData, class FData, bool readOnly = true>
00022 class SFVertex
00023 {
00024   template<class A, class B, class C, bool E> friend class Vertex;
00025   template<class A, class B, class C, class D, bool E> friend class Mesh;
00026 public:
00027   typedef EntityMFFace<FData, VData, EData, readOnly> MFFace;
00028   typedef EntityMFEdge<EData, FData, VData, readOnly> MFEdge;
00029   
00031   inline unsigned int getIndex() const;
00033   inline const MFEdge &getEdges() const;
00035   inline const MFFace &getFaces() const;
00037   inline VData &data();
00039   inline const VData &data() const;
00041   template<class F>  
00042   F &getData();
00044   template<class F>  
00045   F &ogetData();
00047   inline bool isIsolated() const;
00048   
00049 private:
00050   const unsigned int _index;
00051   MFEdge _edges;
00052   MFFace _faces;
00053   VData _data;
00054 
00056   SFVertex(unsigned int i);
00058   ~SFVertex();
00059   
00061   void addEdge(SFEdge<EData, FData, VData, readOnly> *edge);
00063   void addFace(SFFace<FData, VData, EData, readOnly> *face);
00064   
00066   void removeEdge(SFEdge<EData, FData, VData, readOnly> *edge);
00068   void removeFace(SFFace<FData, VData, EData, readOnly> *face);
00069 };
00070 
00072 template<class EData, class FData, class VData, bool readOnly>
00073 std::ostream& operator<<(std::ostream& o, const SFVertex<VData, EData, FData, readOnly> &v);
00074 
00075 }
00076 }
00077 
00078 #include "MESH_SFVertex.inl"
00079 
00080 #endif

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