Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
PbIsovaluesList.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
24#ifndef _PB_ISOVALUES_LIST_
25#define _PB_ISOVALUES_LIST_
26
27#include <MeshViz/graph/PbBase.h>
28
42class PbIsovaluesList : public PbBase {
43
44
45 public:
46
51
55 PbIsovaluesList(const PbIsovaluesList &isovalList) ;
56
60 PbIsovaluesList(float min, float max, int numValues) ;
61
66
71
75 int operator==(const PbIsovaluesList &isoList) ;
76
80 int operator!=(const PbIsovaluesList &isoList)
81 { return !(*this == isoList) ; }
82
86 void setIrregularIsoList(int numValues, const float *values) ;
87
93 void setRegularIsoList(int numFloats, const float *values, int numValues) ;
94
100 void setRegularIsoList(int numFloats, const float *values) ;
101
106 void setRegularIsoList(int numValues, float firstValue, float step) ;
107
112 void setRegularIsoList(float min, float max, int numValues) ;
113
118 void setRegularIsoList(float min, float max) ;
119
124 void setRegularIsoList(int numValues) ;
125
132 const float *getIsoList(int &numValues, float &min, float &max, float &step,
133 SbBool &isRegularIsoList) const ;
134
135 /*----------------------------------------------------------------------------*/
136
137
138 private:
139
140 void isoListDependsOnRep(SbBool flag)
141 { m_isDependOnRep = flag ; }
142 // Enables the isovalue list to be made depending on a representation (the
143 // isovalue list is computed by a representation). Be careful, all representations
144 // cannot compute a list of isovalues (For the moment, only mesh representations
145 // are able to compute an isovalue list from mesh limit). By default, the isovalue
146 // list does not depend on a representation.
147
148 SbBool isIsoListDependsOnRep() const
149 { return m_isDependOnRep ; }
150 // Returns TRUE, if the isovalue list depends on a representation, otherwise
151 // FALSE.
152
153 float getLowerIsovalue(float value) const ;
154 float getUpperIsovalue(float value) const ;
155 int getIndex(float value) const ;
156
157 private:
158 // Used by constructor per copy and affectation operator
159 void copy(const PbIsovaluesList &isovalList, SbBool isConstructorPerCopy) ;
160
161 // Used to debug
162 void print() ;
163
164 // Allow to allocate isovalues list
165 void allocIsovalList() ;
166
167 // Compute a homogeneous isovalues list from min, max and
168 // number of values desired
169 void homogIsovalList(float min, float max, int numValues) ;
170
171 float m_minValue, m_maxValue, *m_isovalList, m_stepIsoValues,
172 m_deltaIsoMin ; // not used for the moment
173 int m_numIsoValues, m_numAllocValues ;
174 SbBool m_isRegularIsovalList, m_isDependOnRep ;
175} ;
176
177/*---------------------------------------------------------------------------*/
178
179#endif /* _PB_ISOVALUES_LIST_ */
180
181
182
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for all b...
Definition PbBase.h:49
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to define a list o...
void setRegularIsoList(int numValues, float firstValue, float step)
Creates a regular isovalue list with numValues values.
PbIsovaluesList(float min, float max, int numValues)
Constructor of a regular list of numValues isovalues.
PbIsovaluesList()
Default constructor.
PbIsovaluesList(const PbIsovaluesList &isovalList)
Copy constructor.
void setRegularIsoList(float min, float max, int numValues)
Creates a regular isovalue list with numValues values.
void setRegularIsoList(float min, float max)
Creates a new regular isovalue list, but the current number of isovalues is kept.
void setRegularIsoList(int numFloats, const float *values, int numValues)
Creates a regular isovalue list with numValues values.
int operator==(const PbIsovaluesList &isoList)
Equality comparison operator.
void setRegularIsoList(int numFloats, const float *values)
Creates a new regular isovalue list, but the current number of isovalues is kept.
PbIsovaluesList & operator=(const PbIsovaluesList &isovalList)
Assignment operator.
void setRegularIsoList(int numValues)
Creates a regular isovalue list with numValues values.
void setIrregularIsoList(int numValues, const float *values)
Creates an irregular isovalue list with numValues values.
int operator!=(const PbIsovaluesList &isoList)
Inequality comparison operator.
~PbIsovaluesList()
Destructor.
const float * getIsoList(int &numValues, float &min, float &max, float &step, SbBool &isRegularIsoList) const
Returns information about the isovalue list.
int SbBool
Boolean type.
Definition SbBase.h:87