OpenSceneGraph  3.4.0
Classes | Public Types | Public Member Functions | 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  ImageData

Public Types

enum  Mode {
  PRE_LOAD_ALL_IMAGES, PAGE_AND_RETAIN_IMAGES, PAGE_AND_DISCARD_USED_IMAGES, LOAD_AND_RETAIN_IN_UPDATE_TRAVERSAL,
  LOAD_AND_DISCARD_IN_UPDATE_TRAVERSAL
}
typedef std::vector< ImageDataImageDataList

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
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)
void setImage (unsigned int pos, osg::Image *image)
ImagegetImage (unsigned int pos)
const ImagegetImage (unsigned int pos) const
unsigned int getNumImageData () const
ImageDataListgetImageDataList ()
const ImageDataListgetImageDataList () const
virtual bool requiresUpdateCall () const
 ImageSequence requires a call to update(NodeVisitor*) during the update traversal so return true.
virtual void update (NodeVisitor *nv)
 update method for osg::Image subclasses that update themselves during the update traversal.
void setReadOptions (osg::Referenced *options)
 Set the optional osgDB::Options object to use when reading images.
osg::ReferencedgetReadOptions ()
 Get the optional osgDB::Options object used when reading images.
const osg::ReferencedgetReadOptions () const
 Get the optional osgDB::Options object used when reading images.

Protected Member Functions

virtual ~ImageSequence ()
virtual void applyLoopingMode ()
void setImageToChild (int pos)
void computeTimePerImage ()
int imageIndex (double time)
void _setImage (unsigned int pos, osg::Image *image)

Protected Attributes

double _referenceTime
double _timeMultiplier
Mode _mode
double _length
double _timePerImage
OpenThreads::Mutex _mutex
ImageDataList _imageDataList
int _previousAppliedImageIndex
bool _seekTimeSet
double _seekTime
osg::ref_ptr< osg::Referenced_readOptions

Detailed Description

Image Buffer class.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
PRE_LOAD_ALL_IMAGES 
PAGE_AND_RETAIN_IMAGES 
PAGE_AND_DISCARD_USED_IMAGES 
LOAD_AND_RETAIN_IN_UPDATE_TRAVERSAL 
LOAD_AND_DISCARD_IN_UPDATE_TRAVERSAL 

Constructor & Destructor Documentation

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::_setImage ( unsigned int  pos,
osg::Image image 
) [protected]
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.

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
virtual double osg::ImageSequence::getLength ( ) const [inline, virtual]

Reimplemented from osg::ImageStream.

Mode osg::ImageSequence::getMode ( ) const [inline]
unsigned int osg::ImageSequence::getNumImageData ( ) const [inline]

Get the optional osgDB::Options object used when reading images.

Get the optional osgDB::Options object used when reading images.

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 bool osg::ImageSequence::requiresUpdateCall ( ) const [inline, virtual]

ImageSequence requires a call to update(NodeVisitor*) during the update traversal so return true.

Reimplemented from osg::Image.

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]
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 ( int  pos) [protected]
void osg::ImageSequence::setLength ( double  length)

Set the optional osgDB::Options object to use when reading images.

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]

update method for osg::Image subclasses that update themselves during the update traversal.

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 Tue Dec 8 2015 00:16:42 for the OpenSceneGraph by doxygen 1.7.6.1.