00001 #ifndef X3DTK_MESH_FACESDRAWER_H
00002 #define X3DTK_MESH_FACESDRAWER_H
00003
00004 #include "MESH_FacesDrawerStateVariables.h"
00005 #include "X3DOnePassProcessor.h"
00006 #include "MESH_SceneGraphTypes.h"
00007 #include "DFSGraphTraversal.h"
00008 #include "MESH_FacesDrawerCoreVisitor.h"
00009 #include "MESH_Mesh.h"
00010 #include "MESH_MeshData.h"
00011
00012 namespace X3DTK {
00013 namespace MESH {
00014
00027 template<class MData, class VData, class EData, class FData, bool RW>
00028 class TemplateFacesDrawer : public X3DOnePassProcessor
00029 {
00030 public:
00032 TemplateFacesDrawer();
00034 virtual ~TemplateFacesDrawer();
00035
00037 void changeModel();
00038
00040 void draw(X3DNode *N, bool selection = false);
00041
00042
00043 inline TemplateMesh<MData, VData, EData, FData, RW> *getMesh(int i) const;
00044
00045 inline const SFMatrix34f &getMatrix(int i) const;
00047 inline SFTemplateFace<MData, VData, EData, FData, RW> *getFaceOfMesh(int i, int j) const;
00049 void setRenderingMode(FaceMode mode);
00051 void setSelectedNodes(const MFNode &selectedNodes);
00052 };
00053
00055 typedef TemplateFacesDrawer<MeshData, VertexData, EdgeData, FaceData, true> FacesDrawer;
00056
00057 }
00058 }
00059
00060 #include "MESH_FacesDrawer.inl"
00061
00062 #endif
00063