Implemented support for ShapeAttributeList, used John Vidar Larring's initial

submission as a base, but implementing the user data functionality in a different
way to facilitate more flexible user data support
This commit is contained in:
Robert Osfield
2008-09-01 12:40:33 +00:00
parent befa2112f8
commit 99a294ebae
8 changed files with 113 additions and 4 deletions

View File

@@ -87,6 +87,7 @@
#include "VisibilityGroup.h"
#include "MultiTextureControl.h"
#include "ShapeAttributeList.h"
#include "Effect.h"
#include "AnisotropicLighting.h"
#include "BumpMapping.h"
@@ -1655,3 +1656,35 @@ osgTerrain::Locator* DataInputStream::readLocator()
return locator;
}
osg::Object* DataInputStream::readObject()
{
int id = readInt();
if (id<0) return 0;
if (id==IVENODE)
{
return readNode();
}
else if (id==IVESTATESET)
{
return readStateSet();
}
else if (id==IVESTATEATTRIBUTE)
{
return readStateAttribute();
}
else if (id==IVEDRAWABLE)
{
return readDrawable();
}
else if (id==IVESHAPEATTRIBUTELIST)
{
osgSim::ShapeAttributeList* sal = new osgSim::ShapeAttributeList;
((ive::ShapeAttributeList*)sal)->read(this);
return sal;
}
return 0;
}