OpenSceneGraph 3.6.5
ScalarsToColors
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGSIM_SCALARSTCOLORS
15#define OSGSIM_SCALARSTCOLORS 1
16
17#include <osgSim/Export>
18
19#include <osg/Vec4>
20#include <osg/Referenced>
21
22namespace osgSim
23{
31{
32public:
33
34 ScalarsToColors(float scalarMin, float scalarMax);
35 virtual ~ScalarsToColors() {}
36
38 virtual osg::Vec4 getColor(float scalar) const;
39
41 float getMin() const;
42
44 float getMax() const;
45
46private:
47
48 float _min, _max;
49};
50
51}
52
53#endif
Vec4f Vec4
Definition Vec4:21
The osgSim library is a NodeKit that extends the core scene graph to support nodes and drawables that...
Definition BlinkSequence:27
Base class for providing reference counted objects.
Definition Referenced:44
virtual ~ScalarsToColors()
Definition ScalarsToColors:35
float getMin() const
Get the minimum scalar value.
float getMax() const
Get the maximum scalar value.
ScalarsToColors(float scalarMin, float scalarMax)
virtual osg::Vec4 getColor(float scalar) const
Get the color for a given scalar value.
#define OSGSIM_EXPORT
Definition Export:38

osg logo
Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.