Added ImageSequence to .ive plugin, added support for multiple ImageThreads in osgDB::ImagePager

This commit is contained in:
Robert Osfield
2008-07-25 13:45:07 +00:00
parent 0d1656055c
commit ec4d189b64
18 changed files with 293 additions and 65 deletions

View File

@@ -0,0 +1,58 @@
/**********************************************************************
*
* FILE: Image.cpp
*
* DESCRIPTION: Read/Write osg::Image in binary format to disk.
*
* CREATED BY: Auto generated by iveGenerated
* and later modified by Rune Schmidt Jensen.
*
* HISTORY: Created 20.3.2003
*
* Copyright 2003 VR-C
**********************************************************************/
#include "Exception.h"
#include "ImageSequence.h"
#include "Object.h"
#include <osg/Notify>
using namespace ive;
void ImageSequence::write(DataOutputStream* out)
{
// Write ImageSequence's identification.
out->writeInt(IVEIMAGESEQUENCE);
// If the osg class is inherited by any other class we should also write this to file.
osg::Object* obj = dynamic_cast<osg::Object*>(this);
if(obj){
((ive::Object*)(obj))->write(out);
}
else
throw Exception("ImageSequence::write(): Could not cast this osg::ImageSequence to an osg::Object.");
// Write ImageSequence's properties.
}
void ImageSequence::read(DataInputStream* in)
{
// Peek ImageSequence's identification.
int id = in->peekInt();
if(id == IVEIMAGESEQUENCE){
// Read ImageSequence's identification.
id = in->readInt();
// If the osg class is inherited by any other class we should also read this from file.
osg::Object* obj = dynamic_cast<osg::Object*>(this);
if(obj){
((ive::Object*)(obj))->read(in);
}
else
throw Exception("ImageSequence::read(): Could not cast this osg::ImageSequence to an osg::Object.");
// Read ImageSequence's properties.
}
else{
throw Exception("ImageSequence::read(): Expected ImageSequence identification.");
}
}