openscenegraph
Public Member Functions
osgSim::ColorRange Class Reference
Inheritance diagram for osgSim::ColorRange:
osgSim::ScalarsToColors osg::Referenced

List of all members.

Public Member Functions

 ColorRange (float min, float max)
 ColorRange (float min, float max, const std::vector< osg::Vec4 > &colors)
void setColors (const std::vector< osg::Vec4 > &colors)
const std::vector< osg::Vec4 > & getColors () const
osg::Vec4 getColor (float scalar) const

Detailed Description

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.


Constructor & Destructor Documentation

osgSim::ColorRange::ColorRange ( float  min,
float  max 
)

Constructor for a ColorRange with a default list of colors set to Red-Yellow-Green-Blue-Cyan

Parameters:
minminimum scalar value
maxmaximum scalar value
osgSim::ColorRange::ColorRange ( float  min,
float  max,
const std::vector< osg::Vec4 > &  colors 
)

Constructor for a ColorRange

Parameters:
minminimum scalar value
maxmaximum scalar value
colorsoptional range of colors,

Member Function Documentation

osg::Vec4 osgSim::ColorRange::getColor ( float  scalar) const [virtual]

Get the color for a given scalar value.

Reimplemented from osgSim::ScalarsToColors.

const std::vector<osg::Vec4>& osgSim::ColorRange::getColors ( ) const [inline]

Get the range of colors

void osgSim::ColorRange::setColors ( const std::vector< osg::Vec4 > &  colors)

Set the range of colors.


The documentation for this class was generated from the following file: