MeVisLab Resolution Independence API
|
SoFullViewer encapsulates SoQtFullViewer from Open Inventor in an Inventor Node. More...
#include <SoFullViewer.h>
Public Types | |
enum | CameraOrientation { CAMERA_KEEP_AS_IS , CAMERA_AXIAL , CAMERA_SAGITTAL , CAMERA_CORONAL , CAMERA_HEAD_PROFILE , CAMERA_USER_SETTING } |
camera positions More... | |
enum | CameraType { CAMERA_PERSPECTIVE , CAMERA_ORTHOGRAPHIC } |
camera type More... | |
enum | EventDestinationType { TO_SCENE , TO_VIEWER , TO_SCENE_AND_VIEWER , TO_SCENE_OR_VIEWER } |
destination of events when the viewer is in "viewing" mode More... | |
Public Member Functions | |
SoFullViewer () | |
void * | createViewer (void *hwnd, SoNode *scene) override |
create a viewer in the given window void pointer is used to be compatible to any windows system | |
void | setupViewer () override |
sets all values from fields | |
void | deleteViewer (void *viewer) override |
delete the viewer in the given window | |
void | startTimer () |
void | stopTimer () |
virtual void | timerChanged () |
virtual void | storeViewerState () |
called automatically by timer sensor if storeCurrentState is on | |
SbBool | shouldChangeCursor () override |
tells the renderarea about our state | |
SbBool | handleEvent (QEvent *anyevent) override |
handle event before viewer, returns true if event was handled | |
void | setStoredCamera () |
set stored camera type and value to viewer | |
void | updateCamera () |
update camera from viewer | |
void | cameraFieldsChanged (SoFieldSensor *s) |
triggered by above callback | |
void | enableKeyCommandsChanged (SoField *) override |
overridden to disable cursor keys | |
void | getSyncFieldNames (SbStringList &list) override |
collect the fields that should be synced on cloned viewers if you derive this method, make sure to call the super class implementation too | |
Public Member Functions inherited from SoRenderArea | |
SoRenderArea () | |
constructor | |
void * | createViewer (void *hwnd, SoNode *scene) override |
create a viewer in the given window void pointer is used to be compatible to any windows system | |
void | deleteViewer (void *viewer) override |
delete the previously created viewer | |
virtual void | setScene (SoNode *scene) |
This method gets called by createViewer. | |
virtual void | fieldChanged (SoSensor *sensor) |
priority 0 sensor call for all fields: | |
virtual void | recordChanged (SoSensor *sensor) |
timer sensor call: | |
virtual void | startRecordingChanged (SoField *) |
start recording: | |
virtual void | stopRecordingChanged (SoField *) |
stop recording: | |
virtual void | snapshotChanged (SoField *) |
doSnapshot changed | |
virtual void | updateMLOutputChanged (SoField *) |
updateMLOutput changed | |
virtual void | createAviChanged (SoField *) |
createAvi: | |
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 | syncFromViewerNode (SoViewerNode *node) override |
sync from given src viewer node | |
void | setStatus (const char *str) |
set the status in status field and also with progress CB | |
Public Member Functions inherited from SoViewerNode | |
SoViewerNode () | |
virtual void * | getCurrentViewer () |
returns the currently viewer (or NULL, if none was created) | |
void | setKeyPressedCB (InvKeyPressedCB *cb, void *data) |
set a keypressed callback | |
bool | keyPressedNotify (void *message) |
run keypressed cb | |
void | setHandleEventCB (InvHandleEventCB *cb, void *data) |
set a handle event callback | |
bool | handleEventNotify (void *message) |
run handle event cb | |
void | setGenerateMovieCB (InvGenerateMovieCB *cb, void *data) |
set movie generation callback | |
void | generateMovie (const char *name, const char *extension, int count, float framerate, const char *targetFile=nullptr) |
run move generation | |
Static Public Member Functions | |
static void | initClass () |
static void | timerSensorCB (void *data, SoSensor *sensor) |
static void | cameraFieldsChangedCB (void *data, SoSensor *s) |
static callback used by various fields | |
Static Public Member Functions inherited from SoRenderArea | |
static void | initClass () |
inventor runtime type system | |
static void | fieldChangedCB (void *userData, SoSensor *s) |
static void | recordChangedCB (void *userData, SoSensor *s) |
static SbBool | handleEventCB (void *userData, QEvent *anyevent) |
needed for key focus grabbing | |
Static Public Member Functions inherited from SoViewerNode | |
static void | initClass () |
Public Attributes | |
SoSFEnum | drawStyle |
Settings fields. | |
SoSFEnum | interactiveDrawStyle |
SoSFBool | headlight |
SoSFBool | decoration |
SoSFBool | popupMenuEnabled |
SoSFBool | viewing |
SoSFBool | cursor |
SoSFBool | autoClipping |
SoSFBool | stereoViewing |
stereo viewing settings | |
SoSFFloat | stereoOffset |
SoSFEnum | initialCameraOrientation |
Viewing. | |
SoSFEnum | applyCameraOrientation |
SoSFBool | autoApplyUserSettingOrientation |
SoSFTrigger | viewAll |
SoSFBool | viewAllFlag |
SoSFTrigger | saveHomePosition |
SoSFTrigger | resetToHomePosition |
SoSFTrigger | rescanScene |
General camera fields. | |
SoSFBool | storeCurrentState |
SoSFBool | automaticViewAll |
SoSFBool | saveCamera |
SoSFBool | isCameraStored |
SoSFBool | perspective |
is perspective camera? | |
SoSFFloat | height |
heightAngle/height depending on perspective/orthographic | |
SoSFEnum | cameraType |
SoSFVec3f | position |
SoSFRotation | orientation |
SoSFFloat | nearDistance |
SoSFFloat | farDistance |
SoSFFloat | focalDistance |
SoSFRotation | userSettingOrientation |
SoSFTrigger | storeAsUserSetting |
SoSFBool | forceRedrawOnInteraction |
SoSFEnum | button1events |
Event target in "viewing" mode. | |
SoSFEnum | button2events |
SoSFEnum | button3events |
SoSFEnum | keyEvents |
Public Attributes inherited from SoRenderArea | |
SoSFString | inputDevicesList |
space separated list of input device type names | |
SoSFColor | background |
Appearance Fields. | |
SoSFEnum | transparency |
transparency type | |
SoSFBool | antialiasing |
turn antialiasing on/off | |
SoSFInt32 | antialiasingNumPasses |
number of antialiasing passes | |
SoSFBool | useSampleBuffers |
turn sample buffers on/off | |
SoSFInt32 | numSamples |
number of samples (0 = maximum number of samplers) | |
SoSFBool | border |
show a 3D border | |
SoSFBool | grabKeyFocus |
grab the key focus when the mouse moves onto the viewer window | |
SoSFBool | enableKeyCommands |
enable the keyboard commands for snapshots and movie generation | |
SoSFTrigger | doSnapshot |
Screenshot feature Fields. | |
SoSFString | outputSnapshotFile |
filename of the screenshot (without file extension) | |
SoSFString | outputSnapshotFileWritten |
filename that was written on doScreenshot | |
SoSFBool | autoIncreaseFile |
set if filename should be autoincreased | |
SoSFInt32 | snapCount |
count of screenshots taken used for autoIncreaseFile | |
SoSFBool | showSnapshotWithShell |
start external program when screenshot was saved (Windows only) | |
SoSFMLConnector | outputImage |
ML Output of Viewer screenshot. | |
SoSFEnum | snapshotFormat |
format of the output, may be RGB or GREY | |
SoSFTrigger | updateMLOutput |
trigger the update of the ML output | |
SoSFTrigger | startRecording |
Recorder feature Fields. | |
SoSFTrigger | cancelRecording |
cancel recording | |
SoSFTrigger | continueRecording |
continue recording | |
SoSFTrigger | stopRecording |
stop recording | |
SoSFTrigger | singleFrame |
record a single frame, recording is started if it was not running | |
SoSFTrigger | createAvi |
create an AVI of the movie (by running a createMovie callback) | |
SoSFBool | autoRedrawWhenRecording |
advanced setting if autoredraw of viewer is enabled or if the rendering is done explicitly when saving each frame | |
SoSFFloat | frameRate |
frame rate which the recorder uses to grab the screen | |
SoSFFloat | frameRateAvi |
frame rate that is used in the generated AVI | |
SoSFString | status |
current status of the recorder | |
SoSFString | outputAviFile |
filename (including path) of the avi that will be written. | |
SoSFString | miSelectedPointingAction |
Managed Interaction support. | |
SoSFString | miSelectedPointingActionProvider |
SoSFBool | miSelectedPointingActionActive |
Protected Member Functions | |
~SoFullViewer () override | |
virtual void | viewAllChanged (SoField *) |
field change callbacks: | |
void | saveHomePositionChanged (SoField *) |
void | rescanSceneChanged (SoField *) |
void | resetToHomePositionChanged (SoField *) |
void | cursorChanged (SoField *) |
void | headlightChanged (SoField *) |
void | viewingChanged (SoField *) |
void | stereoViewingChanged (SoField *) |
void | stereoOffsetChanged (SoField *) |
void | popupMenuEnabledChanged (SoField *) |
void | storeAsUserSettingChanged (SoField *) |
void | drawStyleChanged (SoField *) |
void | interactiveDrawStyleChanged (SoField *) |
void | autoClippingChanged (SoField *) |
void | decorationChanged (SoField *) |
void | cameraTypeChanged (SoField *) |
void | applyCameraOrientationChanged (SoField *) |
void | userSettingOrientationChanged (SoField *) |
void | saveCameraChanged (SoField *) |
void | setCameraOrientation (int mode) |
set the camera orientation depend on mode | |
bool | sendEventToScene (int mode, const SoEvent *e) |
returns if the event should still be send to viewer, given the mode | |
Protected Member Functions inherited from SoRenderArea | |
void | setRecordingFlag (bool flag) |
sets the recording flag and starts/stops the recording timer | |
~SoRenderArea () override | |
void | borderChanged (SoField *) |
further field change callbacks: | |
void | antialiasingChanged (SoField *) |
void | sampleBufferChanged (SoField *) |
void | backgroundChanged (SoField *) |
void | transparencyChanged (SoField *) |
void | singleFrameChanged (SoField *) |
void | continueRecordingChanged (SoField *) |
void | cancelRecordingChanged (SoField *) |
void | frameRateChanged (SoField *) |
void | inputDevicesListChanged (SoField *) |
Protected Member Functions inherited from SoViewerNode | |
~SoViewerNode () override | |
Protected Attributes | |
SoTimerSensor * | _timer |
timer that is used to notice API changes in the viewer and apply these changes to this node | |
SoRef< SoCamera > | _camera |
current camera | |
bool | _restoreCameraNextTime |
internal flag if camera needs to be restored | |
SoNode * | _scene |
pointer to the scene that is rendered | |
SbTime | _lastEventTime |
int | _mouseDown |
SoFieldSensor * | _camOrientationSensor |
Sensors. | |
SoFieldSensor * | _viewerOrientationSensor |
SoFieldSensor * | _camPositionSensor |
SoFieldSensor * | _viewerPositionSensor |
SoFieldSensor * | _camNearSensor |
SoFieldSensor * | _camFarSensor |
SoFieldSensor * | _camFocalSensor |
SoFieldSensor * | _camHeightSensor |
SoFieldSensor * | _viewerNearSensor |
SoFieldSensor * | _viewerFarSensor |
SoFieldSensor * | _viewerFocalSensor |
SoFieldSensor * | _viewerHeightSensor |
Protected Attributes inherited from SoRenderArea | |
SoNodeSensor * | _sensor |
FrameGrabber | _writer |
ml::MLSnapshot * | _snapshot |
SoTimerSensor * | _recordSensor |
bool | _isRecording |
bool | _sceneChanged |
FieldSync * | _fieldSync |
SoSceneSetupHelper * | _sceneSetupHelper |
QCursor | _oldCursor |
remember old cursor shape: | |
Protected Attributes inherited from SoViewerNode | |
void * | _currentViewer |
pointer to the current viewer (void, because the concrete type is unkown) | |
SoViewerProxy * | _viewerProxy |
pointer to the proxy for this viewer | |
InvGenerateMovieCB * | _movieCB |
callback for movie generation | |
void * | _movieCBData |
callback data for movie generation | |
InvKeyPressedCB * | _keyPressedCB |
callback for key pressed | |
void * | _keyPressedCBData |
callback data for key pressed | |
InvHandleEventCB * | _handleEventCB |
callback for handleEvent | |
void * | _handleEventCBData |
callback data for handleEvent | |
SoFullViewer encapsulates SoQtFullViewer from Open Inventor in an Inventor Node.
It is an abstract class, see the SoExaminerViewer for an concrete Viewer. SoFullViewer encapsulates SoQtFullViewer from Open Inventor in an Inventor Node. It is an abstract class, see the SoExaminerViewer for an concrete Viewer. For details on the fields, see the html docs of SoExaminerViewer of MeVisLab or have a look at the Open Inventor docs for SoWin/QtFullViewer
Definition at line 33 of file SoFullViewer.h.
camera positions
Enumerator | |
---|---|
CAMERA_KEEP_AS_IS | |
CAMERA_AXIAL | |
CAMERA_SAGITTAL | |
CAMERA_CORONAL | |
CAMERA_HEAD_PROFILE | |
CAMERA_USER_SETTING |
Definition at line 39 of file SoFullViewer.h.
camera type
Enumerator | |
---|---|
CAMERA_PERSPECTIVE | |
CAMERA_ORTHOGRAPHIC |
Definition at line 49 of file SoFullViewer.h.
destination of events when the viewer is in "viewing" mode
Enumerator | |
---|---|
TO_SCENE | |
TO_VIEWER | |
TO_SCENE_AND_VIEWER | |
TO_SCENE_OR_VIEWER |
Definition at line 55 of file SoFullViewer.h.
SoFullViewer::SoFullViewer | ( | ) |
|
overrideprotected |
|
protected |
|
protected |
void SoFullViewer::cameraFieldsChanged | ( | SoFieldSensor * | s | ) |
triggered by above callback
|
static |
static callback used by various fields
|
protected |
|
overridevirtual |
create a viewer in the given window void pointer is used to be compatible to any windows system
Reimplemented from SoViewerNode.
|
protected |
|
protected |
|
overridevirtual |
delete the viewer in the given window
Reimplemented from SoViewerNode.
|
protected |
|
overridevirtual |
overridden to disable cursor keys
Reimplemented from SoRenderArea.
|
overridevirtual |
collect the fields that should be synced on cloned viewers if you derive this method, make sure to call the super class implementation too
Reimplemented from SoRenderArea.
|
overridevirtual |
handle event before viewer, returns true if event was handled
Reimplemented from SoRenderArea.
|
protected |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
returns if the event should still be send to viewer, given the mode
|
protected |
set the camera orientation depend on mode
void SoFullViewer::setStoredCamera | ( | ) |
set stored camera type and value to viewer
|
overridevirtual |
sets all values from fields
Reimplemented from SoRenderArea.
|
overridevirtual |
tells the renderarea about our state
Reimplemented from SoRenderArea.
void SoFullViewer::startTimer | ( | ) |
|
protected |
|
protected |
void SoFullViewer::stopTimer | ( | ) |
|
protected |
|
virtual |
called automatically by timer sensor if storeCurrentState is on
Reimplemented in SoExaminerViewer.
|
virtual |
|
static |
void SoFullViewer::updateCamera | ( | ) |
update camera from viewer
|
protected |
|
protectedvirtual |
field change callbacks:
|
protected |
|
protected |
current camera
Definition at line 205 of file SoFullViewer.h.
|
protected |
Definition at line 219 of file SoFullViewer.h.
|
protected |
Definition at line 220 of file SoFullViewer.h.
|
protected |
Definition at line 221 of file SoFullViewer.h.
|
protected |
Definition at line 218 of file SoFullViewer.h.
|
protected |
Sensors.
Definition at line 213 of file SoFullViewer.h.
|
protected |
Definition at line 215 of file SoFullViewer.h.
|
protected |
Definition at line 231 of file SoFullViewer.h.
|
protected |
Definition at line 232 of file SoFullViewer.h.
|
protected |
internal flag if camera needs to be restored
Definition at line 207 of file SoFullViewer.h.
|
protected |
pointer to the scene that is rendered
Definition at line 210 of file SoFullViewer.h.
|
protected |
timer that is used to notice API changes in the viewer and apply these changes to this node
Definition at line 202 of file SoFullViewer.h.
|
protected |
Definition at line 223 of file SoFullViewer.h.
|
protected |
Definition at line 224 of file SoFullViewer.h.
|
protected |
Definition at line 225 of file SoFullViewer.h.
|
protected |
Definition at line 222 of file SoFullViewer.h.
|
protected |
Definition at line 214 of file SoFullViewer.h.
|
protected |
Definition at line 216 of file SoFullViewer.h.
SoSFEnum SoFullViewer::applyCameraOrientation |
Definition at line 82 of file SoFullViewer.h.
SoSFBool SoFullViewer::autoApplyUserSettingOrientation |
Definition at line 83 of file SoFullViewer.h.
SoSFBool SoFullViewer::autoClipping |
Definition at line 71 of file SoFullViewer.h.
SoSFBool SoFullViewer::automaticViewAll |
Definition at line 97 of file SoFullViewer.h.
SoSFEnum SoFullViewer::button1events |
Event target in "viewing" mode.
Definition at line 122 of file SoFullViewer.h.
SoSFEnum SoFullViewer::button2events |
Definition at line 123 of file SoFullViewer.h.
SoSFEnum SoFullViewer::button3events |
Definition at line 124 of file SoFullViewer.h.
SoSFEnum SoFullViewer::cameraType |
Definition at line 106 of file SoFullViewer.h.
SoSFBool SoFullViewer::cursor |
Definition at line 70 of file SoFullViewer.h.
SoSFBool SoFullViewer::decoration |
Definition at line 67 of file SoFullViewer.h.
SoSFEnum SoFullViewer::drawStyle |
Settings fields.
Definition at line 64 of file SoFullViewer.h.
SoSFFloat SoFullViewer::farDistance |
Definition at line 110 of file SoFullViewer.h.
SoSFFloat SoFullViewer::focalDistance |
Definition at line 111 of file SoFullViewer.h.
SoSFBool SoFullViewer::forceRedrawOnInteraction |
Definition at line 116 of file SoFullViewer.h.
SoSFBool SoFullViewer::headlight |
Definition at line 66 of file SoFullViewer.h.
SoSFFloat SoFullViewer::height |
heightAngle/height depending on perspective/orthographic
Definition at line 105 of file SoFullViewer.h.
SoSFEnum SoFullViewer::initialCameraOrientation |
Viewing.
Definition at line 81 of file SoFullViewer.h.
SoSFEnum SoFullViewer::interactiveDrawStyle |
Definition at line 65 of file SoFullViewer.h.
SoSFBool SoFullViewer::isCameraStored |
Definition at line 99 of file SoFullViewer.h.
SoSFEnum SoFullViewer::keyEvents |
Definition at line 125 of file SoFullViewer.h.
SoSFFloat SoFullViewer::nearDistance |
Definition at line 109 of file SoFullViewer.h.
SoSFRotation SoFullViewer::orientation |
Definition at line 108 of file SoFullViewer.h.
SoSFBool SoFullViewer::perspective |
is perspective camera?
Definition at line 102 of file SoFullViewer.h.
SoSFBool SoFullViewer::popupMenuEnabled |
Definition at line 68 of file SoFullViewer.h.
SoSFVec3f SoFullViewer::position |
Definition at line 107 of file SoFullViewer.h.
SoSFTrigger SoFullViewer::rescanScene |
General camera fields.
this re-scans the scene graph for the camera
Definition at line 94 of file SoFullViewer.h.
SoSFTrigger SoFullViewer::resetToHomePosition |
Definition at line 88 of file SoFullViewer.h.
SoSFBool SoFullViewer::saveCamera |
Definition at line 98 of file SoFullViewer.h.
SoSFTrigger SoFullViewer::saveHomePosition |
Definition at line 87 of file SoFullViewer.h.
SoSFFloat SoFullViewer::stereoOffset |
Definition at line 75 of file SoFullViewer.h.
SoSFBool SoFullViewer::stereoViewing |
stereo viewing settings
Definition at line 74 of file SoFullViewer.h.
SoSFTrigger SoFullViewer::storeAsUserSetting |
Definition at line 114 of file SoFullViewer.h.
SoSFBool SoFullViewer::storeCurrentState |
Definition at line 96 of file SoFullViewer.h.
SoSFRotation SoFullViewer::userSettingOrientation |
Definition at line 113 of file SoFullViewer.h.
SoSFTrigger SoFullViewer::viewAll |
Definition at line 85 of file SoFullViewer.h.
SoSFBool SoFullViewer::viewAllFlag |
Definition at line 86 of file SoFullViewer.h.
SoSFBool SoFullViewer::viewing |
Definition at line 69 of file SoFullViewer.h.