Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
MiPointProbeUnstructured Class Referenceabstract

MeshViz Probe at a given location in an unstructured mesh More...

#include <MeshVizXLM/extractors/MiPointProbeUnstructured.h>

Public Member Functions

virtual ~MiPointProbeUnstructured ()
 
virtual bool setLocation (const MbVec3d &point, const MiCellFilterI *cellFilter=NULL)=0
 Sets the current probe location at the given point and looks for the cell containing this point.
 
virtual bool moveLocation (const MbVec3d &point, size_t cellId, const MiCellFilterI *cellFilter=NULL)=0
 Moves the current probe location at the given point.
 
virtual bool isFound () const =0
 
template<typename _T >
_T getValue (const MiDataSetI< _T > &dataset) const
 Gets the value at the current probe location in the given dataset.
 
virtual size_t getCellId () const =0
 Gets the id of the cell of the mesh containing the current location of the probe.
 
virtual const MbVec3dgetCoord () const =0
 Gets the coordinates of the current location of the probe.
 

Static Public Member Functions

static MiPointProbeUnstructuredgetNewInstance (const MiVolumeMeshUnstructured &mesh, bool parallel=true)
 Factory method returning a new instance of a class implementing this abstract class.
 
static MiPointProbeUnstructuredgetNewInstance (const MiSurfaceMeshUnstructured &mesh, bool parallel=true)
 

Protected Member Functions

virtual void getWeight (std::vector< double > &weight) const =0
 Gets the weights at the current probe location.
 
virtual const MiCellgetCell () const =0
 Gets the cell of the mesh containing the current location of the probe.
 

Detailed Description

MeshViz Probe at a given location in an unstructured mesh

This class can be used to evaluate the value of a data set in the given mesh at any location. The probe is internally building an octree onto volume meshes. This octree can be optimized by setting three environment variables (see SoPreferences).

MESHVIZ_OCTREE_CACHE_CELLBBOX allows to cache cell boundingboxes in order to speed up the search for cells in the octree, thus probing faster. The default is 0 (not cached)

MESHVIZ_OCTREE_MAX_CELL_PER_TILE specifies the maximum number of cells that can belong to a tile in the octree. Note that only leaves can contain cells. Hence, this is the breaking criteria to split up a leaf and distribute its cells into the new-born children. The smaller this number, the deeper the octree, which will speed up probing but slow down the initialization stage. The default is 40.

MESHVIZ_OCTREE_MAX_DEPTH specifies the depth limit of the octree to prevent from using too much memory. Note that when reaching the depth limit, tiles at this level can exceed the number of cells allowed. The default is 6.

Definition at line 59 of file MiPointProbeUnstructured.h.

Constructor & Destructor Documentation

◆ ~MiPointProbeUnstructured()

virtual MiPointProbeUnstructured::~MiPointProbeUnstructured ( )
inlinevirtual

Definition at line 62 of file MiPointProbeUnstructured.h.

Member Function Documentation

◆ getCell()

virtual const MiCell * MiPointProbeUnstructured::getCell ( ) const
protectedpure virtual

Gets the cell of the mesh containing the current location of the probe.

This method is protected to have a public api the most similar to the MiPointProbeIjk.

Returns
NULL if the current location of the probe is outside the mesh.

◆ getCellId()

virtual size_t MiPointProbeUnstructured::getCellId ( ) const
pure virtual

Gets the id of the cell of the mesh containing the current location of the probe.

Returns
UNDEFINED_ID if the current location of the probe is outside the mesh.

◆ getCoord()

virtual const MbVec3d & MiPointProbeUnstructured::getCoord ( ) const
pure virtual

Gets the coordinates of the current location of the probe.

◆ getNewInstance() [1/2]

static MiPointProbeUnstructured * MiPointProbeUnstructured::getNewInstance ( const MiSurfaceMeshUnstructured mesh,
bool  parallel = true 
)
static

◆ getNewInstance() [2/2]

static MiPointProbeUnstructured * MiPointProbeUnstructured::getNewInstance ( const MiVolumeMeshUnstructured mesh,
bool  parallel = true 
)
static

Factory method returning a new instance of a class implementing this abstract class.

Parameters
meshThe input mesh
parallelWhen true, tries to create an extract module using a parallel algorithm to speed up the extraction.
Note
Only some of the extraction algorithms have a parallel implementation.

◆ getValue()

template<typename _T >
_T MiPointProbeUnstructured::getValue ( const MiDataSetI< _T > &  dataset) const
inline

Gets the value at the current probe location in the given dataset.

The returned value is meaningless if the probe location is outside the mesh (when isFound() is false).

Definition at line 146 of file MiPointProbeUnstructured.h.

◆ getWeight()

virtual void MiPointProbeUnstructured::getWeight ( std::vector< double > &  weight) const
protectedpure virtual

Gets the weights at the current probe location.

This weights are used by getValue() to compute a value at the current probe location.

◆ isFound()

virtual bool MiPointProbeUnstructured::isFound ( ) const
pure virtual

Returns
true if the current location of the probe is inside the mesh, false otherwise.

◆ moveLocation()

virtual bool MiPointProbeUnstructured::moveLocation ( const MbVec3d point,
size_t  cellId,
const MiCellFilterI cellFilter = NULL 
)
pure virtual

Moves the current probe location at the given point.

This method is similar and gives the same result as setLocation(). But, first it looks for the containing cell in the neighborhood of the cell having id cellId . Then, if the neighborhood of this given cell does not contain the
given point this method searches in the whole mesh like the method setLocation().

For instance, moveLocation() could be used instead of setLocation() when the cell containing the point is already known, or when the displacement of the probe is not too large compared to the cell's size at the previous location of the probe. In this case, use getCellId() as input cellId argument.

Parameters
[in]pointThe destination point of the probe.
[in]cellIdinput cell used as initial search criteria. If UNDEFINED_ID, this method is equivalent to setLocation().
[in]cellFilterThe cell filter.
Returns
true if this location is inside the mesh, false otherwise.

◆ setLocation()

virtual bool MiPointProbeUnstructured::setLocation ( const MbVec3d point,
const MiCellFilterI cellFilter = NULL 
)
pure virtual

Sets the current probe location at the given point and looks for the cell containing this point.

If the probe location is inside a cell not accepted by the optional filter, this methods returns false.

Parameters
[in]pointThe destination point of the probe.
[in]cellFilterThe cell filter.
Returns
true if this location is inside the mesh, false otherwise.

The documentation for this class was generated from the following file: