Added ClipNode::set/getReferenceFrame();

This commit is contained in:
Robert Osfield
2008-12-19 15:29:59 +00:00
parent f4fe462b28
commit 0ea6cdeb96
7 changed files with 100 additions and 6 deletions

View File

@@ -32,6 +32,11 @@ void ClipNode::write(DataOutputStream* out){
throw Exception("ClipNode::write(): Could not cast this osg::ClipNode to an osg::Group.");
// Write ClipNode's properties.
if ( out->getVersion() >= VERSION_0037 )
{
out->writeInt((int)getReferenceFrame());
}
out->writeUInt(getNumClipPlanes());
for (unsigned int i=0;i<getNumClipPlanes();++i)
@@ -56,6 +61,11 @@ void ClipNode::read(DataInputStream* in){
throw Exception("ClipNode::read(): Could not cast this osg::ClipNode to an osg::Object.");
// Read ClipNode's properties
if ( in->getVersion() >= VERSION_0037 )
{
setReferenceFrame((osg::ClipNode::ReferenceFrame) in->readInt());
}
unsigned int numClipPlanes = in->readUInt();
for (unsigned int i=0;i<numClipPlanes;++i)