Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

MESH_MeshEdgesDrawerStateVariables.h

Go to the documentation of this file.
00001 
00002 //                            MESH_MeshEdgesDrawerStateVariables.h            //
00004 
00005 #ifndef MESHEDGESDRAWERSTATEVARIABLES_H
00006 #define MESHEDGESDRAWERSTATEVARIABLES_H
00007 
00008 #include "MESH_SceneGraphTypes.h"
00009 
00010 #include <list>
00011 #include <vector>
00012 
00013 namespace X3DTK {
00014 namespace MESH {
00015 
00016 // State variables for the Drawer processor.
00017 
00018 template<class MData, class VData, class EData, class FData>
00019 class MeshEdgesDrawerStateVariables : public StateVariables
00020 {
00021 public:
00022   // Constructor.
00023   MeshEdgesDrawerStateVariables();
00024 
00025   // Initializes the traversal.
00026   void init();
00027   // Finishes the traversal.
00028   void finish();
00029   // Pushes the transformation matrix.
00030   void pushMatrix(const SFMatrix34f &transformation);
00031   
00032   // Pops the transformation matrix.
00033   void popMatrix();
00034 
00035   // Saves current matrix state and returns index in saved vector.
00036   // Call storeMesh() before calling ths function
00037   int getCurrentMeshId();
00038   // Saves mesh and associated current matrix.
00039   void storeMesh(Mesh<MData, VData, EData, FData> *mesh);
00040   
00041   // Get i Mesh of the model.
00042   inline Mesh<MData, VData, EData, FData> *getMesh(int i) const;
00043   // Gets stored transformation matrix associated with a given Mesh.
00044   inline const SFMatrix34f &getMatrix(int i) const;
00045 
00046   // Whether or not primitive IDs are pushed.
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<Mesh<MData, VData, EData, FData> *> _meshVector;
00054   bool _selectionMode;
00055 };
00056 
00057 }
00058 }
00059 
00060 #include "MESH_MeshEdgesDrawerStateVariables.inl"
00061 
00062 #endif

Generated on Mon Jan 19 10:32:04 2004 for X3DToolKit by doxygen1.2.18