#ifndef MYSTRUCTURECOMPUTERGLOBALVARIABLES_H #define MYSTRUCTURECOMPUTERGLOBALVARIABLES_H #include "MySimpleMesh.h" #include #include namespace X3DTK { namespace MESH { // StateVariables for the MyStructureComputer processor. class MyStructureComputerStateVariables : public StateVariables { public: MyStructureComputerStateVariables(); void init(); void finish(); void beginNewMesh(); inline void addVertex(float x, float y, float z) {_mesh->addVertex(x, y, z);}; void addFace(const MyFace &face); void pushMatrix(const SFMatrix34f &transformation); void popMatrix(); inline MySimpleMesh *getMesh() const {return _mesh;}; SFMatrix34f getMatrix() const {return _matrixStack.front();}; private: MySimpleMesh *_mesh; unsigned int _decal; std::list _matrixStack; }; } } #endif