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
00042 class MESHVIZXLM_EXTR_API MiTopologyIjk : virtual public MiTopology
00043 {
00044 public:
00045
00050 virtual size_t getNumCellsI() const = 0;
00051
00056 virtual size_t getNumCellsJ() const = 0;
00057
00062 virtual size_t getNumCellsK() const = 0;
00063
00070 virtual bool isDead(size_t SO_UNUSED_PARAM(i), size_t SO_UNUSED_PARAM(j), size_t SO_UNUSED_PARAM(k)) const { return false; }
00071
00072 private:protected:
00076 virtual std::ostream& toStream(std::ostream& s) const
00077 {
00078 s << "#mesh topology Ijk" << std::endl;
00079 s << "#numCellsI" << std::endl;
00080 s << getNumCellsI() << std::endl;
00081 s << "#numCellsJ" << std::endl;
00082 s << getNumCellsJ() << std::endl;
00083 s << "#numCellsK" << std::endl;
00084 s << getNumCellsK() << std::endl;
00085 s << "#hasDeadCells" << std::endl;
00086 s << hasDeadCells() << std::endl;
00087 if (hasDeadCells())
00088 {
00089 s << "#deadCells:" << std::endl;
00090 for (size_t i=0; i<getNumCellsI(); i++)
00091 {
00092 for (size_t j=0; j<getNumCellsJ(); j++)
00093 {
00094 for (size_t k=0; k<getNumCellsK(); k++)
00095 {
00096 if (isDead(i,j,k))
00097 {
00098 s << "#deadCell(" << i << "," << j << "," << k << ")" << std::endl;
00099 }
00100 }
00101 }
00102 }
00103 }
00104 return s;
00105 }
00106
00107 };
00108
00109
00110 #endif
00111
00112
00113