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);
00042 void drawSelected(X3DNode *N);
00043
00044
00045 inline TemplateMesh<MData, VData, EData, FData, RW> *getMesh(int i) const;
00046
00047 inline const SFMatrix34f &getMatrix(int i) const;
00049 inline SFTemplateFace<MData, VData, EData, FData, RW> *getFaceOfMesh(int i, int j) const;
00051 void setRenderingMode(FaceMode mode);
00053 void setSelectedNodes(const MFNode &selectedNodes);
00054 };
00055
00057 typedef TemplateFacesDrawer<MeshData, VertexData, EdgeData, FaceData, true> FacesDrawer;
00058
00059 }
00060 }
00061
00062 #include "MESH_FacesDrawer.inl"
00063
00064 #endif
00065