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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user