#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 |
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) |
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) |
Find or create VTK window. More... | |
PyObject * | libSalomePy_getRenderer (PyObject *self, PyObject *args) |
PyObject * | libSalomePy_getRenderWindow (PyObject *self, PyObject *args) |
PyObject * | libSalomePy_getRenderWindowInteractor (PyObject *self, PyObject *args) |
PyObject * | libSalomePy_showTrihedron (PyObject *self, PyObject *args) |
PyObject * | libSalomePy_fitAll (PyObject *self, PyObject *args) |
PyObject * | libSalomePy_setView (PyObject *self, PyObject *args) |
PyObject * | libSalomePy_resetView (PyObject *self, PyObject *args) |
void | initlibSalomePy () |
Python module initialization. More... | |
Variables | |
static PyMethodDef | Module_Methods [] |
#define PUBLISH_ENUM | ( | i | ) |
#define SALOMEPY_EXPORT |
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 |
|
static |
theClassName | Python class name |
|
static |
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().
void initlibSalomePy | ( | ) |
References Module_Methods, PUBLISH_ENUM, ViewBack, ViewBottom, ViewFront, ViewLeft, ViewRight, and ViewTop.
PyObject* libSalomePy_fitAll | ( | PyObject * | self, |
PyObject * | args | ||
) |
References __Find, TEvent::Execute(), GetVTKViewWindow(), ProcessVoidEvent(), and TEvent::TEvent().
PyObject* libSalomePy_getRenderer | ( | PyObject * | self, |
PyObject * | args | ||
) |
References ProcessEvent().
PyObject* libSalomePy_getRenderWindow | ( | PyObject * | self, |
PyObject * | args | ||
) |
References ProcessEvent().
PyObject* libSalomePy_getRenderWindowInteractor | ( | PyObject * | self, |
PyObject * | args | ||
) |
References ProcessEvent().
PyObject* libSalomePy_resetView | ( | PyObject * | self, |
PyObject * | args | ||
) |
References __Find, TEvent::Execute(), GetVTKViewWindow(), ProcessVoidEvent(), and TEvent::TEvent().
PyObject* libSalomePy_setView | ( | PyObject * | self, |
PyObject * | args | ||
) |
References __Find, TEvent::Execute(), GetVTKViewWindow(), ProcessVoidEvent(), TEvent::TEvent(), ViewBack, ViewBottom, ViewFront, ViewLeft, ViewRight, and ViewTop.
PyObject* libSalomePy_showTrihedron | ( | PyObject * | self, |
PyObject * | args | ||
) |
References __Find, TEvent::Execute(), GetVTKViewWindow(), ProcessVoidEvent(), and TEvent::TEvent().
|
static |