Fixed the order of setting of CenterMode
This commit is contained in:
parent
e5b5494fe1
commit
9c04527cbe
@ -36,7 +36,7 @@ void LOD::write(DataOutputStream* out){
|
|||||||
out->writeInt(getCenterMode());
|
out->writeInt(getCenterMode());
|
||||||
out->writeVec3(getCenter());
|
out->writeVec3(getCenter());
|
||||||
|
|
||||||
out->writeInt(getRangeMode());
|
out->writeInt(getRangeMode());
|
||||||
|
|
||||||
// Write rangelist
|
// Write rangelist
|
||||||
int size = getNumRanges();
|
int size = getNumRanges();
|
||||||
@ -66,12 +66,14 @@ void LOD::read(DataInputStream* in){
|
|||||||
if ( in->getVersion() > VERSION_0002 )
|
if ( in->getVersion() > VERSION_0002 )
|
||||||
setRadius(in->readFloat());
|
setRadius(in->readFloat());
|
||||||
|
|
||||||
// Read centermode
|
// Read centermode and center
|
||||||
setCenterMode((osg::LOD::CenterMode)in->readInt());
|
osg::LOD::CenterMode centerMode = (osg::LOD::CenterMode)in->readInt();
|
||||||
setCenter(in->readVec3());
|
osg::Vec3 center = in->readVec3();
|
||||||
|
setCenter(center);
|
||||||
|
setCenterMode(centerMode);
|
||||||
|
|
||||||
if ( in->getVersion() > VERSION_0002 )
|
if ( in->getVersion() > VERSION_0002 )
|
||||||
setRangeMode((RangeMode)in->readInt());
|
setRangeMode((RangeMode)in->readInt());
|
||||||
|
|
||||||
// Read rangelist
|
// Read rangelist
|
||||||
int size = in->readInt();;
|
int size = in->readInt();;
|
||||||
|
Loading…
Reference in New Issue
Block a user