00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _MITOPOLOGYIJ_H
00024 #define _MITOPOLOGYIJ_H
00025
00026 #include <MeshVizXLM/mesh/topology/MiTopology.h>
00027
00028 #include <Inventor/STL/sstream>
00029
00046 class MESHVIZXLM_EXTR_API MiTopologyIj : virtual public MiTopology
00047 {
00048 public:
00052 virtual size_t getNumCellsI() const = 0;
00053
00057 virtual size_t getNumCellsJ() const = 0;
00058
00067 virtual bool isDead(size_t SO_UNUSED_PARAM(i), size_t SO_UNUSED_PARAM(j)) const{ return false ;};
00068
00069 private:protected:
00073 virtual std::ostream& toStream(std::ostream& s) const
00074 {
00075 s << "#Mesh topology Ij" << std::endl;
00076 s << "#Num Cells I" << std::endl;
00077 s << getNumCellsI() << std::endl;
00078 s << "#Num Cells J" << std::endl;
00079 s << getNumCellsJ() << std::endl;
00080 s << "#Has Dead Cells" << std::endl;
00081 s << hasDeadCells() << std::endl;
00082 if (hasDeadCells())
00083 {
00084 s << "#Dead Cells:" << std::endl;
00085 for (size_t i=0; i<getNumCellsI(); i++)
00086 {
00087 for (size_t j=0; j<getNumCellsJ(); j++)
00088 {
00089 if (isDead(i,j))
00090 {
00091 s << "deadCell " << i << " " << j << std::endl;
00092 }
00093 }
00094 }
00095 }
00096
00097 return s;
00098 }
00099
00100 };
00101
00102
00103 #endif
00104
00105