Changed osg::ImageSequence::set/getDuration to set/getLength() to be in keeping with the

osg::ImageStream's getLength().
This commit is contained in:
Robert Osfield
2008-08-15 16:21:44 +00:00
parent b6292f4537
commit 38f6cddc2c
6 changed files with 60 additions and 46 deletions

View File

@@ -35,7 +35,7 @@ void ImageSequence::write(DataOutputStream* out)
out->writeInt(getMode());
out->writeDouble(getDuration());
out->writeDouble(getLength());
out->writeUInt(getFileNames().size());
for(FileNames::iterator itr = getFileNames().begin();
@@ -76,7 +76,7 @@ void ImageSequence::read(DataInputStream* in)
setMode((osg::ImageSequence::Mode)(in->readInt()));
setDuration(in->readDouble());
setLength(in->readDouble());
unsigned int numFileNames = in->readUInt();
if (numFileNames>0)

View File

@@ -47,10 +47,10 @@ bool ImageSequence_readLocalData(Object& obj, Input& fr)
}
}
double duration;
if (fr.read("Duration", duration))
double length;
if (fr.read("Duration", length) || fr.read("Length", length) )
{
is.setDuration(duration);
is.setLength(length);
}
if (fr.matchSequence("FileNames {"))
@@ -108,7 +108,7 @@ bool ImageSequence_writeLocalData(const Object& obj, Output& fw)
break;
}
fw.indent()<<"Duration "<<is.getDuration()<<std::endl;
fw.indent()<<"Length "<<is.getLength()<<std::endl;
if (!is.getFileNames().empty())
{