Added support for new SampleDensityWhenMovingProperty into .p3d format, with it default to 0.02.

One can override this value via the sampleDensityWhenMoving="value" property in the volume tag, i.e.

         <volume sampleDensityWhenMoving="0.01">CardiacCT</volume>

To switch the feature off set the value to 0, i.e.

         <volume sampleDensityWhenMoving="0">CardiacCT</volume>
This commit is contained in:
Robert Osfield
2011-03-17 17:33:02 +00:00
parent 89eadcfe82
commit 6b67320190
3 changed files with 6 additions and 1 deletions

View File

@@ -1004,6 +1004,7 @@ void ReaderWriterP3DXML::parseVolume(osgPresentation::SlideShowConstructor& cons
if (getProperty(cur, "cutoff", volumeData.cutoffValue)) {}
if (getProperty(cur, "region", 6, volumeData.region)) {}
if (getProperty(cur, "sampleDensity", volumeData.sampleDensityValue)) {}
if (getProperty(cur, "sampleDensityWhenMoving", volumeData.sampleDensityWhenMovingValue)) {}
// check for any transfer function required
std::string transferFunctionFile;