Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
MoMeshVector.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-2019 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23#ifndef _MO_MESHVECTORS_
24#define _MO_MESHVECTORS_
25
26#include <MeshVizXLM/MbVec3.h>
27
28#include <MeshVizXLM/mapping/nodes/MoMeshRepresentation.h>
29#include <MeshVizXLM/mapping/nodes/MoDataBinding.h>
30
31#include <Inventor/fields/SoMFFloat.h>
32
33#ifdef _WIN32
34#pragma warning(push)
35#pragma warning(disable:4251)
36#endif
37
38class MiCellFilter;
39class MiCellFilterI;
41class SoSwitch;
42class MxIndexDataSetI;
44
45class MdVectors;
46class MdLineVectors;
47class MdFancyVectors;
48
49
81class MESHVIZXLM_DMAP_API MoMeshVector : public MoMeshRepresentation {
82
83 SO_NODE_HEADER(MoMeshVector) ;
84
85 public:
86
91
98
105
121
140
146
147 /*----------------------------------------------------------------------------*/
148 private:
149 static void initClass() ;
150 static void exitClass() ;
151
152 private:
153 virtual void doExtract(SoAction * action);
154
155 // Does not create any new mesh so return NULL
156 virtual const MiMesh* getExtractedMesh(MeshType& SO_UNUSED_PARAM(meshType)) { return NULL;}
157
158 private:
159 virtual ~MoMeshVector() ;
160
161 void clear();
162
163 void doExtract(SoState* state, const MiMeshUnstructuredI& realMesh);
164
165 template < typename _adaptorT, typename _MeshIjT>
166 void doExtractSurfaceIj(SoState* state, _MeshIjT& realMesh);
167
168 template < typename _adaptorT, typename _MeshIjkT>
169 void doExtractVolumeIjk(SoState* state, _MeshIjkT& realMesh, MoDataBinding::DataBinding* dataBinding = NULL);
170
171 void buildVectors(SoState* state, const MiMeshUnstructuredI& uMesh, const MiVec3dSetI& vec3,
172 const MiScalardSetI* colorSet, const MiCellFilterI* filter=NULL);
173
174 bool haveValuesChanged(size_t topoTimeStamp, size_t geoTimeStamp, size_t vec3TimeStamp,
175 SoState* state, const MiDataSet* colorSet, const MiCellFilter* filter=NULL);
176
177 size_t m_topoTimeStamp;
178 size_t m_geoTimeStamp;
179 size_t m_vec3TimeStamp;
180 size_t m_colorTimeStamp;
181 size_t m_colorMapTimeStamp;
182 size_t m_cellFilterTimeStamp;
183 float m_scaleFactor;
184 float m_shiftFactor;
185 bool m_arrow;
186
187 SoSwitch* m_switchModel;
188 MxIndexDataSetI* m_indexList;
189 MdVectors* m_currentVectors;
190 MdLineVectors* m_lineVectors;
191 MdFancyVectors* m_fancyVectors;
192} ;
193
194#ifdef _WIN32
195#pragma warning(pop)
196#endif
197
198#endif /* _MO_MESHVECTORS_ */
199
200
201
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Interface class defining...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Interface class defining...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Generic data set interfa...
Definition MiDataSet.h:42
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Generic data set interfa...
Definition MiDataSetI.h:40
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract mesh interface.
Definition MiMesh.h:62
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> I Unstructured mesh abst...
DataBinding
Data Binding.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract base class for ...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Rendering node that disp...
SoSFBool arrow
Draw arrows on vectors.
SoSFFloat shiftFactor
The shift factor to apply to the representation of each vector.
SoSFInt32 vectorSetId
Specifies the vector set to display.
SoSFFloat thicknessFactor
The thickness factor to apply to the representation of each vector.
SoSFFloat scaleFactor
The scale factor to apply to the vector field to resize the representation.
MoMeshVector()
Constructor.
Abstract base class for all actions.
Definition SoAction.h:132
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing a floating-point value.
Definition SoSFFloat.h:78
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Traversal state.
Definition SoState.h:74
Group node that traverses one chosen child.
Definition SoSwitch.h:179
MeshType
All supported mesh types.