Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
PbLinearDataMapping.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_LINEAR_DATA_MAPPING_
25#define _PB_LINEAR_DATA_MAPPING_
26
27#include <MeshViz/graph/PbDataMapping.h>
28
51
52 public:
53
58
63
68
72 void setValues(float v1, const SbColor &c1, float v2, const SbColor &c2) ;
73
77 void setValues(float v1, const SbColor &c1, float t1, float v2, const SbColor &c2, float t2) ;
78
83 void setValues(float v1, const PbHLSColor c1, float v2, const PbHLSColor c2) ;
84
89 void setValues(float v1, const PbHLSColor c1, float t1, float v2, const PbHLSColor c2, float t2) ;
90
95 void getValues(float &v1, SbColor &c1, float &v2, SbColor &c2) const ;
96
101 void getValues(float &v1, SbColor &c1, float &t1, float &v2, SbColor &c2, float &t2) const ;
102
108 void getValues(float &v1, PbHLSColor c1, float &v2, PbHLSColor c2) const ;
109
115 void getValues(float &v1, PbHLSColor c1, float &t1, float &v2, PbHLSColor c2, float &t2) const ;
116
117 /*---------------------------------------------------------------------------*/
118 private:
119 virtual ClassType getClassType() const
120 { return LINEAR_DATA_MAPPING ;}
121
122 private:
123 // Used by constructor per copy and affectation operator
124 void copy(const PbLinearDataMapping &linearDataMap, SbBool isConstructorPerCopy) ;
125
126 const SbColor* computeColor(float value) const;
127 const SbColor* computeColor(float value, float &transparency) const;
128
129 float m_val1, m_val2, m_transparency1, m_transparency2;
130 SbColor m_color1, m_color2 ;
131} ;
132/*----------------------------------------------------------------------------*/
133
134#endif /* _PB_LINEAR_DATA_MAPPING_ */
135
<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 linear d...
void getValues(float &v1, PbHLSColor c1, float &t1, float &v2, PbHLSColor c2, float &t2) const
Gets the current values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1,...
void setValues(float v1, const PbHLSColor c1, float v2, const PbHLSColor c2)
Sets values v1,v2 and the associated HLS colors c1, c2.
void setValues(float v1, const SbColor &c1, float v2, const SbColor &c2)
Sets values v1,v2 and the associated RGB colors c1, c2.
void getValues(float &v1, PbHLSColor c1, float &v2, PbHLSColor c2) const
Gets the current values v1,v2 and the associated HLS colors c1, c2.
void setValues(float v1, const SbColor &c1, float t1, float v2, const SbColor &c2, float t2)
Sets values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1,...
void setValues(float v1, const PbHLSColor c1, float t1, float v2, const PbHLSColor c2, float t2)
Sets values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1,...
void getValues(float &v1, SbColor &c1, float &v2, SbColor &c2) const
Gets the current values v1,v2 and the associated RGB colors c1, c2.
PbLinearDataMapping(const PbLinearDataMapping &linearDataMap)
Copy constructor.
PbLinearDataMapping()
Default constructor.
void getValues(float &v1, SbColor &c1, float &t1, float &v2, SbColor &c2, float &t2) const
Gets the current values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1,...
PbLinearDataMapping & operator=(const PbLinearDataMapping &linearDataMap)
Assignment operator.
Color vector class.
Definition SbColor.h:82
int SbBool
Boolean type.
Definition SbBase.h:87