MeVisLab Resolution Independence API
SoViewerNode Class Reference

Base class for all viewer nodes in MeVisLab. More...

#include <SoViewerNode.h>

Inheritance diagram for SoViewerNode:
SoRenderArea SoFullViewer SoExaminerViewer

Public Member Functions

 SoViewerNode ()
 
virtual void * createViewer (void *hwnd, SoNode *scene)
 create a viewer in the given window, the scene is shown in the viewer
 
virtual void deleteViewer (void *viewer)
 delete the viewer that was created with createViewer
 
virtual void * getCurrentViewer ()
 returns the currently viewer (or NULL, if none was created)
 
virtual void syncFromViewerNode (SoViewerNode *)
 sync field from given src viewer node (derive to add more synched fields)
 
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 ()
 

Protected Member Functions

 ~SoViewerNode () override
 

Protected Attributes

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
 

Detailed Description

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 it's 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.

Constructor & Destructor Documentation

◆ SoViewerNode()

SoViewerNode::SoViewerNode ( )

◆ ~SoViewerNode()

SoViewerNode::~SoViewerNode ( )
overrideprotected

Member Function Documentation

◆ createViewer()

virtual void * SoViewerNode::createViewer ( void * hwnd,
SoNode * scene )
virtual

create a viewer in the given window, the scene is shown in the viewer

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.

◆ deleteViewer()

virtual void SoViewerNode::deleteViewer ( void * viewer)
virtual

delete the viewer that was created with createViewer

Reimplemented in SoFullViewer, and SoRenderArea.

◆ generateMovie()

void SoViewerNode::generateMovie ( const char * name,
const char * extension,
int count,
float framerate,
const char * targetFile = nullptr )
inline

run move generation

Definition at line 88 of file SoViewerNode.h.

◆ getCurrentViewer()

virtual void * SoViewerNode::getCurrentViewer ( )
inlinevirtual

returns the currently viewer (or NULL, if none was created)

Definition at line 61 of file SoViewerNode.h.

◆ handleEventNotify()

bool SoViewerNode::handleEventNotify ( void * message)
inline

run handle event cb

Definition at line 79 of file SoViewerNode.h.

◆ initClass()

static void SoViewerNode::initClass ( )
static

◆ keyPressedNotify()

bool SoViewerNode::keyPressedNotify ( void * message)
inline

run keypressed cb

Definition at line 70 of file SoViewerNode.h.

◆ setGenerateMovieCB()

void SoViewerNode::setGenerateMovieCB ( InvGenerateMovieCB * cb,
void * data )
inline

set movie generation callback

Definition at line 85 of file SoViewerNode.h.

◆ setHandleEventCB()

void SoViewerNode::setHandleEventCB ( InvHandleEventCB * cb,
void * data )
inline

set a handle event callback

Definition at line 76 of file SoViewerNode.h.

◆ setKeyPressedCB()

void SoViewerNode::setKeyPressedCB ( InvKeyPressedCB * cb,
void * data )
inline

set a keypressed callback

Definition at line 67 of file SoViewerNode.h.

◆ syncFromViewerNode()

virtual void SoViewerNode::syncFromViewerNode ( SoViewerNode * )
inlinevirtual

sync field from given src viewer node (derive to add more synched fields)

Reimplemented in SoRenderArea.

Definition at line 64 of file SoViewerNode.h.

Member Data Documentation

◆ _currentViewer

void* SoViewerNode::_currentViewer
protected

pointer to the current viewer (void, because the concrete type is unkown)

Definition at line 94 of file SoViewerNode.h.

◆ _handleEventCB

InvHandleEventCB* SoViewerNode::_handleEventCB
protected

callback for handleEvent

Definition at line 109 of file SoViewerNode.h.

◆ _handleEventCBData

void* SoViewerNode::_handleEventCBData
protected

callback data for handleEvent

Definition at line 111 of file SoViewerNode.h.

◆ _keyPressedCB

InvKeyPressedCB* SoViewerNode::_keyPressedCB
protected

callback for key pressed

Definition at line 105 of file SoViewerNode.h.

◆ _keyPressedCBData

void* SoViewerNode::_keyPressedCBData
protected

callback data for key pressed

Definition at line 107 of file SoViewerNode.h.

◆ _movieCB

InvGenerateMovieCB* SoViewerNode::_movieCB
protected

callback for movie generation

Definition at line 101 of file SoViewerNode.h.

◆ _movieCBData

void* SoViewerNode::_movieCBData
protected

callback data for movie generation

Definition at line 103 of file SoViewerNode.h.

◆ _viewerProxy

SoViewerProxy* SoViewerNode::_viewerProxy
protected

pointer to the proxy for this viewer

Definition at line 96 of file SoViewerNode.h.


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