#include <Python.h>
#include <vtkPythonUtil.h>
#include <vtkVersion.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <SALOME_Event.h>
#include <SUIT_Session.h>
#include <LightApp_Application.h>
#include <LightApp_Study.h>
#include <SVTK_ViewManager.h>
#include <SVTK_ViewWindow.h>
Classes | |
class | TGetRendererEvent |
class | TGetRenderWindowEvent |
class | TGetRenderWindowInteractorEvent |
struct | module_state |
Macros | |
#define | VTK_XVERSION (VTK_MAJOR_VERSION*10000+VTK_MINOR_VERSION*100+VTK_BUILD_VERSION) |
#define | SALOMEPY_EXPORT |
Python wrappings for VTK viewer of the SALOME desktop. More... | |
#define | PUBLISH_ENUM(i) |
#define | GETSTATE(m) ((struct module_state*)PyModule_GetState(m)) |
Enumerations | |
enum | { ViewFront , ViewBack , ViewTop , ViewBottom , ViewRight , ViewLeft } |
View operation type. More... | |
enum | { __Find , __FindOrCreate , __Create } |
VTK window find/create mode. More... | |
Functions | |
static PyTypeObject * | GetPyClass (const char *theClassName) |
Get Python class object by name. More... | |
static SVTK_ViewWindow * | GetVTKViewWindow (int toCreate=__FindOrCreate, int toKeepDetached=0) |
Find or create VTK window. More... | |
PyObject * | libSalomePy_getRenderer (PyObject *, PyObject *args) |
PyObject * | libSalomePy_getRenderWindow (PyObject *, PyObject *args) |
PyObject * | libSalomePy_getRenderWindowInteractor (PyObject *, PyObject *args) |
PyObject * | libSalomePy_showTrihedron (PyObject *, PyObject *args) |
PyObject * | libSalomePy_fitAll (PyObject *, PyObject *) |
PyObject * | libSalomePy_setView (PyObject *, PyObject *args) |
PyObject * | libSalomePy_resetView (PyObject *, PyObject *) |
static int | libSalomePy_traverse (PyObject *m, visitproc visit, void *arg) |
static int | libSalomePy_clear (PyObject *m) |
PyMODINIT_FUNC | PyInit_libSalomePy (void) |
Python module initialization. More... | |
Variables | |
static PyMethodDef | libSalomePy_methods [] |
static struct PyModuleDef | moduledef |
#define GETSTATE | ( | m | ) | ((struct module_state*)PyModule_GetState(m)) |
#define PUBLISH_ENUM | ( | i | ) |
#define SALOMEPY_EXPORT |
Python wrappings for VTK viewer of the SALOME desktop.
All methods are implemented using Event mechanism. The module provides the following functions:
Usage in Python:
The methods getRenderer(), getRenderWindow() and getRenderWindowInteractor() open new VTK viewer if there is no one opened. In case of any error these methods return None object to the Python.
#define VTK_XVERSION (VTK_MAJOR_VERSION*10000+VTK_MINOR_VERSION*100+VTK_BUILD_VERSION) |
anonymous enum |
anonymous enum |
VTK window find/create mode.
Enumerator | |
---|---|
__Find | |
__FindOrCreate | |
__Create |
|
static |
Get Python class object by name.
theClassName | Python class name |
|
static |
Find or create VTK window.
toCreate | window find/create mode |
References __Create, __FindOrCreate, SUIT_Session::activeApplication(), SUIT_Application::activeStudy(), LightApp_Application::createViewManager(), SUIT_ViewManager::createViewWindow(), SUIT_ViewManager::getActiveView(), LightApp_Application::getViewManager(), SUIT_ViewManager::getViews(), and SUIT_Session::session().
|
static |
References GETSTATE.
PyObject* libSalomePy_fitAll | ( | PyObject * | , |
PyObject * | |||
) |
References __Find, SALOME_Event::Execute(), GetVTKViewWindow(), and ProcessVoidEvent().
PyObject* libSalomePy_getRenderer | ( | PyObject * | , |
PyObject * | args | ||
) |
References ProcessEvent().
PyObject* libSalomePy_getRenderWindow | ( | PyObject * | , |
PyObject * | args | ||
) |
References ProcessEvent().
PyObject* libSalomePy_getRenderWindowInteractor | ( | PyObject * | , |
PyObject * | args | ||
) |
References ProcessEvent().
PyObject* libSalomePy_resetView | ( | PyObject * | , |
PyObject * | |||
) |
References __Find, SALOME_Event::Execute(), GetVTKViewWindow(), and ProcessVoidEvent().
PyObject* libSalomePy_setView | ( | PyObject * | , |
PyObject * | args | ||
) |
References __Find, SALOME_Event::Execute(), GetVTKViewWindow(), ProcessVoidEvent(), ViewBack, ViewBottom, ViewFront, ViewLeft, ViewRight, and ViewTop.
PyObject* libSalomePy_showTrihedron | ( | PyObject * | , |
PyObject * | args | ||
) |
References __Find, SALOME_Event::Execute(), GetVTKViewWindow(), and ProcessVoidEvent().
|
static |
References GETSTATE.
PyMODINIT_FUNC PyInit_libSalomePy | ( | void | ) |
Python module initialization.
References moduledef, PUBLISH_ENUM, ViewBack, ViewBottom, ViewFront, ViewLeft, ViewRight, and ViewTop.
|
static |
|
static |