OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
osgDB::ImagePager Class Reference

#include <ImagePager.h>

Inheritance diagram for osgDB::ImagePager:
Inheritance graph
[legend]
Collaboration diagram for osgDB::ImagePager:
Collaboration graph
[legend]

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
 
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 &)
 
Referencedoperator= (const Referenced &)
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () 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::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

Detailed Description

Definition at line 32 of file ImagePager.h.

Member Typedef Documentation

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

Definition at line 178 of file ImagePager.h.

Constructor & Destructor Documentation

osgDB::ImagePager::ImagePager ( )
virtual osgDB::ImagePager::~ImagePager ( )
protectedvirtual

Member Function Documentation

int osgDB::ImagePager::cancel ( )
ImageThread* osgDB::ImagePager::getImageThread ( unsigned int  i)
inline

Definition at line 71 of file ImagePager.h.

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

Definition at line 73 of file ImagePager.h.

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

Definition at line 75 of file ImagePager.h.

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

Implements osg::NodeVisitor::ImageRequestHandler.

Definition at line 79 of file ImagePager.h.

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

Definition at line 78 of file ImagePager.h.

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

Definition at line 107 of file ImagePager.h.

Member Data Documentation

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

Definition at line 181 of file ImagePager.h.

bool osgDB::ImagePager::_databasePagerThreadPaused
protected

Definition at line 171 of file ImagePager.h.

bool osgDB::ImagePager::_done
protected

Definition at line 170 of file ImagePager.h.

OpenThreads::Atomic osgDB::ImagePager::_frameNumber
protected

Definition at line 173 of file ImagePager.h.

ImageThreads osgDB::ImagePager::_imageThreads
protected

Definition at line 179 of file ImagePager.h.

OpenThreads::Mutex osgDB::ImagePager::_ir_mutex
protected

Definition at line 175 of file ImagePager.h.

double osgDB::ImagePager::_preLoadTime
protected

Definition at line 183 of file ImagePager.h.

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

Definition at line 176 of file ImagePager.h.

OpenThreads::Mutex osgDB::ImagePager::_run_mutex
protected

Definition at line 167 of file ImagePager.h.

bool osgDB::ImagePager::_startThreadCalled
protected

Definition at line 168 of file ImagePager.h.


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