OpenSceneGraph  3.4.0
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
osgDB::ImagePager Class Reference
Inheritance diagram for osgDB::ImagePager:
Inheritance graph
[legend]

List of all members.

Classes

struct  ImageRequest
class  ImageThread
struct  ReadQueue
struct  RequestQueue

Public Member Functions

 ImagePager ()
ImageThreadgetImageThread (unsigned int i)
const ImageThreadgetImageThread (unsigned int i) const
unsigned int getNumImageThreads () const
void setPreLoadTime (double preLoadTime)
virtual double getPreLoadTime () const
virtual osg::ImagereadImageFile (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
 Return true if there are pending updates to the scene graph that require a call to updateSceneGraph(double).
virtual void updateSceneGraph (const osg::FrameStamp &frameStamp)
 Merge the changes to the scene graph.
virtual void signalBeginFrame (const osg::FrameStamp *framestamp)
 Signal the image thread that the update, cull and draw has begun for a new frame.
virtual void signalEndFrame ()
 Signal the image thread that the update, cull and draw dispatch has completed.
int cancel ()

Protected Types

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

Protected Member Functions

virtual ~ImagePager ()

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

Friends

struct SortFileRequestFunctor

Member Typedef Documentation

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

Constructor & Destructor Documentation

virtual osgDB::ImagePager::~ImagePager ( ) [protected, virtual]

Member Function Documentation

ImageThread* osgDB::ImagePager::getImageThread ( unsigned int  i) [inline]
const ImageThread* osgDB::ImagePager::getImageThread ( unsigned int  i) const [inline]
unsigned int osgDB::ImagePager::getNumImageThreads ( ) const [inline]
virtual double osgDB::ImagePager::getPreLoadTime ( ) const [inline, virtual]
virtual osg::Image* osgDB::ImagePager::readImageFile ( const std::string &  fileName,
const osg::Referenced options = 0 
) [virtual]
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]
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).

void osgDB::ImagePager::setPreLoadTime ( double  preLoadTime) [inline]
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.

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.

virtual void osgDB::ImagePager::updateSceneGraph ( const osg::FrameStamp frameStamp) [virtual]

Merge the changes to the scene graph.


Friends And Related Function Documentation

friend struct SortFileRequestFunctor [friend]

Member Data Documentation

bool osgDB::ImagePager::_done [protected]
OpenThreads::Atomic osgDB::ImagePager::_frameNumber [protected]
OpenThreads::Mutex osgDB::ImagePager::_ir_mutex [protected]
double osgDB::ImagePager::_preLoadTime [protected]
OpenThreads::Mutex osgDB::ImagePager::_run_mutex [protected]

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

osg logo
Generated at Tue Dec 8 2015 00:16:46 for the OpenSceneGraph by doxygen 1.7.6.1.