Added support for new PagedLOD Radius and NumChildrenThatCannorBeExpired variables

to .osg and .ive support.
This commit is contained in:
Robert Osfield
2003-12-09 14:06:48 +00:00
parent f46cbe60dc
commit d76cef6f8e
2 changed files with 28 additions and 0 deletions

View File

@@ -27,6 +27,22 @@ bool PagedLOD_readLocalData(Object& obj, Input& fr)
PagedLOD& lod = static_cast<PagedLOD&>(obj);
float radius;
if (fr[0].matchWord("Radius") && fr[1].getFloat(radius))
{
lod.setRadius(radius);
fr+=2;
iteratorAdvanced = true;
}
unsigned int num;
if (fr[0].matchWord("NumChildrenThatCannotBeExpired") && fr[1].getUInt(num))
{
lod.setNumChildrenThatCannotBeExpired(num);
fr+=2;
iteratorAdvanced = true;
}
bool matchFirst;
if ((matchFirst=fr.matchSequence("FileNameList {")) || fr.matchSequence("FileNameList %i {"))
{
@@ -91,6 +107,10 @@ bool PagedLOD_writeLocalData(const Object& obj, Output& fw)
{
const PagedLOD& lod = static_cast<const PagedLOD&>(obj);
fw.indent() << "Radius "<<lod.getRadius()<<std::endl;
fw.indent() << "NumChildrenThatCannotBeExpired "<<lod.getNumChildrenThatCannotBeExpired()<<std::endl;
fw.indent() << "FileNameList "<<lod.getNumFileNames()<<" {"<< std::endl;
fw.moveIn();