MeVisLab Resolution Independence API
SoExaminerViewer Class Reference

Encapsulates the So*ExaminerViewer of Open Inventor into an Inventor Node. More...

#include <SoExaminerViewer.h>

Inheritance diagram for SoExaminerViewer:
SoFullViewer SoRenderArea SoViewerNode

Public Member Functions

 SoExaminerViewer ()
 
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 storeViewerState () override
 called automatically by timer sensor if storeCurrentState is on
 
void rotationChanged (SoSensor *sensor)
 called when the autorotate time is triggered
 
void reorientCamera (const SbRotation &rot)
 reorient the camera, rotating rot around the focus point of the viewer
 
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 SoFullViewer
 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 ()
 
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 ()
 inventor runtime
 
static void rotationChangedCB (void *data, SoSensor *sensor)
 
- Static Public Member Functions inherited from SoFullViewer
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

SoSFBool animationEnabled
 Fields.
 
SoSFBool feedback
 
SoSFInt32 feedbackSize
 
SoSFTrigger stopAnimating
 
SoSFString mouseInteraction
 
SoSFTrigger startRotation
 Autorotation Fields around given axis.
 
SoSFTrigger stopRotation
 
SoSFVec3f rotationAxis
 
SoSFFloat rotationAngle
 
SoSFInt32 rotationSteps
 
SoSFInt32 rotationCurrentStep
 
SoSFTrigger rotationStopped
 
SoSFBool recordRotation
 
SoSFBool wheelZoomEnabled
 enable zoom/rotation by mouse wheel
 
SoSFBool wheelRotationEnabled
 
- Public Attributes inherited from SoFullViewer
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

 ~SoExaminerViewer () override
 
void stopAnimatingChanged (SoField *)
 further field callbacks
 
void feedbackChanged (SoField *)
 
void feedbackSizeChanged (SoField *)
 
void animationEnabledChanged (SoField *)
 
void mouseInteractionChanged (SoField *)
 
void startRotationChanged (SoField *)
 
void stopRotationChanged (SoField *)
 
void wheelZoomEnabledChanged (SoField *)
 
void wheelRotationEnabledChanged (SoField *)
 
void evaluateInteractionString ()
 
- Protected Member Functions inherited from SoFullViewer
 ~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

bool _rotating
 flag if currently autorotating
 
SoTimerSensor * _rotSensor
 timer sensor for autorotation
 
- Protected Attributes inherited from SoFullViewer
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
 

Additional Inherited Members

- Public Types inherited from SoFullViewer
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...
 

Detailed Description

Encapsulates the So*ExaminerViewer of Open Inventor into an Inventor Node.

For details on the fields, see the html documentation of the module.

Definition at line 25 of file SoExaminerViewer.h.

Constructor & Destructor Documentation

◆ SoExaminerViewer()

SoExaminerViewer::SoExaminerViewer ( )

◆ ~SoExaminerViewer()

SoExaminerViewer::~SoExaminerViewer ( )
overrideprotected

Member Function Documentation

◆ animationEnabledChanged()

void SoExaminerViewer::animationEnabledChanged ( SoField * )
protected

◆ createViewer()

void * SoExaminerViewer::createViewer ( void * hwnd,
SoNode * scene )
overridevirtual

create a viewer in the given window void pointer is used to be compatible to any windows system

Reimplemented from SoViewerNode.

◆ evaluateInteractionString()

void SoExaminerViewer::evaluateInteractionString ( )
protected

◆ feedbackChanged()

void SoExaminerViewer::feedbackChanged ( SoField * )
protected

◆ feedbackSizeChanged()

void SoExaminerViewer::feedbackSizeChanged ( SoField * )
protected

◆ getSyncFieldNames()

void SoExaminerViewer::getSyncFieldNames ( SbStringList & list)
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.

◆ initClass()

static void SoExaminerViewer::initClass ( )
static

inventor runtime

◆ mouseInteractionChanged()

void SoExaminerViewer::mouseInteractionChanged ( SoField * )
protected

◆ reorientCamera()

void SoExaminerViewer::reorientCamera ( const SbRotation & rot)

reorient the camera, rotating rot around the focus point of the viewer

◆ rotationChanged()

void SoExaminerViewer::rotationChanged ( SoSensor * sensor)

called when the autorotate time is triggered

◆ rotationChangedCB()

static void SoExaminerViewer::rotationChangedCB ( void * data,
SoSensor * sensor )
static

◆ setupViewer()

void SoExaminerViewer::setupViewer ( )
overridevirtual

sets all values from fields

Reimplemented from SoRenderArea.

◆ startRotationChanged()

void SoExaminerViewer::startRotationChanged ( SoField * )
protected

◆ stopAnimatingChanged()

void SoExaminerViewer::stopAnimatingChanged ( SoField * )
protected

further field callbacks

◆ stopRotationChanged()

void SoExaminerViewer::stopRotationChanged ( SoField * )
protected

◆ storeViewerState()

void SoExaminerViewer::storeViewerState ( )
overridevirtual

called automatically by timer sensor if storeCurrentState is on

Reimplemented from SoFullViewer.

◆ wheelRotationEnabledChanged()

void SoExaminerViewer::wheelRotationEnabledChanged ( SoField * )
protected

◆ wheelZoomEnabledChanged()

void SoExaminerViewer::wheelZoomEnabledChanged ( SoField * )
protected

Member Data Documentation

◆ _rotating

bool SoExaminerViewer::_rotating
protected

flag if currently autorotating

Definition at line 102 of file SoExaminerViewer.h.

◆ _rotSensor

SoTimerSensor* SoExaminerViewer::_rotSensor
protected

timer sensor for autorotation

Definition at line 104 of file SoExaminerViewer.h.

◆ animationEnabled

SoSFBool SoExaminerViewer::animationEnabled

Fields.

Definition at line 32 of file SoExaminerViewer.h.

◆ feedback

SoSFBool SoExaminerViewer::feedback

Definition at line 33 of file SoExaminerViewer.h.

◆ feedbackSize

SoSFInt32 SoExaminerViewer::feedbackSize

Definition at line 34 of file SoExaminerViewer.h.

◆ mouseInteraction

SoSFString SoExaminerViewer::mouseInteraction

Definition at line 36 of file SoExaminerViewer.h.

◆ recordRotation

SoSFBool SoExaminerViewer::recordRotation

Definition at line 49 of file SoExaminerViewer.h.

◆ rotationAngle

SoSFFloat SoExaminerViewer::rotationAngle

Definition at line 45 of file SoExaminerViewer.h.

◆ rotationAxis

SoSFVec3f SoExaminerViewer::rotationAxis

Definition at line 44 of file SoExaminerViewer.h.

◆ rotationCurrentStep

SoSFInt32 SoExaminerViewer::rotationCurrentStep

Definition at line 47 of file SoExaminerViewer.h.

◆ rotationSteps

SoSFInt32 SoExaminerViewer::rotationSteps

Definition at line 46 of file SoExaminerViewer.h.

◆ rotationStopped

SoSFTrigger SoExaminerViewer::rotationStopped

Definition at line 48 of file SoExaminerViewer.h.

◆ startRotation

SoSFTrigger SoExaminerViewer::startRotation

Autorotation Fields around given axis.

Definition at line 42 of file SoExaminerViewer.h.

◆ stopAnimating

SoSFTrigger SoExaminerViewer::stopAnimating

Definition at line 35 of file SoExaminerViewer.h.

◆ stopRotation

SoSFTrigger SoExaminerViewer::stopRotation

Definition at line 43 of file SoExaminerViewer.h.

◆ wheelRotationEnabled

SoSFBool SoExaminerViewer::wheelRotationEnabled

Definition at line 55 of file SoExaminerViewer.h.

◆ wheelZoomEnabled

SoSFBool SoExaminerViewer::wheelZoomEnabled

enable zoom/rotation by mouse wheel

Definition at line 54 of file SoExaminerViewer.h.


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