00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _MBTOPOLOGY_H
00024 #define _MBTOPOLOGY_H
00025
00026 #include <MeshVizXLM/mesh/topology/MiTopology.h>
00027 #include <MeshVizXLM/MxTimeStamp.h>
00028 #include <Inventor/STL/vector>
00029
00030
00040 class MbTopology : virtual public MiTopology
00041 {
00042 public:
00043
00044 #ifdef MBMESH_DONT_USE_STL
00045 virtual ~MbTopology()
00046 {
00047 delete [] m_deadCells;
00048 }
00049 #endif
00050
00056 virtual size_t getTimeStamp() const {return m_timeStamp;}
00057
00063 virtual bool hasDeadCells() const
00064 {
00065 #ifndef MBMESH_DONT_USE_STL
00066 return !m_deadCells.empty();
00067 #else
00068 return m_deadCells != NULL;
00069 #endif
00070 }
00071
00076 void touch()
00077 {
00078 m_timeStamp = MxTimeStamp::getTimeStamp();
00079 }
00080
00081 private:
00082
00083
00084
00085 MbTopology()
00086 : MiTopology()
00087 , m_timeStamp(MxTimeStamp::getTimeStamp())
00088 #ifdef MBMESH_DONT_USE_STL
00089 ,m_deadCells(NULL)
00090 #endif
00091 {}
00092
00093 #ifndef MBMESH_DONT_USE_STL
00094 std::vector<bool> m_deadCells;
00095 #else
00096 bool* m_deadCells;
00097 #endif
00098 size_t m_timeStamp;
00099
00100 };
00101
00102
00103 #endif
00104
00105
00106