OpenSceneGraph 2.8.4
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
osg::ImageSequence Class Reference

Image Buffer class. More...

Inheritance diagram for osg::ImageSequence:
Inheritance graph
[legend]

List of all members.

Classes

struct  UpdateCallback

Public Types

enum  Mode { PRE_LOAD_ALL_IMAGES, PAGE_AND_RETAIN_IMAGES, PAGE_AND_DISCARD_USED_IMAGES }
typedef std::vector
< osg::ref_ptr< osg::Image > > 
Images
typedef std::vector< std::string > FileNames

Public Member Functions

 ImageSequence ()
 ImageSequence (const ImageSequence &ImageSequence, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
virtual ObjectcloneType () const
 Clone the type of an object, with Object* return type.
virtual Objectclone (const CopyOp &copyop) const
 Clone an object, with Object* return type.
virtual bool isSameKindAs (const Object *obj) const
virtual const char * libraryName () const
 return the name of the object's library.
virtual const char * className () const
 return the name of the object's class type.
virtual int compare (const Image &rhs) const
 Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
virtual void setReferenceTime (double t)
virtual double getReferenceTime () const
virtual void setTimeMultiplier (double tm)
virtual double getTimeMultiplier () const
virtual void seek (double time)
virtual void play ()
virtual void pause ()
virtual void rewind ()
void setMode (Mode mode)
Mode getMode () const
void setLength (double length)
virtual double getLength () const
void addImageFile (const std::string &fileName)
void setImageFile (unsigned int pos, const std::string &fileName)
std::string getImageFile (unsigned int pos) const
unsigned int getNumImageFiles () const
FileNamesgetFileNames ()
const FileNamesgetFileNames () const
void addImage (osg::Image *image)
void setImage (int s, int t, int r, GLint internalTextureformat, GLenum pixelFormat, GLenum type, unsigned char *data, AllocationMode mode, int packing=1)
 Set the image dimensions, format and data.
void setImage (unsigned int pos, osg::Image *image)
ImagegetImage (unsigned int pos)
const ImagegetImage (unsigned int pos) const
unsigned int getNumImages () const
ImagesgetImages ()
const ImagesgetImages () const
virtual void update (NodeVisitor *nv)

Protected Types

typedef std::set< std::string > FilesRequested

Protected Member Functions

virtual ~ImageSequence ()
virtual void applyLoopingMode ()
void setImageToChild (const osg::Image *image)
void computeTimePerImage ()
int imageIndex (double time)

Protected Attributes

double _referenceTime
double _timeMultiplier
Mode _mode
double _length
double _timePerImage
OpenThreads::Mutex _mutex
FileNames _fileNames
Images _images
FilesRequested _filesRequested
int _previousAppliedImageIndex
bool _seekTimeSet
double _seekTime

Detailed Description

Image Buffer class.


Member Typedef Documentation

typedef std::vector< std::string > osg::ImageSequence::FileNames
typedef std::set< std::string > osg::ImageSequence::FilesRequested [protected]

Member Enumeration Documentation

Enumerator:
PRE_LOAD_ALL_IMAGES 
PAGE_AND_RETAIN_IMAGES 
PAGE_AND_DISCARD_USED_IMAGES 

Constructor & Destructor Documentation

osg::ImageSequence::ImageSequence ( )
osg::ImageSequence::ImageSequence ( const ImageSequence ImageSequence,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
)

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::ImageSequence::~ImageSequence ( ) [inline, protected, virtual]

Member Function Documentation

void osg::ImageSequence::addImage ( osg::Image image)
void osg::ImageSequence::addImageFile ( const std::string &  fileName)
virtual void osg::ImageSequence::applyLoopingMode ( ) [protected, virtual]

Reimplemented from osg::ImageStream.

virtual const char* osg::ImageSequence::className ( ) const [inline, virtual]

return the name of the object's class type.

Must be defined by derived classes.

Reimplemented from osg::ImageStream.

virtual Object* osg::ImageSequence::clone ( const CopyOp ) const [inline, virtual]

Clone an object, with Object* return type.

Must be defined by derived classes.

Reimplemented from osg::ImageStream.

virtual Object* osg::ImageSequence::cloneType ( ) const [inline, virtual]

Clone the type of an object, with Object* return type.

Must be defined by derived classes.

Reimplemented from osg::ImageStream.

virtual int osg::ImageSequence::compare ( const Image rhs) const [virtual]

Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

Reimplemented from osg::ImageStream.

void osg::ImageSequence::computeTimePerImage ( ) [protected]
FileNames& osg::ImageSequence::getFileNames ( ) [inline]
const FileNames& osg::ImageSequence::getFileNames ( ) const [inline]
Image* osg::ImageSequence::getImage ( unsigned int  pos)
const Image* osg::ImageSequence::getImage ( unsigned int  pos) const
std::string osg::ImageSequence::getImageFile ( unsigned int  pos) const
const Images& osg::ImageSequence::getImages ( ) const [inline]
Images& osg::ImageSequence::getImages ( ) [inline]
virtual double osg::ImageSequence::getLength ( ) const [inline, virtual]

Reimplemented from osg::ImageStream.

Mode osg::ImageSequence::getMode ( ) const [inline]
unsigned int osg::ImageSequence::getNumImageFiles ( ) const [inline]
unsigned int osg::ImageSequence::getNumImages ( ) const [inline]
virtual double osg::ImageSequence::getReferenceTime ( ) const [inline, virtual]

Reimplemented from osg::ImageStream.

virtual double osg::ImageSequence::getTimeMultiplier ( ) const [inline, virtual]

Reimplemented from osg::ImageStream.

int osg::ImageSequence::imageIndex ( double  time) [protected]
virtual bool osg::ImageSequence::isSameKindAs ( const Object obj) const [inline, virtual]

Reimplemented from osg::ImageStream.

virtual const char* osg::ImageSequence::libraryName ( ) const [inline, virtual]

return the name of the object's library.

Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.

Reimplemented from osg::ImageStream.

virtual void osg::ImageSequence::pause ( ) [virtual]

Reimplemented from osg::ImageStream.

virtual void osg::ImageSequence::play ( ) [virtual]

Reimplemented from osg::ImageStream.

virtual void osg::ImageSequence::rewind ( ) [virtual]

Reimplemented from osg::ImageStream.

virtual void osg::ImageSequence::seek ( double  time) [virtual]

Reimplemented from osg::ImageStream.

void osg::ImageSequence::setImage ( int  s,
int  t,
int  r,
GLint  internalTextureformat,
GLenum  pixelFormat,
GLenum  type,
unsigned char *  data,
AllocationMode  mode,
int  packing = 1 
) [inline]

Set the image dimensions, format and data.

Reimplemented from osg::Image.

References osg::Image::setImage().

void osg::ImageSequence::setImage ( unsigned int  pos,
osg::Image image 
)
void osg::ImageSequence::setImageFile ( unsigned int  pos,
const std::string &  fileName 
)
void osg::ImageSequence::setImageToChild ( const osg::Image image) [protected]
void osg::ImageSequence::setLength ( double  length)
void osg::ImageSequence::setMode ( Mode  mode)
virtual void osg::ImageSequence::setReferenceTime ( double  t) [inline, virtual]

Reimplemented from osg::ImageStream.

virtual void osg::ImageSequence::setTimeMultiplier ( double  tm) [inline, virtual]

Reimplemented from osg::ImageStream.

virtual void osg::ImageSequence::update ( NodeVisitor nv) [virtual]

Reimplemented from osg::Image.


Member Data Documentation

double osg::ImageSequence::_length [protected]
OpenThreads::Mutex osg::ImageSequence::_mutex [mutable, protected]
double osg::ImageSequence::_seekTime [protected]

The documentation for this class was generated from the following file:

osg logo
Generated at Sun Jan 8 2012 13:16:12 for the OpenSceneGraph by doxygen 1.7.4.