From 537272b98f0e49e0593bf4264f74b4acb53847bc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 7 Jun 2011 16:17:35 +0000 Subject: [PATCH] Added support for .osgt, .osgb and .osgx plugins to osgvolume example --- examples/osgvolume/osgvolume.cpp | 4 ++-- .../osgVolume/SampleDensityProperty.cpp | 21 +++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/examples/osgvolume/osgvolume.cpp b/examples/osgvolume/osgvolume.cpp index b28214d7d..2bb6f9bc4 100644 --- a/examples/osgvolume/osgvolume.cpp +++ b/examples/osgvolume/osgvolume.cpp @@ -1653,7 +1653,7 @@ int main( int argc, char **argv ) { std::string ext = osgDB::getFileExtension(outputFile); std::string name_no_ext = osgDB::getNameLessExtension(outputFile); - if (ext=="osg") + if (ext=="osg" || ext=="osgt" || ext=="osgx" ) { if (image_3d.valid()) { @@ -1662,7 +1662,7 @@ int main( int argc, char **argv ) } osgDB::writeNodeFile(*volume, outputFile); } - else if (ext=="ive") + else if (ext=="ive" || ext=="osgb" ) { osgDB::writeNodeFile(*volume, outputFile); } diff --git a/src/osgWrappers/serializers/osgVolume/SampleDensityProperty.cpp b/src/osgWrappers/serializers/osgVolume/SampleDensityProperty.cpp index 8f5dc6f32..9291e7553 100644 --- a/src/osgWrappers/serializers/osgVolume/SampleDensityProperty.cpp +++ b/src/osgWrappers/serializers/osgVolume/SampleDensityProperty.cpp @@ -3,9 +3,22 @@ #include #include -REGISTER_OBJECT_WRAPPER( osgVolume_SampleDensityProperty, - new osgVolume::SampleDensityProperty, - osgVolume::SampleDensityProperty, - "osg::Object osgVolume::Property osgVolume::ScalarProperty osgVolume::SampleDensityProperty" ) +namespace osgVolume_SampleDensityProperty { + REGISTER_OBJECT_WRAPPER( osgVolume_SampleDensityProperty, + new osgVolume::SampleDensityProperty, + osgVolume::SampleDensityProperty, + "osg::Object osgVolume::Property osgVolume::ScalarProperty osgVolume::SampleDensityProperty" ) + { + } +} + +namespace osgVolume_SampleDensityWhenMovingProperty +{ + REGISTER_OBJECT_WRAPPER( osgVolume_SampleDensityWhenMovingProperty, + new osgVolume::SampleDensityWhenMovingProperty, + osgVolume::SampleDensityWhenMovingProperty, + "osg::Object osgVolume::Property osgVolume::ScalarProperty osgVolume::SampleDensityWhenMovingProperty" ) + { + } }