Added hull="hul-filename" property support to <volume> tag that can used thus:
<layer> <volume renderer="MultiPass" hull="cow.osgt.0,-2,-4.trans.50,50,50.scale">CardiacCT</volume> </layer>
This commit is contained in:
parent
1264ec736a
commit
e8cd06c6e9
@ -328,6 +328,7 @@ public:
|
||||
osg::ColorSpaceOperation colorSpaceOperation;
|
||||
osg::Vec4 colorModulate;
|
||||
Technique technique;
|
||||
std::string hull;
|
||||
};
|
||||
|
||||
|
||||
|
@ -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)) {}
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user