14 #ifndef OSG_IMAGESEQUENCE
15 #define OSG_IMAGESEQUENCE 1
17 #include <OpenThreads/Mutex>
18 #include <osg/ImageStream>
37 virtual Object*
clone(
const CopyOp& copyop)
const {
return new ImageSequence(*
this,copyop); }
38 virtual bool isSameKindAs(
const Object* obj)
const {
return dynamic_cast<const ImageSequence*
>(obj)!=0; }
40 virtual const char*
className()
const {
return "ImageSequence"; }
43 virtual int compare(
const Image& rhs)
const;
54 ImageData(
const ImageData&
id);
55 ImageData& operator = (
const ImageData&
id);
64 virtual void seek(
double time);
70 virtual void rewind();
78 LOAD_AND_DISCARD_IN_UPDATE_TRAVERSAL
81 void setMode(Mode mode);
84 void setLength(
double length);
85 virtual double getLength()
const {
return _length; }
88 void addImageFile(
const std::string& fileName);
90 void setImageFile(
unsigned int pos,
const std::string& fileName);
91 std::string getImageFile(
unsigned int pos)
const;
96 GLint internalTextureformat,
97 GLenum pixelFormat,GLenum
type,
100 int packing=1) {
Image::setImage(s,t,r,internalTextureformat, pixelFormat, type, data, mode, packing); }
102 void setImage(
unsigned int pos,
osg::Image* image);
103 Image* getImage(
unsigned int pos);
104 const Image* getImage(
unsigned int pos)
const;
132 virtual void applyLoopingMode();
134 void setImageToChild(
int pos);
136 void computeTimePerImage();
138 int imageIndex(
double time);
141 void _setImage(
unsigned int pos,
osg::Image* image);
const ImageDataList & getImageDataList() const
virtual void setReferenceTime(double t)
unsigned int getNumImageData() const
This class provides an object-oriented thread mutex interface.
int _previousAppliedImageIndex
void setImage(int s, int t, int r, GLint internalTextureformat, GLenum pixelFormat, GLenum type, unsigned char *data, AllocationMode mode, int packing=1)
osg::ref_ptr< osg::Referenced > _imageRequest
osg::ref_ptr< osg::Image > _image
OpenThreads::Mutex _mutex
virtual void setTimeMultiplier(double tm)
virtual const char * libraryName() const
virtual double getLength() const
osg::Referenced * getReadOptions()
const osg::Referenced * getReadOptions() const
virtual double getReferenceTime() const
virtual Object * cloneType() const
virtual Object * clone(const CopyOp ©op) const
virtual void setImage(int s, int t, int r, GLint internalTextureformat, GLenum pixelFormat, GLenum type, unsigned char *data, AllocationMode mode, int packing=1, int rowLength=0)
osg::ref_ptr< osg::Referenced > _readOptions
virtual bool requiresUpdateCall() const
virtual bool isSameKindAs(const Object *obj) const
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
virtual const char * className() const
std::vector< ImageData > ImageDataList
ImageDataList _imageDataList
void setReadOptions(osg::Referenced *options)
ImageDataList & getImageDataList()
virtual double getTimeMultiplier() const