ColorRange
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGSIM_COLORRANGE
#define OSGSIM_COLORRANGE 1
#include <osgSim/Export>
#include <osgSim/ScalarsToColors>
#include <vector>
namespace osgSim
{
class OSGSIM_EXPORT ColorRange: public ScalarsToColors
{
public:
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 { return _colors; }
osg::Vec4 getColor(float scalar) const;
private:
// Default assignment and copy construction are OK.
std::vector<osg::Vec4> _colors;
};
}
#endif
ScalarsToColors
osgSim::ColorRange::ColorRange
ColorRange(float min, float max, const std::vector< osg::Vec4 > &colors)
osgSim::ColorRange::getColors
const std::vector< osg::Vec4 > & getColors() const
Definition ColorRange:52
osgSim::ColorRange::ColorRange
ColorRange(float min, float max)
osgSim::ColorRange::getColor
osg::Vec4 getColor(float scalar) const
osgSim::ColorRange::setColors
void setColors(const std::vector< osg::Vec4 > &colors)
osgSim::ScalarsToColors::ScalarsToColors
ScalarsToColors(float scalarMin, float scalarMax)
osgSim
Definition BlinkSequence:27
osg::Vec4
Vec4f Vec4
Definition Vec4:21
Export
OSGSIM_EXPORT
#define OSGSIM_EXPORT
Definition osgSim/Export:38