Added AlphaFunc support into osgVolume::AlphaFuncProperty.

This commit is contained in:
Robert Osfield
2009-01-20 12:39:26 +00:00
parent 8a971d96d2
commit 87cd4530f5
11 changed files with 51 additions and 19 deletions

View File

@@ -106,11 +106,19 @@ IsoSurfaceProperty::IsoSurfaceProperty(const IsoSurfaceProperty& isp,const osg::
AlphaFuncProperty::AlphaFuncProperty(float value):
ScalarProperty("AlphaFuncValue",value)
{
_alphaFunc = new osg::AlphaFunc(osg::AlphaFunc::GREATER, value);
}
AlphaFuncProperty::AlphaFuncProperty(const AlphaFuncProperty& afp,const osg::CopyOp& copyop):
ScalarProperty(afp, copyop)
{
_alphaFunc = new osg::AlphaFunc(osg::AlphaFunc::GREATER, getValue());
}
void AlphaFuncProperty::setValue(float v)
{
_uniform->set(v);
_alphaFunc->setReferenceValue(v);
}
/////////////////////////////////////////////////////////////////////////////