osgDB::ImagePager Class Reference

`#include <ImagePager>`

Inheritance diagram for osgDB::ImagePager:

## Classes

class | ImageThread
struct | ImageRequest
struct | RequestQueue
struct | ReadQueue

## Public Member Functions

| ImagePager ()
ImageThread * | getImageThread (unsigned int i)
const ImageThread * | getImageThread (unsigned int i) const
unsigned int | getNumImageThreads () const
void | setPreLoadTime (double preLoadTime)
virtual double | getPreLoadTime () const
virtual osg::ref_ptr< osg::Image > | readRefImageFile (const std::string &fileName, const osg::Referenced *options=0)
virtual void | requestImageFile (const std::string &fileName, osg::Object *attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp *framestamp, osg::ref_ptr< osg::Referenced > &imageRequest, const osg::Referenced *options)
virtual bool | requiresUpdateSceneGraph () const
virtual void | updateSceneGraph (const osg::FrameStamp &frameStamp)
virtual void | signalBeginFrame (const osg::FrameStamp *framestamp)
virtual void | signalEndFrame ()
int | cancel ()
Public Member Functions inherited from osg::NodeVisitor::ImageRequestHandler
| ImageRequestHandler ()
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
virtual void | setThreadSafeRefUnref (bool)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Protected Types

typedef std::vector< osg::ref_ptr< ImageThread > > | ImageThreads

## Protected Member Functions

virtual | ~ImagePager ()
Protected Member Functions inherited from osg::NodeVisitor::ImageRequestHandler
virtual | ~ImageRequestHandler ()
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Protected Attributes

OpenThreads::Mutex | _run_mutex
bool | _startThreadCalled
bool | _done
bool | _databasePagerThreadPaused
OpenThreads::Atomic | _frameNumber
OpenThreads::Mutex | _ir_mutex
osg::ref_ptr< ReadQueue > | _readQueue
ImageThreads | _imageThreads
osg::ref_ptr< RequestQueue > | _completedQueue
double | _preLoadTime
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Friends

struct | SortFileRequestFunctor

## Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Member Typedef Documentation

## ImageThreads

typedef std::vector< osg::ref_ptr<ImageThread> > osgDB::ImagePager::ImageThreads

protected

## Constructor & Destructor Documentation

## ImagePager()

osgDB::ImagePager::ImagePager | ( |  | ) |

Referenced by osgDB::ImagePager::ImageThread::ImageThread(), osgDB::ImagePager::ImageThread::ImageThread(), and osgDB::ImagePager::ReadQueue::ReadQueue().

## ~ImagePager()

virtual osgDB::ImagePager::~ImagePager | ( |  | ) |

protected virtual

References SortFileRequestFunctor.

## Member Function Documentation

## cancel()

int osgDB::ImagePager::cancel | ( |  | ) |

## getImageThread() [1/2]

ImageThread * osgDB::ImagePager::getImageThread | ( | unsigned int | i | ) |

inline

References _imageThreads.

## getImageThread() [2/2]

const ImageThread * osgDB::ImagePager::getImageThread | ( | unsigned int | i | ) | const

inline

References _imageThreads.

## getNumImageThreads()

unsigned int osgDB::ImagePager::getNumImageThreads | ( |  | ) | const

inline

References _imageThreads.

## getPreLoadTime()

virtual double osgDB::ImagePager::getPreLoadTime | ( |  | ) | const

inline virtual

Implements osg::NodeVisitor::ImageRequestHandler.

References _preLoadTime.

## readRefImageFile()

virtual osg::ref_ptr< osg::Image > osgDB::ImagePager::readRefImageFile | ( | const std::string & | fileName,
|  | const osg::Referenced * | options = 0 )

virtual

Implements osg::NodeVisitor::ImageRequestHandler.

## requestImageFile()

virtual void osgDB::ImagePager::requestImageFile | ( | const std::string & | fileName,
|  | osg::Object * | attachmentPoint,
|  | int | attachmentIndex,
|  | double | timeToMergeBy,
|  | const osg::FrameStamp * | framestamp,
|  | osg::ref_ptr< osg::Referenced > & | imageRequest,
|  | const osg::Referenced * | options )

virtual

Implements osg::NodeVisitor::ImageRequestHandler.

## requiresUpdateSceneGraph()

virtual bool osgDB::ImagePager::requiresUpdateSceneGraph | ( |  | ) | const

virtual

Return true if there are pending updates to the scene graph that require a call to updateSceneGraph(double).

## setPreLoadTime()

void osgDB::ImagePager::setPreLoadTime | ( | double | preLoadTime | ) |

inline

References _preLoadTime.

## signalBeginFrame()

virtual void osgDB::ImagePager::signalBeginFrame | ( | const osg::FrameStamp * | framestamp | ) |

virtual

Signal the image thread that the update, cull and draw has begun for a new frame. Note, this is called by the application so that the image pager can go to sleep while the CPU is busy on the main rendering threads.

## signalEndFrame()

virtual void osgDB::ImagePager::signalEndFrame | ( |  | ) |

virtual

Signal the image thread that the update, cull and draw dispatch has completed. Note, this is called by the application so that the image pager can go to wake back up now the main rendering threads are iddle waiting for the next frame.

## updateSceneGraph()

virtual void osgDB::ImagePager::updateSceneGraph | ( | const osg::FrameStamp & | frameStamp | ) |

virtual

Merge the changes to the scene graph.

## Friends And Related Symbol Documentation

## SortFileRequestFunctor

friend struct SortFileRequestFunctor

friend

References SortFileRequestFunctor.

Referenced by SortFileRequestFunctor, and ~ImagePager().

## Member Data Documentation

## _completedQueue

osg::ref_ptr<RequestQueue> osgDB::ImagePager::_completedQueue

protected

## _databasePagerThreadPaused

bool osgDB::ImagePager::_databasePagerThreadPaused

protected

## _done

bool osgDB::ImagePager::_done

protected

## _frameNumber

OpenThreads::Atomic osgDB::ImagePager::_frameNumber

protected

## _imageThreads

ImageThreads osgDB::ImagePager::_imageThreads

protected

Referenced by getImageThread(), getImageThread(), and getNumImageThreads().

## _ir_mutex

OpenThreads::Mutex osgDB::ImagePager::_ir_mutex

protected

## _preLoadTime

double osgDB::ImagePager::_preLoadTime

protected

Referenced by getPreLoadTime(), and setPreLoadTime().

## _readQueue

osg::ref_ptr<ReadQueue> osgDB::ImagePager::_readQueue

protected

## _run_mutex

OpenThreads::Mutex osgDB::ImagePager::_run_mutex

protected

## _startThreadCalled

bool osgDB::ImagePager::_startThreadCalled

protected

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

- ImagePager