Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added hull="hul-filename" property support to <volume> tag that can u…

…sed thus:

        <layer>
            <volume renderer="MultiPass" hull="cow.osgt.0,-2,-4.trans.50,50,50.scale">CardiacCT</volume>
        </layer>
  • Loading branch information...
commit 91f97152d44d1b4b18c69a0b1e7cc0ea867d5908 1 parent 894fbe9
Robert OSFIELD authored
View
1  include/osgPresentation/deprecated/SlideShowConstructor
@@ -328,6 +328,7 @@ public:
osg::ColorSpaceOperation colorSpaceOperation;
osg::Vec4 colorModulate;
Technique technique;
+ std::string hull;
};
View
6 src/osgPlugins/p3d/ReaderWriterP3D.cpp
@@ -1307,6 +1307,12 @@ void ReaderWriterP3DXML::parseVolume(osgPresentation::SlideShowConstructor& cons
else if (renderer=="MultiPass") volumeData.technique = osgPresentation::SlideShowConstructor::VolumeData::MultiPass;
}
+ std::string hull;
+ if (getProperty(cur, "hull", hull))
+ {
+ volumeData.hull = hull;
+ }
+
if (getProperty(cur, "alpha", volumeData.alphaValue)) {}
if (getProperty(cur, "cutoff", volumeData.cutoffValue)) {}
if (getProperty(cur, "region", volumeData.region)) {}
View
9 src/osgPresentation/deprecated/SlideShowConstructor.cpp
@@ -2816,6 +2816,15 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
}
}
+ if (!volumeData.hull.empty())
+ {
+ osg::ref_ptr<osg::Node> hull = osgDB::readNodeFile(volumeData.hull, _options.get());
+ if (hull.valid())
+ {
+ tile->addChild(hull);
+ }
+ }
+
osg::ref_ptr<osg::Node> model = volume.get();
Please sign in to comment.
Something went wrong with that request. Please try again.