00001
00002
00004
00005 #ifndef MESHFACESDRAWERSTATEVARIABLES_H
00006 #define MESHFACESDRAWERSTATEVARIABLES_H
00007
00008 #include "MESH_SceneGraphTypes.h"
00009 #include "MESH_Mesh.h"
00010
00011 #include <list>
00012 #include <vector>
00013
00014 namespace X3DTK {
00015 namespace MESH {
00016
00017
00018
00019 template<class MData, class VData, class EData, class FData>
00020 class MeshFacesDrawerStateVariables : public StateVariables
00021 {
00022 public:
00024 MeshFacesDrawerStateVariables();
00025
00027 void init();
00029 void finish();
00030
00031
00032 void pushMatrix(const SFMatrix34f &transformation);
00033
00034 void popMatrix();
00035
00036
00037 int getCurrentMeshId();
00038
00039
00040 void storeMesh(Mesh<MData, VData, EData, FData> *mesh);
00041
00042
00043 inline Mesh<MData, VData, EData, FData> *getMesh(int i) const;
00044
00045 inline const SFMatrix34f &getMatrix(int i) const;
00046
00047
00048 inline void setSelectionMode(bool selectionMode);
00049 inline bool getSelectionMode() const;
00050
00051
00052 void changeOneColorPerMesh();
00053 inline bool getOneColorPerMesh() const;
00054
00055 private:
00056 std::list<SFMatrix34f> _matrixStack;
00057 std::vector<SFMatrix34f> _matrixVector;
00058 std::vector<Mesh<MData, VData, EData, FData> *> _meshVector;
00059 bool _selectionMode;
00060 bool _oneColorPerMesh;
00061 };
00062
00063 }
00064 }
00065
00066 #include "MESH_MeshFacesDrawerStateVariables.inl"
00067
00068 #endif