Hi, I've been using osgSim::ScalarBar to display fixed range color values (e.g. red from 1-2, green from 3-4 etc), by setting the _numColors the same as the number of actual colors in the ColorRange.
Currently if you do this you get strange looking results as the colors are calculated for values in the centre of each color step, so if your steps are large, the colors are interpolated sigificantly (see screen grab of red, green and blue colors for illustration). I've attached a fix which just uses the original color values whenever _numColors equals the number of actual defined colors in the ColorRange. I doubt anyone would want interpolated colors in these circumstances. Cheers, jamie ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62645#62645 Attachments: http://forum.openscenegraph.org//files/scalarbar_202.cpp http://forum.openscenegraph.org//files/scalarbar_exact_colors_191.png _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
