00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _MITOPOLOGYIJK_H
00024 #define _MITOPOLOGYIJK_H
00025
00026 #include <MeshVizXLM/mesh/topology/MiTopology.h>
00027
00028 #include <Inventor/STL/sstream>
00029
00030
00047 class MESHVIZXLM_EXTR_API MiTopologyIjk : virtual public MiTopology
00048 {
00049 public:
00050
00055 virtual size_t getNumCellsI() const = 0;
00056
00061 virtual size_t getNumCellsJ() const = 0;
00062
00067 virtual size_t getNumCellsK() const = 0;
00068
00077 virtual bool isDead(size_t SO_UNUSED_PARAM(i), size_t SO_UNUSED_PARAM(j), size_t SO_UNUSED_PARAM(k)) const { return false; }
00078
00079 private:protected:
00083 virtual std::ostream& toStream(std::ostream& s) const
00084 {
00085 s << "#mesh topology Ijk" << std::endl;
00086 s << "#numCellsI" << std::endl;
00087 s << getNumCellsI() << std::endl;
00088 s << "#numCellsJ" << std::endl;
00089 s << getNumCellsJ() << std::endl;
00090 s << "#numCellsK" << std::endl;
00091 s << getNumCellsK() << std::endl;
00092 s << "#hasDeadCells" << std::endl;
00093 s << hasDeadCells() << std::endl;
00094 if (hasDeadCells())
00095 {
00096 s << "#deadCells:" << std::endl;
00097 for (size_t i=0; i<getNumCellsI(); i++)
00098 {
00099 for (size_t j=0; j<getNumCellsJ(); j++)
00100 {
00101 for (size_t k=0; k<getNumCellsK(); k++)
00102 {
00103 if (isDead(i,j,k))
00104 {
00105 s << "#deadCell(" << i << "," << j << "," << k << ")" << std::endl;
00106 }
00107 }
00108 }
00109 }
00110 }
00111 return s;
00112 }
00113
00114 };
00115
00116
00117 #endif
00118
00119
00120