20 #include <osgSim/ColorRange>
21 #include <osgSim/ScalarsToColors>
22 #include <osg/ref_ptr>
#define AGX_DECLARE_POINTER_TYPES(type)
Class that represents a linear scalar color map that converts a scalar interval to a specified color ...
ColorRangePreset
Enum representation of predefined color ranges than can be set in the class.
void setColors(const agxRender::ColorVector &colorVector)
agxRender::ColorVector getColors() const
osg::ref_ptr< osgSim::ColorRange > getOsgColorRange() const
void correctScalarInterval()
void setMaxScalar(agx::Real maxScalar)
Set the maximum scalar of the interval.
void setScalarInterval(agx::Real minScalar, agx::Real maxScalar)
Set the scalars of the interval used in the color interpolation.
void initColorRange(const std::vector< osg::Vec4 > &osgColors)
ScalarColorMap()
Default constructor.
agx::Real getMaxScalar() const
ScalarColorMap(ColorRangePreset preset, agx::Real minScalar, agx::Real maxScalar)
Constructor.
agx::Vec4f getColor(agx::Real scalar, bool modifyAlpha=false) const
Get an agx representation of a color value in the map given a scalar inside the interval.
virtual ~ScalarColorMap()
agx::Real getMinScalar() const
void setMinScalar(agx::Real minScalar)
Set the min scalar of the interval.
osg::ref_ptr< osgSim::ColorRange > m_colorRange
ScalarColorMap(const agxRender::ColorVector &colorVector, agx::Real minScalar, agx::Real maxScalar)
Constructor.
agxRender::ColorVector getColorsFromPreset(ColorRangePreset preset)
void setColorsFromPreset(ColorRangePreset colorRangePreset)
Set a range of colors from an available color range preset in the class.
osg::Vec4 getColorOSG(agx::Real scalar, bool modifyAlpha=false) const
Get an osg representation of a color value in the map given a scalar inside the interval.
Base class providing referencing counted objects.
A class holding 4 dimensional vectors and providing basic arithmetic.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.