13#ifndef SO_RENDER_AREA_H
14#define SO_RENDER_AREA_H
266 void calculateOutputImageProperties(
int outputIndex, PagedImage* outputImage)
override;
269 SubImageBox calculateInputSubImageBox(
int inIndex,
const SubImageBox& outSubImgBox,
int outIndex)
override;
272 void calculateOutputSubImage(SubImage *outSubImg,
int outIndex, SubImage *inSubImgs)
override;
#define SO_VIEWERS_CLASS_SPEC
A class that synchronizes a list of fields of two SoFieldContainer instances.
FrameGrabber class grabs GL frames for movie generation.
virtual void stopRecordingChanged(SoField *)
stop recording:
SoSFBool border
show a 3D border
SoSFEnum transparency
transparency type
SoSFString outputSnapshotFile
filename of the screenshot (without file extension)
SoSFBool autoIncreaseFile
set if filename should be autoincreased
SoSFTrigger singleFrame
record a single frame, recording is started if it was not running
virtual SbBool handleEvent(QEvent *anyevent)
called by handleEventCB for each event in viewer
SoSFBool antialiasing
turn antialiasing on/off
SoSFFloat frameRate
frame rate which the recorder uses to grab the screen
void setStatus(const char *str)
set the status in status field and also with progress CB
SoSFColor background
Appearance Fields.
void borderChanged(SoField *)
further field change callbacks:
void continueRecordingChanged(SoField *)
SoSFTrigger doSnapshot
Screenshot feature Fields.
SoSFEnum snapshotFormat
format of the output, may be RGB or GREY
virtual void recordChanged(SoSensor *sensor)
timer sensor call:
SoSFTrigger updateMLOutput
trigger the update of the ML output
virtual void enableKeyCommandsChanged(SoField *)
SoSFBool enableKeyCommands
enable the keyboard commands for snapshots and movie generation
SoSFString miSelectedPointingActionProvider
SoSceneSetupHelper * _sceneSetupHelper
SoSFBool miSelectedPointingActionActive
SoSFString miSelectedPointingAction
Managed Interaction support.
SoSFTrigger continueRecording
continue recording
SoSFMLConnector outputImage
ML Output of Viewer screenshot.
static void recordChangedCB(void *userData, SoSensor *s)
virtual void setScene(SoNode *scene)
This method gets called by createViewer.
static void fieldChangedCB(void *userData, SoSensor *s)
void sampleBufferChanged(SoField *)
virtual SbBool shouldChangeCursor()
SoSFString status
current status of the recorder
SoSFTrigger startRecording
Recorder feature Fields.
static SbBool handleEventCB(void *userData, QEvent *anyevent)
needed for key focus grabbing
SoSFBool grabKeyFocus
grab the key focus when the mouse moves onto the viewer window
SoSFTrigger cancelRecording
cancel recording
QCursor _oldCursor
remember old cursor shape:
SoSFString inputDevicesList
space separated list of input device type names
SoSFInt32 numSamples
number of samples (0 = maximum number of samplers)
void * createViewer(void *hwnd, SoNode *scene) override
void inputDevicesListChanged(SoField *)
void deleteViewer(void *viewer) override
delete the previously created viewer
SoRenderArea()
constructor
virtual void snapshotChanged(SoField *)
doSnapshot changed
SoSFBool autoRedrawWhenRecording
void syncFromViewerNode(SoViewerNode *node) override
sync from given src viewer node
virtual void setupViewer()
sets all values from fields
SoSFFloat frameRateAvi
frame rate that is used in the generated AVI
virtual void getSyncFieldNames(SbStringList &list)
void transparencyChanged(SoField *)
SoTimerSensor * _recordSensor
virtual void fieldChanged(SoSensor *sensor)
priority 0 sensor call for all fields:
virtual void createAviChanged(SoField *)
createAvi:
virtual void updateMLOutputChanged(SoField *)
updateMLOutput changed
void antialiasingChanged(SoField *)
SoSFBool useSampleBuffers
turn sample buffers on/off
ml::MLSnapshot * _snapshot
SoSFBool showSnapshotWithShell
start external program when screenshot was saved (Windows only)
void setRecordingFlag(bool flag)
sets the recording flag and starts/stops the recording timer
void cancelRecordingChanged(SoField *)
MLuint8 * readBuffer(int &w, int &h)
read the gl back buffer (ownership is passed to caller, memory needs to be cleared by delete)
bool getBufferSize(int &w, int &h)
returns current size of image (returns FALSE if there is no viewer)
void backgroundChanged(SoField *)
virtual void startRecordingChanged(SoField *)
start recording:
static void initClass()
inventor runtime type system
void frameRateChanged(SoField *)
SoSFString outputSnapshotFileWritten
filename that was written on doScreenshot
SoSFInt32 snapCount
count of screenshots taken used for autoIncreaseFile
SoSFInt32 antialiasingNumPasses
number of antialiasing passes
SoSFTrigger stopRecording
stop recording
void singleFrameChanged(SoField *)
SoSFTrigger createAvi
create an AVI of the movie (by running a createMovie callback)
void setRenderArea(SoRenderArea *area)
set the render area this module is attached to