Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
PbNonLinearDataMapping2.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_NON_LINEAR_DATA_MAPPING2_
25#define _PB_NON_LINEAR_DATA_MAPPING2_
26
27#include <MeshViz/graph/PbDataMapping.h>
28
63
64 public:
65
73
74
75
80
85
90
95
102 void setValues(Type type, int numValues, const float *v, const SbColor *c) ;
103
110 void setValues(Type type, int numValues, const float *v, const SbColor *c, const float *t) ;
111
118 void setValues(Type type, int numValues, const float *v, const PbHLSColor *c) ;
119
126 void setValues(Type type, int numValues, const float *v, const PbHLSColor *c, const float *t) ;
127
133 const float* getValuesList(int &numValues) const { numValues = m_nbValues ; return m_valuesList ; }
134
140 const SbColor* getRGBColorsList(int &numColors) const { numColors = m_nbColors ; return m_colorsList ;}
141
146 const PbHLSColor* getHLSColorsList(int &numColors) ;
147
153 const float * getTransparencyList(int &num_transparency) const { num_transparency = m_nbColors ; return m_transparencyList ;}
154
158 Type getType() const
159 { return m_typeMapping ; }
160
161 /*---------------------------------------------------------------------------*/
162 private:
163 virtual ClassType getClassType() const
164 { return NON_LINEAR_DATA_MAPPING2 ;}
165
166 private:
167 // Used by constructor per copy and affectation operator
168 void copy(const PbNonLinearDataMapping2 &nonLinearDataMap2, SbBool isConstructorPerCopy) ;
169
170 const SbColor* computeColor(float value) const;
171 const SbColor* computeColor(float value, float &transparency) const;
172
173 void sortColorsValues() ;
174 void sortColorsTransparenciesValues();
175
176 SbColor *m_colorsList ;
177 float *m_valuesList ;
178 float *m_transparencyList;
179 PbHLSColor *m_hlsList ;
180 int m_nbColors, m_nbValues ;
181 Type m_typeMapping ;
182} ;
183
184/*----------------------------------------------------------------------------*/
185
186#endif /* _PB_NON_LINEAR_DATA_MAPPING2_ */
187
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for data ...
float PbHLSColor[3]
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to define non line...
const SbColor * getRGBColorsList(int &numColors) const
Gets the list of RGB colors defining the current non linear data mapping.
const PbHLSColor * getHLSColorsList(int &numColors)
Gets the list of HLS colors defining the current non linear data mapping.
void setValues(Type type, int numValues, const float *v, const PbHLSColor *c, const float *t)
Sets non linear function for data mapping, with HLS color and transparencies.
void setValues(Type type, int numValues, const float *v, const SbColor *c, const float *t)
Sets non linear function for data mapping, with RGB color and transparencies.
const float * getValuesList(int &numValues) const
Gets the list of values defining the current non linear data mapping.
void setValues(Type type, int numValues, const float *v, const PbHLSColor *c)
Sets non linear function for data mapping, with HLS color.
PbNonLinearDataMapping2(const PbNonLinearDataMapping2 &nonLinearDataMap2)
Copy constructor.
PbNonLinearDataMapping2()
Default constructor.
Type getType() const
Returns the data mapping type.
PbNonLinearDataMapping2 & operator=(const PbNonLinearDataMapping2 &nonLinearDataMap2)
Assignment operator.
~PbNonLinearDataMapping2()
Destructor.
void setValues(Type type, int numValues, const float *v, const SbColor *c)
Sets non linear function for data mapping, with RGB color.
const float * getTransparencyList(int &num_transparency) const
Gets the list of transparencies defining the current non linear data mapping.
Color vector class.
Definition SbColor.h:82
int SbBool
Boolean type.
Definition SbBase.h:87