|
MeVisLab Resolution Independence API
|
Base class for all viewer nodes in MeVisLab. More...
#include <SoViewerNode.h>
Public Member Functions | |
| SoViewerNode () | |
| virtual void * | createViewer (void *hwnd, SoNode *scene) |
| Creates a viewer in the given window, the scene is shown in the viewer. | |
| virtual void | deleteViewer (void *viewer) |
| Deletes the viewer that was created with createViewer. | |
| virtual void * | getCurrentViewer () |
| Returns the currently viewer (or NULL if none was created). | |
| virtual void | syncFromViewerNode (SoViewerNode *) |
| Syncs field from given src viewer node (derive to add more synched fields). | |
| void | setKeyPressedCB (InvKeyPressedCB *cb, void *data) |
| Sets a keypressed callback. | |
| bool | keyPressedNotify (void *message) |
| Runs callback for keypressed event. | |
| void | setHandleEventCB (InvHandleEventCB *cb, void *data) |
| Sets a handle event callback. | |
| bool | handleEventNotify (void *message) |
| Runs handle event callback. | |
| void | setGenerateMovieCB (InvGenerateMovieCB *cb, void *data) |
| Sets movie generation callback. | |
| void | generateMovie (const char *name, const char *extension, int count, float framerate, const char *targetFile=nullptr) |
| Runs move generation callback. | |
Static Public Member Functions | |
| static void | initClass () |
Protected Member Functions | |
| ~SoViewerNode () override | |
Protected Attributes | |
| void * | _currentViewer |
| Pointer to the current viewer (void, as the concrete type is unknown). | |
| 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. | |
Base class for all viewer nodes in MeVisLab.
Since the SoQtExaminerViewer, etc., are not SoNode classes and have no way to save their state persistently, we decided to wrap all viewers and their creation/persistence in the SoViewerNode and its derived classes. The mostly used SoViewerNodes are located in the SoViewers project, e.g., the SoRenderArea and SoExaminerViewer. In many cases when you want to add a viewer to MeVisLab, you would derive either from the SoRenderArea or SoFullViewer class and not from this base class.
Definition at line 41 of file SoViewerNode.h.
| SoViewerNode::SoViewerNode | ( | ) |
Referenced by SoRenderArea::syncFromViewerNode(), and syncFromViewerNode().
|
overrideprotected |
|
virtual |
Creates a viewer in the given window, the scene is shown in the viewer.
A void pointer is used to be compatible to any windows system, on Qt it is a QWidget, on TGS SoWin it is a HWND. Only one viewer can be created at a time.
Reimplemented in SoExaminerViewer, SoFullViewer, and SoRenderArea.
|
virtual |
Deletes the viewer that was created with createViewer.
Reimplemented in SoFullViewer, and SoRenderArea.
|
inline |
Runs move generation callback.
Definition at line 88 of file SoViewerNode.h.
References _movieCB, and _movieCBData.
|
inlinevirtual |
Returns the currently viewer (or NULL if none was created).
Definition at line 61 of file SoViewerNode.h.
References _currentViewer.
|
inline |
Runs handle event callback.
Definition at line 79 of file SoViewerNode.h.
References _handleEventCB, and _handleEventCBData.
|
static |
|
inline |
Runs callback for keypressed event.
Definition at line 70 of file SoViewerNode.h.
References _keyPressedCB, and _keyPressedCBData.
|
inline |
Sets movie generation callback.
Definition at line 85 of file SoViewerNode.h.
References _movieCB, and _movieCBData.
|
inline |
Sets a handle event callback.
Definition at line 76 of file SoViewerNode.h.
References _handleEventCB, and _handleEventCBData.
|
inline |
Sets a keypressed callback.
Definition at line 67 of file SoViewerNode.h.
References _keyPressedCB, and _keyPressedCBData.
|
inlinevirtual |
Syncs field from given src viewer node (derive to add more synched fields).
Reimplemented in SoRenderArea.
Definition at line 64 of file SoViewerNode.h.
References SoViewerNode().
|
protected |
Pointer to the current viewer (void, as the concrete type is unknown).
Definition at line 94 of file SoViewerNode.h.
Referenced by getCurrentViewer().
|
protected |
Callback for handleEvent.
Definition at line 109 of file SoViewerNode.h.
Referenced by handleEventNotify(), and setHandleEventCB().
|
protected |
Callback data for handleEvent.
Definition at line 111 of file SoViewerNode.h.
Referenced by handleEventNotify(), and setHandleEventCB().
|
protected |
Callback for key pressed.
Definition at line 105 of file SoViewerNode.h.
Referenced by keyPressedNotify(), and setKeyPressedCB().
|
protected |
Callback data for key pressed.
Definition at line 107 of file SoViewerNode.h.
Referenced by keyPressedNotify(), and setKeyPressedCB().
|
protected |
Callback for movie generation.
Definition at line 101 of file SoViewerNode.h.
Referenced by generateMovie(), and setGenerateMovieCB().
|
protected |
Callback data for movie generation.
Definition at line 103 of file SoViewerNode.h.
Referenced by generateMovie(), and setGenerateMovieCB().
|
protected |
Pointer to the proxy for this viewer.
Definition at line 96 of file SoViewerNode.h.