Class PbLinearDataMapping

All Implemented Interfaces:
Cloneable

public class PbLinearDataMapping extends PbDataMapping implements 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)(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) 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).
  • Constructor Details

    • PbLinearDataMapping

      public PbLinearDataMapping(PbLinearDataMapping linearDataMap)
      Copy constructor.
    • PbLinearDataMapping

      public PbLinearDataMapping()
      Default constructor.
  • Method Details

    • clone

      public Object clone()
    • 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

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

      public void setValues(float v1, SbColor c1, float v2, SbColor c2)
      Sets values v1,v2 and the associated RGB colors c1, c2.