00001
00002
00004
00005 #ifndef MESH_FACESDRAWER_H
00006 #define MESH_FACESDRAWER_H
00007
00008 #include "MESH_MeshFacesDrawerStateVariables.h"
00009 #include "X3DOnePassProcessor.h"
00010 #include "MESH_SceneGraphTypes.h"
00011 #include "MESH_DFSGraphTraversal.h"
00012 #include "MESH_MeshFacesDrawerCoreVisitor.h"
00013 #include "MESH_Mesh.h"
00014
00015 namespace X3DTK {
00016 namespace MESH {
00017
00018
00019
00020 template<class MData, class VData, class EData, class FData>
00021 class MeshFacesDrawer : public X3DOnePassProcessor
00022 {
00023 public:
00025 MeshFacesDrawer();
00027 virtual ~MeshFacesDrawer();
00028
00030 void changeOneColorPerMesh();
00031
00033 void draw(X3DNode *N, bool selection = false);
00034
00035
00036 inline Mesh<MData, VData, EData, FData> *getMesh(int i) const;
00037
00038 inline const SFMatrix34f &getMatrix(int i) const;
00040 inline typename Mesh<MData, VData, EData, FData>::SFFace *getFaceOfMesh(int i, int j) const;
00041
00042 protected:
00043 MeshFacesDrawerStateVariables<MData, VData, EData, FData>* stateVariables;
00044 };
00045
00046 }
00047 }
00048
00049 #include "MESH_MeshFacesDrawer.inl"
00050
00051 #endif
00052