Package com.openinventor.meshviz.graph
Class PbNonLinearDataMapping2
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.meshviz.graph.PbBase
com.openinventor.meshviz.graph.PbDataMapping
com.openinventor.meshviz.graph.PbNonLinearDataMapping2
- All Implemented Interfaces:
Cloneable
Class to define non linear data mapping.
This object defines a non 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):
There are two ways to express F(c,v)(V):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).
- F(c,v)(V) is non linear, but linear per level, so a list of values sorted in increasing order and a list of colors associated define this function. Thus, the association is (V1,C1), (V2,C2),...,(Vn,Cn) with V1 < V2 <...< Vn. For a given value vi, Vk <= vi <= Vk+1, the associated color ci is determined by a linear interpolation between (Vk,Ck) and (Vk+1,Ck+1).
- F(c,v)(V) is defined by level, so a list of n values sorted in increasing order and a list of n+1 colors associated define this function. Thus, the association is C1, (V1,C2), (V2,C3),...,(Vn,Cn+1) with V1 < V2 <...< Vn. For a given value vi, Vk <= vi < Vk+1, the associated color ci is Ck+1. If vi < V1, the associated color ci is C1. In the two methods, the list of values is sorted in increasing order (and the associated colors also). By default, F(c,v)(V) is linear by level (LINEAR_PER_LEVEL), the number of colors and values is 2 with V1=0, V2=0, C1=(0,0,0) (black) and C2=(1,1,1) (white).
There are as well, two ways to express F(t,v)(V)
-
Nested Class Summary
Nested ClassesNested 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
ConstructorsConstructorDescriptionDefault constructor.PbNonLinearDataMapping2
(PbNonLinearDataMapping2 nonLinearDataMap2) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Gets the list of RGB colors defining the current non linear data mapping.Gets the list of transparencies defining the current non linear data mapping.Gets the list of values defining the current non linear data mapping.SbColor[]
Gets the list of RGB colors defining the current non linear data mapping.float[]
Gets the list of transparencies defining the current non linear data mapping.getType()
Returns the data mapping type.float[]
Gets the list of values defining the current non linear data mapping.void
setValues
(PbNonLinearDataMapping2.Types type, float[] v, SbColor[] c) Sets non linear function for data mapping, with RGB color.void
setValues
(PbNonLinearDataMapping2.Types type, float[] v, SbColor[] c, float[] t) Sets non linear function for data mapping, with RGB color and transparencies.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 Details
-
PbNonLinearDataMapping2
public PbNonLinearDataMapping2()Default constructor. -
PbNonLinearDataMapping2
Copy constructor.
-
-
Method Details
-
clone
-
setValues
Sets non linear function for data mapping, with RGB color and transparencies. If type = NON_LINEAR_PER_LEVEL, the number of colors and transparencies must be equal to numValues + 1, otherwise it must be equal to numValues. -
getValuesList
public float[] getValuesList()Gets the list of values defining the current non linear data mapping. -
getDirectTransparencyList
Gets the list of transparencies defining the current non linear data mapping. -
getDirectValuesList
Gets the list of values defining the current non linear data mapping. -
getTransparencyList
public float[] getTransparencyList()Gets the list of transparencies defining the current non linear data mapping. -
setValues
Sets non linear function for data mapping, with RGB color. If type = NON_LINEAR_PER_LEVEL, the number of colors must be equal to numValues + 1, otherwise it must be equal to numValues. -
getRGBColorsList
Gets the list of RGB colors defining the current non linear data mapping. -
getType
Returns the data mapping type. -
getDirectRGBColorsList
Gets the list of RGB colors defining the current non linear data mapping.
-