osgViewer::ScreenCaptureHandler Class Reference

Inheritance diagram for osgViewer::ScreenCaptureHandler:

osgGA::GUIEventHandler osg::NodeCallback osg::Drawable::EventCallback osg::Object osg::Object osg::Referenced osg::Referenced

List of all members.

Public Member Functions

 ScreenCaptureHandler (CaptureOperation *defaultOperation=0, int numFrames=1)
void setKeyEventTakeScreenShot (int key)
int getKeyEventTakeScreenShot () const
void setKeyEventToggleContinuousCapture (int key)
int getKeyEventToggleContinuousCapture () const
void setCaptureOperation (CaptureOperation *operation)
CaptureOperationgetCaptureOperation () const
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
virtual void captureNextFrame (osgViewer::ViewerBase &viewer)
void setFramesToCapture (int numFrames)
int getFramesToCapture () const
void startCapture ()
void stopCapture ()
virtual void getUsage (osg::ApplicationUsage &usage) const

Protected Member Functions

void addCallbackToViewer (osgViewer::ViewerBase &viewer)
void removeCallbackFromViewer (osgViewer::ViewerBase &viewer)
osg::CamerafindAppropriateCameraForCallback (osgViewer::ViewerBase &viewer)

Protected Attributes

bool _startCapture
bool _stopCapture
int _keyEventTakeScreenShot
int _keyEventToggleContinuousCapture
osg::ref_ptr< CaptureOperation_operation
osg::ref_ptr
< osg::Camera::DrawCallback
_callback

Classes

class  CaptureOperation
class  WriteToFile


Detailed Description

Event handler that will capture the screen on key press.

Constructor & Destructor Documentation

osgViewer::ScreenCaptureHandler::ScreenCaptureHandler ( CaptureOperation defaultOperation = 0,
int  numFrames = 1 
)

Parameters:
numFrames >0: capture that number of frames. <0: capture all frames, call stopCapture() to stop it.


Member Function Documentation

void osgViewer::ScreenCaptureHandler::setKeyEventTakeScreenShot ( int  key  )  [inline]

int osgViewer::ScreenCaptureHandler::getKeyEventTakeScreenShot (  )  const [inline]

void osgViewer::ScreenCaptureHandler::setKeyEventToggleContinuousCapture ( int  key  )  [inline]

int osgViewer::ScreenCaptureHandler::getKeyEventToggleContinuousCapture (  )  const [inline]

void osgViewer::ScreenCaptureHandler::setCaptureOperation ( CaptureOperation operation  ) 

CaptureOperation* osgViewer::ScreenCaptureHandler::getCaptureOperation (  )  const

virtual bool osgViewer::ScreenCaptureHandler::handle ( const osgGA::GUIEventAdapter ,
osgGA::GUIActionAdapter  
) [virtual]

Deprecated, Handle events, return true if handled, false otherwise.

Reimplemented from osgGA::GUIEventHandler.

virtual void osgViewer::ScreenCaptureHandler::captureNextFrame ( osgViewer::ViewerBase viewer  )  [virtual]

Capture the given viewer's views on the next frame.

void osgViewer::ScreenCaptureHandler::setFramesToCapture ( int  numFrames  ) 

Set the number of frames to capture.

Parameters:
numFrames >0: capture that number of frames. <0: capture all frames, call stopCapture() to stop it.

int osgViewer::ScreenCaptureHandler::getFramesToCapture (  )  const

Get the number of frames to capture.

void osgViewer::ScreenCaptureHandler::startCapture (  ) 

Start capturing any viewer(s) the handler is attached to at the end of the next frame.

void osgViewer::ScreenCaptureHandler::stopCapture (  ) 

Stop capturing.

virtual void osgViewer::ScreenCaptureHandler::getUsage ( osg::ApplicationUsage usage  )  const [virtual]

Get the keyboard and mouse usage of this manipulator.

Reimplemented from osgGA::GUIEventHandler.

void osgViewer::ScreenCaptureHandler::addCallbackToViewer ( osgViewer::ViewerBase viewer  )  [protected]

void osgViewer::ScreenCaptureHandler::removeCallbackFromViewer ( osgViewer::ViewerBase viewer  )  [protected]

osg::Camera* osgViewer::ScreenCaptureHandler::findAppropriateCameraForCallback ( osgViewer::ViewerBase viewer  )  [protected]


Member Data Documentation


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

Generated on Fri Mar 19 19:53:00 2010 for openscenegraph by  doxygen 1.5.6