Ground work for full .osg support for osg::TransferFunction*

This commit is contained in:
Robert Osfield
2009-02-01 12:38:55 +00:00
parent a13c6405d8
commit d6b0cd64f1
5 changed files with 93 additions and 1 deletions

View File

@@ -27,12 +27,17 @@ namespace osg {
* Typically uses include mapping heights to colours when contouring terrain,
* or mapping intensities to colours when volume rendering.
*/
class OSG_EXPORT TransferFunction : public osg::Referenced
class OSG_EXPORT TransferFunction : public osg::Object
{
public :
TransferFunction();
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
TransferFunction(const TransferFunction& tf, const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg, TransferFunction)
osg::Image* getImage() { return _image.get(); }
const osg::Image* getImage() const { return _image.get(); }
@@ -53,6 +58,11 @@ class OSG_EXPORT TransferFunction1D : public osg::TransferFunction
TransferFunction1D();
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
TransferFunction1D(const TransferFunction1D& tf, const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg, TransferFunction1D)
void setInputRange(float minimum, float maximum);
void setMinimum(float value) { _minimum = value; }