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