MESH_StatsCalculatorStateVariables.h

Go to the documentation of this file.
00001 #ifndef X3DTK_MESH_STATSCALCULATORSTATEVARIABLES_H
00002 #define X3DTK_MESH_STATSCALCULATORSTATEVARIABLES_H
00003 
00004 #include "MESH_SceneGraphTypes.h"
00005 #include "MESH_Mesh.h"
00006 #include "MESH_Info.h"
00007 
00008 #include <list>
00009 #include <map>
00010 #include <vector>
00011 
00012 namespace X3DTK {
00013 namespace MESH {
00014 
00021 template<class MData, class VData, class EData, class FData, bool RW>
00022 class TemplateStatsCalculatorStateVariables : public StateVariables
00023 {
00024 public:
00026   TemplateStatsCalculatorStateVariables();
00027 
00029   void init();
00031   void finish();
00032 
00034   void addNode(SFNode N);
00036   bool getNode(SFNode N) const;
00037   
00039   void setCurrentMesh(TemplateMesh<MData, VData, EData, FData, RW> *mesh);
00041   void addFaces(unsigned int faces);
00043   void addVertices(unsigned int vertices);
00045   void addEdges(unsigned int edges);
00047   void setInstances(unsigned int instances);
00048   
00050   inline unsigned int getModelFaces() const;
00052   inline unsigned int getModelVertices() const;
00054   inline unsigned int getModelEdges() const;
00055   
00057   inline unsigned int getFacesOf(SFNode N);
00059   inline unsigned int getVerticesOf(SFNode N);
00061   inline unsigned int getEdgesOf(SFNode N);
00062   
00064   inline const TemplateMeshInfo<MData, VData, EData, FData, RW> &getModelMeshInfo() const;
00066   inline const std::list<std::pair<SFNode, TemplateMeshInfo<MData, VData, EData, FData, RW> > > &getMeshInfoList() const;
00068   inline const TemplateVertexInfo<MData, VData, EData, FData, RW> &getModelVertexInfo() const;
00070   inline const std::list<std::pair<SFNode, TemplateVertexInfo<MData, VData, EData, FData, RW> > > &getVertexInfoList() const;
00071     
00073   void setSelectedNodes(const MFNode &selectedNodes);
00075   MFNode getSelectedNodes() const;
00076   
00077 private:
00078   std::list<SFNode> _nodeList;
00079   TemplateMesh<MData, VData, EData, FData, RW> *_currentMesh;
00080   TemplateMeshInfo<MData, VData, EData, FData, RW> _modelMeshInfo;
00081   TemplateVertexInfo<MData, VData, EData, FData, RW> _modelVertexInfo;
00082   std::list<std::pair<SFNode, TemplateMeshInfo<MData, VData, EData, FData, RW> > > _meshInfoList;
00083   std::list<std::pair<SFNode, TemplateVertexInfo<MData, VData, EData, FData, RW> > > _vertexInfoList;
00084   MFNode _selectedNodes;
00085 };
00086 
00087 }
00088 }
00089 
00090 #include "MESH_StatsCalculatorStateVariables.inl"
00091 
00092 #endif

Generated on Fri Aug 27 13:16:22 2004 for X3DToolKit by doxygen 1.3.6