Class 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)(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 Detail

      • PbLinearDataMapping

        public PbLinearDataMapping​(PbLinearDataMapping linearDataMap)
        Copy constructor.
      • PbLinearDataMapping

        public PbLinearDataMapping()
        Default constructor.
    • Method Detail

      • clone

        public java.lang.Object clone()
      • 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.
      • 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.
      • setValues

        public void setValues​(float v1,
                              float[] c1,
                              float v2,
                              float[] c2)
        Sets 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.