00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _MxHalfPyramidCell_h
00024 #define _MxHalfPyramidCell_h
00025
00026 #ifdef _WIN32
00027 #pragma warning(push)
00028 #pragma warning(disable:4250)
00029 #endif
00030
00031 #include <MeshVizXLM/extractors/MxTetrahedronCellExtract.h>
00032 #include <MeshVizXLM/mesh/cell/MiVolumeCell.h>
00033
00034
00043 {
00044 public:
00045
00046 void setNodeIds(size_t nodeId0, size_t nodeId1, size_t nodeId2, size_t nodeId3)
00047 {
00048 m_nodeIds[0] = nodeId0;
00049 m_nodeIds[1] = nodeId1;
00050 m_nodeIds[2] = nodeId2;
00051 m_nodeIds[3] = nodeId3;
00052 }
00053
00054 virtual size_t getNodeIndex(size_t nod) const { return m_nodeIds[nod]; }
00055
00056 virtual bool isPointInsideCell(const MiGeometryI& meshGeometry, const MbVec3d &point, std::vector<double>& weights) const
00057 {
00058 return MxTetrahedronCellExtract::isPointInsideCell(meshGeometry,this,point,weights);
00059 }
00060
00061 void getWeight(const MiGeometryI& meshGeometry,const MbVec3d& point, std::vector<double>& weights) const
00062 {
00063 return MxTetrahedronCellExtract::getWeight(meshGeometry,this,point,weights);
00064 }
00065
00066 virtual size_t getNumFacets() const { return 4; }
00067 virtual size_t getNumEdges() const { return 6; }
00068 virtual size_t getNumNodes() const { return 4; }
00069 virtual size_t appendNodesIndexOfFacet (size_t, std::vector<size_t>&) const { return 0; }
00070 virtual void getIsosurfTopology(unsigned char, std::vector< std::pair<size_t,size_t> >& ) const {}
00071
00072
00073 private:
00074 size_t m_nodeIds[4];
00075 };
00076
00077 #ifdef _WIN32
00078 #pragma warning(pop)
00079 #endif
00080
00081 #endif
00082
00083
00084