Added ImageSequence to .ive plugin, added support for multiple ImageThreads in osgDB::ImagePager
This commit is contained in:
58
src/osgPlugins/ive/ImageSequence.cpp
Normal file
58
src/osgPlugins/ive/ImageSequence.cpp
Normal 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.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user