Package com.openinventor.meshviz.graph
Class PbLinearDataMapping
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.meshviz.graph.PbBase
-
- com.openinventor.meshviz.graph.PbDataMapping
-
- com.openinventor.meshviz.graph.PbLinearDataMapping
-
- All Implemented Interfaces:
java.lang.Cloneable
public class PbLinearDataMapping extends PbDataMapping implements java.lang.Cloneable
Class to define linear data mapping. This class is used to define linear data mapping. This object defines a linear association between colors, transparencies and floating-point values. In other words, this association is defined by 2 functions F(c,v) and F(c,t):
F(c,v) and F(t,v) are linear, so only two values (v1 and v2), two associated transparencies(t1,t2) and two associated colors (c1 and c2) define these functions. For a given value vi, its color ci is determined by linear interpolation between (v1,c1) and (v2,c2). Idem for the transparencies. By default v1=0, v2=0, c1=(0,0,0) (black), c2=(1,1,1) (white), t1=t2=0.0 (opaque).F(c,v)(V) = C (with c being a color and v being a value). F(t,v)(V) = T (with t being a transparency and v being a value).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PbLinearDataMapping.HLSMapping
static class
PbLinearDataMapping.HLSTransparencyMapping
static class
PbLinearDataMapping.RGBMapping
static class
PbLinearDataMapping.RGBTransparencyMapping
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description PbLinearDataMapping()
Default constructor.PbLinearDataMapping(PbLinearDataMapping linearDataMap)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
PbLinearDataMapping.HLSTransparencyMapping
getHLSAValues()
Gets the current values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1, c2.PbLinearDataMapping.HLSMapping
getHLSValues()
Gets the current values v1,v2 and the associated HLS colors c1, c2.PbLinearDataMapping.RGBTransparencyMapping
getRGBAValues()
Gets the current values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1, c2.PbLinearDataMapping.RGBMapping
getRGBValues()
Gets the current values v1,v2 and the associated RGB colors c1, c2.void
setValues(float v1, float[] c1, float v2, float[] c2)
Sets values v1,v2 and the associated HLS colors c1, c2.void
setValues(float v1, float[] c1, float t1, float v2, float[] c2, float t2)
Sets values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1, c2.void
setValues(float v1, SbColor c1, float t1, float v2, SbColor c2, float t2)
Sets values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1, c2.void
setValues(float v1, SbColor c1, float v2, SbColor c2)
Sets values v1,v2 and the associated RGB colors c1, c2.-
Methods inherited from class com.openinventor.meshviz.graph.PbDataMapping
enableThresholds, enableTransparency, getHLSColor, getTransparencyValueDeletedParts, isTransparencyEnabled, setMaxThreshold, setMaxThreshold, setMaxThreshold, setMaxThreshold, setMaxThreshold, setMinThreshold, setMinThreshold, setMinThreshold, setMinThreshold, setMinThreshold, setTransparencyValueDeletedParts, thresholdsEnabled
-
Methods inherited from class com.openinventor.meshviz.graph.PbBase
enableConnection, isConnectionEnabled, touch
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
PbLinearDataMapping
public PbLinearDataMapping(PbLinearDataMapping linearDataMap)
Copy constructor.
-
PbLinearDataMapping
public PbLinearDataMapping()
Default constructor.
-
-
Method Detail
-
clone
public java.lang.Object clone()
-
getHLSAValues
public PbLinearDataMapping.HLSTransparencyMapping getHLSAValues()
Gets the current values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1, c2.
-
setValues
public void setValues(float v1, float[] c1, float t1, float v2, float[] c2, float t2)
Sets values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1, c2.
-
getRGBAValues
public PbLinearDataMapping.RGBTransparencyMapping getRGBAValues()
Gets the current values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1, c2.
-
setValues
public void setValues(float v1, SbColor c1, float t1, float v2, SbColor c2, float t2)
Sets values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1, c2.
-
getRGBValues
public PbLinearDataMapping.RGBMapping getRGBValues()
Gets the current values v1,v2 and the associated RGB colors c1, c2.
-
setValues
public void setValues(float v1, float[] c1, float v2, float[] c2)
Sets values v1,v2 and the associated HLS colors c1, c2.
-
getHLSValues
public PbLinearDataMapping.HLSMapping getHLSValues()
Gets the current values v1,v2 and the associated HLS colors c1, c2.
-
-