Fixed handling of write and reading of straight Node objects in the scene graph.
This commit is contained in:
parent
d88a6af8c1
commit
454e2df32b
@ -60,6 +60,7 @@
|
||||
#include "PolygonStipple.h"
|
||||
|
||||
|
||||
#include "Node.h"
|
||||
#include "Group.h"
|
||||
#include "MatrixTransform.h"
|
||||
#include "Camera.h"
|
||||
@ -1854,6 +1855,10 @@ osg::Node* DataInputStream::readNode()
|
||||
node = new osgVolume::VolumeTile();
|
||||
((ive::VolumeTile*)(node.get()))->read(this);
|
||||
}
|
||||
else if(nodeTypeID== IVENODE){
|
||||
node = new osg::Node();
|
||||
((ive::Node*)(node.get()))->read(this);
|
||||
}
|
||||
else{
|
||||
throwException("Unknown node identification in DataInputStream::readNode()");
|
||||
}
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include "Light.h"
|
||||
#include "PolygonStipple.h"
|
||||
|
||||
#include "Node.h"
|
||||
#include "Group.h"
|
||||
#include "MatrixTransform.h"
|
||||
#include "Camera.h"
|
||||
@ -1411,7 +1412,13 @@ void DataOutputStream::writeNode(const osg::Node* node)
|
||||
}
|
||||
else
|
||||
{
|
||||
OSG_WARN<<"Unknown node in Group::write(), className()="<<node->className()<<std::endl;
|
||||
if (typeid(node)!=typeid(osg::Node))
|
||||
{
|
||||
OSG_WARN<<"Unknown node in Group::write(), className()="<<node->className()<<std::endl;
|
||||
}
|
||||
|
||||
((ive::Node*)(node))->write(this);
|
||||
|
||||
// throwException(std::string("Unknown node in Group::write(), className()=")+node->className());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user