OpenSceneGraph  3.0.1
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
osgViewer::ScreenCaptureHandler Class Reference

Event handler that will capture the screen on key press. More...

Inheritance diagram for osgViewer::ScreenCaptureHandler:
Inheritance graph
[legend]

List of all members.

Classes

class  CaptureOperation
 Abstract base class for what to do when a screen capture happens. More...
class  WriteToFile
 Concrete implementation of a CaptureOperation that writes the screen capture to a file. More...

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)
 Deprecated, Handle events, return true if handled, false otherwise.
virtual void captureNextFrame (osgViewer::ViewerBase &viewer)
 Capture the given viewer's views on the next frame.
void setFramesToCapture (int numFrames)
 Set the number of frames to capture.
int getFramesToCapture () const
 Get the number of frames to capture.
void startCapture ()
 Start capturing any viewer(s) the handler is attached to at the end of the next frame.
void stopCapture ()
 Stop capturing.
virtual void getUsage (osg::ApplicationUsage &usage) const
 Get the keyboard and mouse usage of this manipulator.

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

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

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

Get the number of frames to capture.

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

Get the keyboard and mouse usage of this manipulator.

Reimplemented from osgGA::GUIEventHandler.

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

Reimplemented from osgGA::GUIEventHandler.

Set the number of frames to capture.

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

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

Stop capturing.


Member Data Documentation


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

osg logo
Generated at Sun May 6 2012 20:07:56 for the OpenSceneGraph by doxygen 1.8.0.