Added Property::getModifiedCount() + dirty() to help with tracking changes. Added VolumeSettings serializers for Property objects
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14421 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -19,12 +19,14 @@
|
||||
using namespace osgVolume;
|
||||
|
||||
|
||||
Property::Property()
|
||||
Property::Property():
|
||||
_modifiedCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
Property::Property(const Property& property,const osg::CopyOp& copyop):
|
||||
osg::Object(property,copyop)
|
||||
osg::Object(property,copyop),
|
||||
_modifiedCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -49,6 +51,7 @@ CompositeProperty::CompositeProperty(const CompositeProperty& compositeProperty,
|
||||
void CompositeProperty::clear()
|
||||
{
|
||||
_properties.clear();
|
||||
dirty();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -136,6 +139,7 @@ AlphaFuncProperty::AlphaFuncProperty(const AlphaFuncProperty& afp,const osg::Cop
|
||||
|
||||
void AlphaFuncProperty::setValue(float v)
|
||||
{
|
||||
dirty();
|
||||
_uniform->set(v);
|
||||
_alphaFunc->setReferenceValue(v);
|
||||
}
|
||||
|
||||
@@ -8,4 +8,5 @@ REGISTER_OBJECT_WRAPPER( osgVolume_Property,
|
||||
osgVolume::Property,
|
||||
"osg::Object osgVolume::Property" )
|
||||
{
|
||||
ADD_UINT_SERIALIZER_NO_SET( ModifiedCount, 0 );
|
||||
}
|
||||
|
||||
@@ -28,4 +28,11 @@ REGISTER_OBJECT_WRAPPER( osgVolume_VolumeSettings,
|
||||
ADD_FLOAT_SERIALIZER( SampleRatioWhenMoving, 1.0f );
|
||||
ADD_FLOAT_SERIALIZER( Cutoff, 0.0f );
|
||||
ADD_FLOAT_SERIALIZER( Transparency, 1.0f );
|
||||
|
||||
ADD_OBJECT_SERIALIZER_NO_SET( SampleRatioProperty, osgVolume::SampleRatioProperty, NULL );
|
||||
ADD_OBJECT_SERIALIZER_NO_SET( SampleRatioWhenMovingProperty, osgVolume::SampleRatioWhenMovingProperty, NULL );
|
||||
ADD_OBJECT_SERIALIZER_NO_SET( CutoffProperty, osgVolume::AlphaFuncProperty, NULL );
|
||||
ADD_OBJECT_SERIALIZER_NO_SET( TransparencyProperty, osgVolume::TransparencyProperty, NULL );
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user