## Class PoNonLinearDataMapping2

• All Implemented Interfaces:
`SafeDisposable`

```public class PoNonLinearDataMapping2
extends PoDataMapping```
Node class to define a non linear data mapping. This node defines the current data mapping for all subsequent MeshViz representations which use it. There is no data mapping until a `PoDataMapping` node is traversed.

This node 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):

```      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).
```
There are two ways to express F(c,v)(V):

• 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).

There are as well, two ways to express F(t,v)(V)

File format/default:

 type LINEAR_PER_LEVEL value 0 color 0 0 0 transparency 0 minThresholdEnabled false minThreshold 0 minThresholdColor 0 0 0 minThresholdTransparency 0.0 maxThresholdEnabled false maxThreshold 1 maxThresholdColor 0 0 0 maxThresholdTransparency 0.0 transparencyEnabled false transparencyValueDeletedParts 0.95
}
• ### Nested Class Summary

Nested Classes
Modifier and Type Class Description
`static class ` `PoNonLinearDataMapping2.Types`
Data mapping type.
• ### Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode

`SoNode.RenderModes`
• ### Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor

`Inventor.ConstructorCommand`
• ### Field Summary

Fields
Modifier and Type Field Description
`SoMFColor` `color`
Defines the list of colors for the data mapping.
`SoMFFloat` `transparency`
Defines the list of transparencies for the data mapping.
`SoSFEnum<PoNonLinearDataMapping2.Types>` `type`
Defines the type of data mapping.
`SoMFFloat` `value`
Defines the list of values for the data mapping.
• ### Fields inherited from class com.openinventor.meshviz.nodes.PoDataMapping

`maxThreshold, maxThresholdColor, maxThresholdEnabled, maxThresholdTransparency, minThreshold, minThresholdColor, minThresholdEnabled, minThresholdTransparency, transparencyEnabled, transparencyValueDeletedParts`
• ### Fields inherited from class com.openinventor.inventor.Inventor

`VERBOSE_LEVEL, ZeroHandle`
• ### Constructor Summary

Constructors
Constructor Description
`PoNonLinearDataMapping2()`
Constructor.

• ### Methods inherited from class com.openinventor.meshviz.nodes.PoNode

`callback, doAction, getBoundingBox, getMatrix, getPrimitiveCount, GLRender, handleEvent, pick, search, write`
• ### Methods inherited from class com.openinventor.inventor.nodes.SoNode

`affectsState, copy, copy, distribute, getAlternateRep, getByName, getRenderEngineMode, getRenderUnitID, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, isBoundingBoxIgnoring, isOverride, rayPick, setOverride, touch`
• ### Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer

`copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults`
• ### Methods inherited from class com.openinventor.inventor.misc.SoBase

`dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable`
• ### Methods inherited from class com.openinventor.inventor.Inventor

`getNativeResourceHandle`
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### type

`public final SoSFEnum<PoNonLinearDataMapping2.Types> type`
Defines the type of data mapping.
• #### value

`public final SoMFFloat value`
Defines the list of values for the data mapping.
• #### color

`public final SoMFColor color`
Defines the list of colors for the data mapping. The number of colors must be >= the number of values + 1 if the type is NON_LINEAR_PER_LEVEL and >= the number of values otherwise.
• #### transparency

`public final SoMFFloat transparency`
Defines the list of transparencies for the data mapping. To be taken into account the number of transparencies must be equal to the number of colors, otherwise transparencies are ignored.
• ### Constructor Detail

• #### PoNonLinearDataMapping2

`public PoNonLinearDataMapping2()`
Constructor.