## class OSGSIM_EXPORT osgSim::ColorRange

> ColorRange is a ScalarsToColors object to define a color spectrum for a scalar range.

## Inheritance:

### Public Methods

ColorRange(float min, float max, const std::vector<osg::Vec4>& colors = std::vector<osg::Vec4>())
  Constructor for a ColorRange
void setColors(const std::vector<osg::Vec4>& colors)
  Set the range of colors.
osg::Vec4 getColor(float scalar) const
  Get the color for a given scalar value.

### Inherited from ScalarsToColors:

### Public Methods

float getMin() const
float getMax() const

## Documentation

> ColorRange is a ScalarsToColors object to define a color spectrum for a scalar range. An optional vector of colors may be passed in at construction time. The range of colors will be mapped to the scalar range, and interpolation between the colors will be performed as necessary. By default, the color range will run Red-Yellow-Green-Cyan-Blue.

`ColorRange(float min, float max, const std::vector<osg::Vec4>& colors = std::vector<osg::Vec4>())`
  Constructor for a ColorRange
  Parameters:
    min - minimum scalar value
    max - maximum scalar value
    colors - optional range of colors, defaulting to Red-Yellow-Green-Blue-Cyan

`void setColors(const std::vector<osg::Vec4>& colors)`
  Set the range of colors.

`osg::Vec4 getColor(float scalar) const`
  Get the color for a given scalar value.

This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java

This page was generated with the help of DOC++.