#ifndef MESH_DRAWER_GLOBALVARIABLES_H #define MESH_DRAWER_GLOBALVARIABLES_H #include #include #include namespace X3DTK { namespace MESH { // State variables for the MESH::Drawer processor. class DrawerStateVariables : public StateVariables { public: DrawerStateVariables(); void initTraversal(); void finishTraversal(); void pushMatrix(const SFMatrix34f &transformation); void popMatrix(); int getCurrentMeshId(); void storeMesh(Mesh *mesh); inline const Mesh *getMesh(int i) const {return _meshVector[i];}; inline SFMatrix34f getMatrix(int i) const {return _matrixVector[i];}; inline void setSelectionMode(bool selectionMode) {_selectionMode = selectionMode;}; inline bool getSelectionMode() const {return _selectionMode;}; void setPrimitiveType(int primitiveType) {_primitiveType = primitiveType;}; inline int getPrimitiveType() const {return _primitiveType;}; void changeOneColorPerMesh() {_oneColorPerMesh = !_oneColorPerMesh;}; inline bool getOneColorPerMesh() const {return _oneColorPerMesh;}; private: std::list _matrixStack; std::vector _matrixVector; std::vector _meshVector; bool _selectionMode; bool _oneColorPerMesh; int _primitiveType; }; } } #endif