13#ifndef SO_VIEWER_NODE_H
14#define SO_VIEWER_NODE_H
20#include <Inventor/nodes/SoSubNode.h>
21#include <Inventor/nodes/SoSeparator.h>
71 if (_keyPressedCB)
return (*_keyPressedCB)(_keyPressedCBData,
this, message) ?
true :
false;
80 if (_handleEventCB)
return (*_handleEventCB)(_handleEventCBData,
this, message) ?
true :
false;
88 void generateMovie(
const char* name,
const char* extension,
int count,
float framerate,
const char* targetFile=
nullptr) {
89 if (_movieCB) (*_movieCB)(_movieCBData,
this, name, extension, count, framerate, targetFile);
#define INVENTORGUIWRAPPER_API
Library initialization interface of the inventor GUI wrapper.
void InvGenerateMovieCB(void *data, void *component, const char *name, const char *extension, int count, float framerate, const char *targetFile)
Callback used for movie generation.
int InvKeyPressedCB(void *data, void *component, void *message)
Callback used for key pressed forwarding (return 1 if used, 0 else) (deprecated!)
int InvHandleEventCB(void *data, void *component, void *message)
Callback used for event handling of viewers (return 1 if handled, 0 else) this replaces the above Inv...
Base class for all viewer nodes in MeVisLab.
void * _movieCBData
callback data for movie generation
void setKeyPressedCB(InvKeyPressedCB *cb, void *data)
set a keypressed callback
void * _currentViewer
pointer to the current viewer (void, because the concrete type is unkown)
SoViewerProxy * _viewerProxy
pointer to the proxy for this viewer
void * _handleEventCBData
callback data for handleEvent
virtual void deleteViewer(void *viewer)
delete the viewer that was created with createViewer
virtual void * createViewer(void *hwnd, SoNode *scene)
create a viewer in the given window, the scene is shown in the viewer
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)
InvHandleEventCB * _handleEventCB
callback for handleEvent
void generateMovie(const char *name, const char *extension, int count, float framerate, const char *targetFile=nullptr)
run move generation
void * _keyPressedCBData
callback data for key pressed
bool keyPressedNotify(void *message)
run keypressed cb
InvGenerateMovieCB * _movieCB
callback for movie generation
void setHandleEventCB(InvHandleEventCB *cb, void *data)
set a handle event callback
InvKeyPressedCB * _keyPressedCB
callback for key pressed
bool handleEventNotify(void *message)
run handle event cb
void setGenerateMovieCB(InvGenerateMovieCB *cb, void *data)
set movie generation callback
This class gives access to state of a viewer during scene graph traversal.