Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
MxHalfPyramidCell.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23#ifndef _MxHalfPyramidCell_h
24#define _MxHalfPyramidCell_h
25
26#ifdef _WIN32
27#pragma warning(push)
28#pragma warning(disable:4250)
29#endif
30
31#include <MeshVizXLM/extractors/MxTetrahedronCellExtract.h>
32#include <MeshVizXLM/mesh/cell/MiVolumeCell.h>
33
34
43{
44public:
45
46 void setNodeIds(size_t nodeId0, size_t nodeId1, size_t nodeId2, size_t nodeId3)
47 {
48 m_nodeIds[0] = nodeId0;
49 m_nodeIds[1] = nodeId1;
50 m_nodeIds[2] = nodeId2;
51 m_nodeIds[3] = nodeId3;
52 }
53
54 virtual size_t getNodeIndex(size_t nod) const { return m_nodeIds[nod]; }
55
56 virtual bool isPointInsideCell(const MiGeometryI& meshGeometry, const MbVec3d &point, std::vector<double>& weights) const
57 {
58 return MxTetrahedronCellExtract::isPointInsideCell(meshGeometry,this,point,weights);
59 }
60
61 void getWeight(const MiGeometryI& meshGeometry,const MbVec3d& point, std::vector<double>& weights) const
62 {
63 return MxTetrahedronCellExtract::getWeight(meshGeometry,this,point,weights);
64 }
65
66 virtual size_t getNumFacets() const { return 4; }
67 virtual size_t getNumEdges() const { return 6; }
68 virtual size_t getNumNodes() const { return 4; }
69 virtual size_t appendNodesIndexOfFacet (size_t, std::vector<size_t>&) const { return 0; }
70 virtual void getIsosurfTopology(unsigned char, std::vector< std::pair<size_t,size_t> >& ) const {}
71
72
73private:
74 size_t m_nodeIds[4];
75};
76
77#ifdef _WIN32
78#pragma warning(pop)
79#endif
80
81#endif
82
83
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Generic geometry interfa...
Definition MiGeometryI.h:39
static void getWeight(const MiGeometryI &meshGeometry, const MiVolumeCell *tetrahedronCell, const MbVec3d &point, std::vector< double > &weights)
Gets the weights in the given cell of the given point.
static bool isPointInsideCell(const MiGeometryI &meshGeometry, const MiVolumeCell *tetrahedronCell, const MbVec3d &point, std::vector< double > &weights)
Checks if a point is inside or outside a tetrahedron cell.