00001 #ifndef _MixSurfaceMesh_h 00002 #define _MixSurfaceMesh_h 00003 00004 00005 #include <cell/MbTriangleCell.h> 00006 00007 #include "QuadraticSurfaceMesh.h" 00008 00009 #include <Inventor/STL/vector> 00010 00011 //----------------------------------------------------------------------------- 00012 class MixTopology : public QuadraticTopology 00013 { 00014 public: 00015 MixTopology() 00016 : m_cell0(0,1,2) , m_cell1(0,2,6) 00017 { 00018 } 00019 00020 virtual const MiSurfaceCell* getCell(size_t id) const 00021 { 00022 switch (id) 00023 { 00024 case 0: return &m_cell0; 00025 case 1: return &m_cell1; 00026 default: return QuadraticTopology::getCell(id); 00027 } 00028 } 00029 00030 private: 00031 MbTriangleCell m_cell0; 00032 MbTriangleCell m_cell1; 00033 }; 00034 00035 00036 //----------------------------------------------------------------------------- 00037 class MixSurfaceMesh : public QuadraticSurfaceMesh 00038 { 00039 public: 00040 MixSurfaceMesh() {} 00041 00042 virtual const MiSurfaceTopologyExplicitI& getTopology() const 00043 { 00044 return m_topology; 00045 } 00046 00047 private: 00048 MixTopology m_topology; 00049 }; 00050 00051 #endif 00052 00053 00054