Moved osg::DOFTransform to osgSim::DOFTransform.

Fixed crash associated with .osg files which contain empty description fields.

From Sondra Inverson, added support to .ive plugin for osgSim::DOFTransform.
This commit is contained in:
Robert Osfield
2003-11-25 14:11:05 +00:00
parent 032909f8c7
commit 31c5528ffb
26 changed files with 246 additions and 203 deletions

View File

@@ -35,6 +35,7 @@
#include "LOD.h"
#include "PagedLOD.h"
#include "PositionAttitudeTransform.h"
#include "DOFTransform.h"
#include "Transform.h"
#include "Switch.h"
#include "OccluderNode.h"
@@ -184,6 +185,17 @@ long DataInputStream::readLong(){
return l;
}
unsigned long DataInputStream::readULong(){
unsigned long l;
_istream->read((char*)&l, LONGSIZE);
if (_istream->rdstate() & _istream->failbit)
throw Exception("DataInputStream::readULong(): Failed to read unsigned long value.");
if (_verboseOutput) std::cout<<"read/writeULong() ["<<l<<"]"<<std::endl;
return l;
}
double DataInputStream::readDouble(){
double d;
_istream->read((char*)&d, DOUBLESIZE);
@@ -623,6 +635,10 @@ osg::Node* DataInputStream::readNode()
node = new osg::PositionAttitudeTransform();
((ive::PositionAttitudeTransform*)(node))->read(this);
}
else if(nodeTypeID== IVEDOFTRANSFORM){
node = new osgSim::DOFTransform();
((ive::DOFTransform*)(node))->read(this);
}
else if(nodeTypeID== IVETRANSFORM){
node = new osg::Transform();
((ive::Transform*)(node))->read(this);