maspack.render.color
Class RainbowColorMap

java.lang.Object
  extended by maspack.render.color.ColorMapBase
      extended by maspack.render.color.InterpolatingColorMap
          extended by maspack.render.color.RainbowColorMap
All Implemented Interfaces:
java.lang.Cloneable, CompositeProperty, HasProperties, ColorMap, Clonable, Scannable

public class RainbowColorMap
extends InterpolatingColorMap

Similar to JetColorMap, interpolates in HSV space

Author:
Antonio

Field Summary
static PropertyList myProps
           
static java.awt.Color[] rainbow
           
 
Fields inherited from class maspack.render.color.InterpolatingColorMap
defaultColorArray
 
Constructor Summary
RainbowColorMap()
           
RainbowColorMap(java.awt.Color[] colors)
           
 
Method Summary
 RainbowColorMap copy()
           
 PropertyList getAllPropertyInfo()
          Returns a list giving static information about all properties exported by this object.
 void getHSV(double a, double[] hsv)
          Fills an array with the interpolated color values in HSV format
 void getHSV(double a, float[] hsv)
          Fills an array with the interpolated color values in HSV format
 void getRGB(double a, double[] rgb)
          Fills an array with the interpolated color values in RGB format
 void getRGB(double a, float[] rgb)
          Fills an array with the interpolated color values in RGB format
 void setColorArray(java.awt.Color[] colors)
          Sets the list of colors within which to interpolate.
 
Methods inherited from class maspack.render.color.InterpolatingColorMap
clone, getColor, getColorArray, getColorString, getColorString, setColorString
 
Methods inherited from class maspack.render.color.ColorMapBase
getColor3Value, getColor4Value, getProperty, getPropertyHost, getPropertyInfo, getSubClasses, isWritable, scan, setPropertyHost, setPropertyInfo, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rainbow

public static java.awt.Color[] rainbow

myProps

public static PropertyList myProps
Constructor Detail

RainbowColorMap

public RainbowColorMap()

RainbowColorMap

public RainbowColorMap(java.awt.Color[] colors)
Method Detail

getAllPropertyInfo

public PropertyList getAllPropertyInfo()
Description copied from interface: HasProperties
Returns a list giving static information about all properties exported by this object.

Specified by:
getAllPropertyInfo in interface HasProperties
Overrides:
getAllPropertyInfo in class InterpolatingColorMap
Returns:
static information for all exported properties

setColorArray

public void setColorArray(java.awt.Color[] colors)
Sets the list of colors within which to interpolate. These colors are evenly distributed in the interval [0, 1], and interpolation is linear between any pairs

Overrides:
setColorArray in class InterpolatingColorMap

getRGB

public void getRGB(double a,
                   double[] rgb)
Description copied from interface: ColorMap
Fills an array with the interpolated color values in RGB format

Specified by:
getRGB in interface ColorMap
Overrides:
getRGB in class InterpolatingColorMap
Parameters:
a - input, usually in the range [0,1]
rgb - output color

getRGB

public void getRGB(double a,
                   float[] rgb)
Description copied from interface: ColorMap
Fills an array with the interpolated color values in RGB format

Specified by:
getRGB in interface ColorMap
Overrides:
getRGB in class InterpolatingColorMap
Parameters:
a - input, usually in the range [0,1]
rgb - output color

getHSV

public void getHSV(double a,
                   double[] hsv)
Description copied from interface: ColorMap
Fills an array with the interpolated color values in HSV format

Specified by:
getHSV in interface ColorMap
Overrides:
getHSV in class InterpolatingColorMap
Parameters:
a - input, usually in the range [0,1]
hsv - output color

getHSV

public void getHSV(double a,
                   float[] hsv)
Description copied from interface: ColorMap
Fills an array with the interpolated color values in HSV format

Specified by:
getHSV in interface ColorMap
Overrides:
getHSV in class InterpolatingColorMap
Parameters:
a - input, usually in the range [0,1]
hsv - output color

copy

public RainbowColorMap copy()
Specified by:
copy in class InterpolatingColorMap