Show
Ignore:
Timestamp:
02/10/09 19:51:43 (6 years ago)
Author:
robert
Message:

Merged fixes to osgVolume's handling of ImageSequence? animated volumes, merge command:

svn merge -r 9746:9747 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.8

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp

    r9618 r9748  
    809809    arguments.getApplicationUsage()->addCommandLineOption("--rescale","Enable the rescale of the pixel data to 0.0 to 1.0 range (default)."); 
    810810    arguments.getApplicationUsage()->addCommandLineOption("--shift-min-to-zero","Shift the pixel data so min value is 0.0."); 
     811    arguments.getApplicationUsage()->addCommandLineOption("--sequence-length <num>","Set the length of time that a sequence of images with run for."); 
     812    arguments.getApplicationUsage()->addCommandLineOption("--sd <num>","Short hand for --sequence-length"); 
    811813//    arguments.getApplicationUsage()->addCommandLineOption("--raw <sizeX> <sizeY> <sizeZ> <numberBytesPerComponent> <numberOfComponents> <endian> <filename>","read a raw image data"); 
    812814 
     
    960962    while(arguments.read("--gpu-tf")) { gpuTransferFunction = true; } 
    961963    while(arguments.read("--cpu-tf")) { gpuTransferFunction = false; } 
     964 
     965    double sequenceLength = 10.0; 
     966    while(arguments.read("--sequence-duration", sequenceLength) ||  
     967          arguments.read("--sd", sequenceLength)) {} 
    962968 
    963969    typedef std::list< osg::ref_ptr<osg::Image> > Images; 
     
    12501256     
    12511257        osg::ref_ptr<osg::ImageSequence> imageSequence = new osg::ImageSequence; 
    1252         imageSequence->setLength(10.0); 
     1258        imageSequence->setLength(sequenceLength); 
    12531259        image_3d = imageSequence.get(); 
    12541260        for(Images::iterator itr = images.begin();