Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MESH_MyStructureComputerStateVariables.h

Go to the documentation of this file.
00001 #ifndef MYSTRUCTURECOMPUTERGLOBALVARIABLES_H
00002 #define MYSTRUCTURECOMPUTERGLOBALVARIABLES_H
00003 
00004 #include "MySimpleMesh.h"
00005 
00006 #include <X3DTK/kernel.h>
00007 #include <list>
00008 
00009 namespace X3DTK {
00010 namespace MESH {
00011 
00012 // StateVariables for the MyStructureComputer processor.
00013 
00014 class MyStructureComputerStateVariables : public StateVariables
00015 {
00016 public:
00017   MyStructureComputerStateVariables();
00018 
00019   void init();
00020   void finish();
00021 
00022   void beginNewMesh();
00023   inline void addVertex(float x, float y, float z) {_mesh->addVertex(x, y, z);};
00024   void addFace(const MyFace &face);
00025   void pushMatrix(const SFMatrix34f &transformation);  
00026   void popMatrix();
00027 
00028   inline MySimpleMesh *getMesh() const {return _mesh;};  
00029   SFMatrix34f getMatrix() const {return _matrixStack.front();};
00030 
00031 private: 
00032   MySimpleMesh *_mesh;
00033   unsigned int _decal;
00034   std::list<SFMatrix34f> _matrixStack;
00035 };
00036 
00037 }
00038 }
00039 
00040 #endif

Generated on Thu Jun 3 10:12:09 2004 for X3DToolKit by doxygen 1.3.6