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:

PoNonLinearDataMapping2 {

    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
}
  • Field Details

    • 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 Details

    • PoNonLinearDataMapping2

      public PoNonLinearDataMapping2()
      Constructor.