Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
MiPointProbeIj.h
Go to the documentation of this file.
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-2019 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23#ifndef _MiPointProbeIj_h
24#define _MiPointProbeIj_h
25
28
29class MiCellFilterIj;
33
44{
45public:
46 virtual ~MiPointProbeIj() {}
47
49
55 static MiPointProbeIj* getNewInstance(const MiSurfaceMeshRegular& mesh, bool parallel = true);
56 static MiPointProbeIj* getNewInstance(const MiSurfaceMeshRectilinear& mesh, bool parallel = true);
57 static MiPointProbeIj* getNewInstance(const MiSurfaceMeshCurvilinear& mesh, bool parallel = true);
59
69 virtual bool setLocation(const MbVec3d& point, const MiCellFilterIj* cellFilter=NULL) = 0;
70
93 virtual bool moveLocation(const MbVec3d& point, size_t cellIdI, size_t cellIdJ,
94 const MiCellFilterIj* cellFilter=NULL) = 0;
95
100 virtual bool isFound() const = 0;
101
107 template <typename _T>
108 _T getValue(const MiDataSetIj<_T>& dataset) const;
109
116 virtual void getCellId(size_t &i, size_t &j) const = 0;
117
118private: protected:
123 virtual void getWeight(std::vector<double>& weight) const = 0;
124};
125
126//-----------------------------------------------------------------------------
127template <typename _T>
128inline _T MiPointProbeIj::getValue(const MiDataSetIj<_T>& dataset) const
129{
130 _T val(0);
131 if (isFound())
132 {
133 size_t icell,jcell;
134 getCellId(icell,jcell);
136 {
137 std::vector<double> weight(4);
138 getWeight(weight);
139 val += weight[0]*dataset.get(icell,jcell);
140 val += weight[1]*dataset.get(icell+1,jcell);
141 val += weight[2]*dataset.get(icell+1,jcell+1);
142 val += weight[3]*dataset.get(icell,jcell+1);
143 }
144 else
145 val = dataset.get(icell,jcell);
146 }
147 return val;
148}
149
150
151
152#endif
153
154
#define MESHVIZXLM_EXTR_API
valueRef getValue() const
Definition SoSubField.h:234
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Interface class defining...
virtual DataBinding getBinding() const =0
Returns the data binding of this data set.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Generic data set interfa...
Definition MiDataSetIj.h:41
virtual _T get(size_t i, size_t j) const =0
Returns the ij-th value of this set.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Probe at a given locatio...
virtual bool isFound() const =0
static MiPointProbeIj * getNewInstance(const MiSurfaceMeshCurvilinear &mesh, bool parallel=true)
virtual bool setLocation(const MbVec3d &point, const MiCellFilterIj *cellFilter=NULL)=0
Sets the current probe location at the given point and looks for the cell containing this point.
static MiPointProbeIj * getNewInstance(const MiSurfaceMeshRectilinear &mesh, bool parallel=true)
virtual ~MiPointProbeIj()
_T getValue(const MiDataSetIj< _T > &dataset) const
Gets the value at the current probe location in the given dataset.
virtual void getCellId(size_t &i, size_t &j) const =0
Gets the ids of the cell of the mesh containing the current location of the probe.
virtual void getWeight(std::vector< double > &weight) const =0
Gets the weights at the current probe location.
virtual bool moveLocation(const MbVec3d &point, size_t cellIdI, size_t cellIdJ, const MiCellFilterIj *cellFilter=NULL)=0
Moves the current probe location at the given point.
static MiPointProbeIj * getNewInstance(const MiSurfaceMeshRegular &mesh, bool parallel=true)
Factory method returning a new instance of a class implementing this abstract class.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Curvilinear surface mesh...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Rectilinear surface mesh...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Regular surface mesh abs...