00001 #ifndef X3DTK_MESH_SFFACE_H 00002 #define X3DTK_MESH_SFFACE_H 00003 00004 #include "MESH_SceneGraphTypes.h" 00005 #include "MESH_BaseSFFace.h" 00006 00007 #include <vector> 00008 #include <iostream> 00009 00010 namespace X3DTK { 00011 namespace MESH { 00012 00013 template<class MData, class VData, class EData, class FData, bool RW> class TemplateMesh; 00014 template<class MData, class VData, class EData, class FData, bool RW> class SFTemplateEdge; 00015 template<class MData, class VData, class EData, class FData, bool RW> class EntityMFTemplateEdge; 00016 00023 template<class MData, class VData, class EData, class FData, bool RW> 00024 class SFTemplateFace : public BaseSFFace 00025 { 00026 friend class TemplateMesh<MData, VData, EData, FData, RW>; 00027 public: 00028 typedef EntityMFTemplateEdge<MData, VData, EData, FData, RW> MFEdge; 00029 typedef EntityMFTemplateVertex<MData, VData, EData, FData, RW> MFVertex; 00030 00032 inline const MFEdge &getEdges() const; 00037 MFVertex getVertices() const; 00039 inline FData &data(); 00041 inline const FData &data() const; 00043 void reverse(); 00045 inline TemplateMesh<MData, VData, EData, FData, RW> *getMesh() const {return _mesh;}; 00046 00047 #ifdef TEMPLATE_SPECIALIZATION_SUPPORTED 00048 00049 template<class F> 00050 F &getData(); 00052 template<class F> 00053 F &ogetData(); 00054 #endif 00055 00056 private: 00057 MFEdge _edges; 00058 FData _data; 00059 TemplateMesh<MData, VData, EData, FData, RW> *_mesh; 00060 00062 SFTemplateFace(unsigned int i); 00064 ~SFTemplateFace(); 00065 00067 void addEdge(SFTemplateEdge<MData, VData, EData, FData, RW> *edge); 00068 }; 00069 00071 template<class MData, class VData, class EData, class FData, bool RW> 00072 std::ostream& operator<<(std::ostream& o, const SFTemplateFace<MData, VData, EData, FData, RW> &f); 00073 00074 } 00075 } 00076 00077 #include "MESH_SFFace.inl" 00078 00079 #endif