diff --git a/src/osgPlugins/ive/IveVersion.h b/src/osgPlugins/ive/IveVersion.h index 1a33c619d..40243a746 100644 --- a/src/osgPlugins/ive/IveVersion.h +++ b/src/osgPlugins/ive/IveVersion.h @@ -23,9 +23,10 @@ #define VERSION_0012 12 #define VERSION_0013 13 #define VERSION_0014 14 +#define VERSION_0015 15 -#define VERSION VERSION_0014 - +//#define VERSION VERSION_0014 +#define VERSION VERSION_0015 /* The BYTE_SEX tag is used to check the endian of the IVE file being read in. The IVE format diff --git a/src/osgPlugins/ive/PagedLOD.cpp b/src/osgPlugins/ive/PagedLOD.cpp index 6dadb0123..a4cbf637c 100644 --- a/src/osgPlugins/ive/PagedLOD.cpp +++ b/src/osgPlugins/ive/PagedLOD.cpp @@ -82,6 +82,25 @@ void PagedLOD::write(DataOutputStream* out) for(i=0;iwriteString(getFileName(i)); } + + // PagedLOD priority settings + // 2006/03/10 GW + if ( out->getVersion() >= VERSION_0015 ) + { + size = getNumPriorityOffsets(); + out->writeInt( size ); + for(int i=0; iwriteFloat( getPriorityOffset( i ) ); + } + + size = getNumPriorityScales(); + out->writeInt( size ); + for( int i=0; iwriteFloat( getPriorityScale( i ) ); + } + } } void PagedLOD::read(DataInputStream* in) @@ -148,6 +167,29 @@ void PagedLOD::read(DataInputStream* in) for(i=0;ireadString()); } + + + // PagedLOD priority settings + // 2006/03/10 GW + if ( in->getVersion() >= VERSION_0015 ) + { + // priority offsets: + size = in->readInt(); + for( int i=0; ireadFloat(); + setPriorityOffset( i, pri_offset ); + } + + // priority scales: + size = in->readInt(); + for( int i=0; ireadFloat(); + setPriorityScale( i, pri_scale ); + } + + } } else{ throw Exception("LOD::read(): Expected LOD identification.");