|
iMSTK
Interactive Medical Simulation Toolkit
|
Subclasses viewer for the VTK rendering back-end Creates vtk renderer for each scene. Forwards mouse and keyboard events to the vtk renderwindow. More...
#include <imstkVTKOpenVRViewer.h>


Public Member Functions | |
| VTKViewer (std::string name="VTKViewer") | |
| void | setRenderingMode (const Renderer::Mode mode) override |
| Set the rendering mode. In debug, debug actors will be shown. | |
| void | setActiveScene (std::shared_ptr< Scene > scene) override |
| Set scene to be rendered. | |
| const int | getInfoLevelCount () const override |
| Get the amount of info levels. | |
| std::shared_ptr< VTKScreenCaptureUtility > | getScreenCaptureUtility () const |
| Access screen shot utility. | |
| std::shared_ptr< KeyboardDeviceClient > | getKeyboardDevice () const override |
| Returns the device that emits key events. | |
| std::shared_ptr< MouseDeviceClient > | getMouseDevice () const override |
| Returns the device that emits mouse events. | |
Public Member Functions inherited from imstk::AbstractVTKViewer | |
| Renderer::Mode | getRenderingMode () const override |
| Get the current renderer mode. | |
| vtkSmartPointer< vtkRenderWindow > | getVtkRenderWindow () const |
| Get pointer to the vtkRenderWindow rendering. | |
| void | setSize (const int width, const int height) override |
| Set the render window size. | |
| void | setWindowTitle (const std::string &title) override |
| Set the render window title. | |
| void | setUseVsync (const bool useVsync) override |
| Set whether to vertical sync. Sync framerate to the refresh of the monitor. | |
| virtual void | setBackgroundColors (const Color color1, const Color color2=Color(0.0, 0.0, 0.0), const bool gradientBackground=false) override |
| Set the coloring of the screen background If 'gradientBackground' is false or not supplied color1 will fill the entire background. | |
| void | processEvents () override |
| Processes VTK events, includes OS events. | |
| void | setVtkLoggerMode (VTKLoggerMode loggerMode) |
| Set the logger mode. | |
| std::shared_ptr< VTKRenderer > | getActiveVtkRenderer () const |
| Retrieve the renderer associated with the current scene. | |
Public Member Functions inherited from imstk::Viewer | |
| std::shared_ptr< Scene > | getActiveScene () const |
| Get scene currently being rendered. | |
| void | setDebugAxesLength (double x, double y, double z) |
| Set the length of the debug axes. | |
| void | setSize (Vec2i size) |
| virtual const Vec2i | getSize () const |
| std::shared_ptr< Renderer > | getActiveRenderer () const |
| Retrieve the renderer associated with the current scene. | |
| virtual void | setInfoLevel (const int level) |
| Set the info level, usually means display framerates and other viewer related information. | |
| int | getInfoLevel () const |
| Get the current info level. | |
| std::shared_ptr< ScreenCaptureUtility > | getScreenCaptureUtility () const |
| access screen shot utility | |
| double | getVisualFps () const |
Public Member Functions inherited from imstk::Module | |
| virtual const std::string | getTypeName () const =0 |
| Returns collision detection type string name. | |
| SIGNAL (Module, preUpdate) | |
| Posted before updateModule is called. | |
| SIGNAL (Module, postUpdate) | |
| Posted after updateModule is called. | |
| SIGNAL (Module, end) | |
| Posted when module wants to end. | |
| double | getDt () const |
| Get/Set the time step. | |
| void | setDt (const double dt) |
| bool | getInit () const |
| Get whether the module is initialized yet. | |
| bool | getPaused () const |
| Set/Get whether the module is currently paused. | |
| void | setPaused (const bool paused) |
| void | setMuteUpdateEvents (const bool mute) |
| Set/Get whether the module should post pre/post update events. | |
| bool | getMuteUpdateEvents () const |
| ExecutionType | getExecutionType () const |
| Set/Get the execution type (see imstk::ExecutionType) | |
| void | setExecutionType (const ExecutionType type) |
| void | setSleepDelay (const double ms) |
| double | getSleepDelay () const |
| void | pause () |
| void | resume () |
| void | init () |
| void | update () |
| void | uninit () |
Public Member Functions inherited from imstk::EventObject | |
| template<typename T > | |
| void | postEvent (const T &e) |
| Emits the event Direct observers will be immediately called, in sync Queued observers will receive the Command in their queue for later execution, reciever must implement doEvent. | |
| template<typename T > | |
| void | queueEvent (const T &e) |
| Queues event directly to this. | |
| void | doEvent () |
| Do an event, if none exists return. | |
| void | doAllEvents () |
| Do all the events in the event queue. | |
| void | foreachEvent (std::function< void(Command cmd)> func) |
| Thread safe loop over all event commands, one can implement a custom handler. | |
| void | rforeachEvent (std::function< void(Command cmd)> func) |
| thread safe reverse loop over all event commands, one can implement a custom handler | |
| void | clearEvents () |
| Removes all events from queue cleans up copies of the event. | |
Protected Member Functions | |
| bool | initModule () override |
| void | updateModule () override |
| last framerate value used for moving average estimate | |
Protected Member Functions inherited from imstk::AbstractVTKViewer | |
| AbstractVTKViewer (std::string name) | |
| void | uninitModule () override |
Protected Member Functions inherited from imstk::Viewer | |
| Viewer (std::string name) | |
| void | updateFps () |
| Called before render to push back and measure time. | |
Additional Inherited Members | |
Public Types inherited from imstk::AbstractVTKViewer | |
| enum | VTKLoggerMode { SHOW, MUTE, WRITE } |
Public Types inherited from imstk::Module | |
| enum | ExecutionType { SEQUENTIAL, PARALLEL, ADAPTIVE } |
| Currently 3 execution types are provided. These inform the driver on how it should run. | |
Public Types inherited from imstk::EventObject | |
| using | Observer = std::tuple< bool, std::weak_ptr< EventObject >, std::function< void(Event *)> > |
Protected Attributes inherited from imstk::AbstractVTKViewer | |
| vtkSmartPointer< vtkRenderWindow > | m_vtkRenderWindow |
| vtkSmartPointer< vtkInteractorStyle > | m_vtkInteractorStyle |
| vtkSmartPointer< vtkCallbackCommand > | exitCallback |
| bool | m_useVsync = false |
Protected Attributes inherited from imstk::Viewer | |
| std::unordered_map< std::shared_ptr< Scene >, std::shared_ptr< Renderer > > | m_rendererMap |
| std::shared_ptr< Scene > | m_activeScene |
| std::shared_ptr< Entity > | m_debugEntity |
| std::shared_ptr< Camera > | m_debugCamera |
| std::shared_ptr< ScreenCaptureUtility > | m_screenCapturer |
| Screen shot utility. | |
| std::shared_ptr< ViewerConfig > | m_config |
| int | m_infoLevel = 0 |
| Info level. | |
| std::chrono::high_resolution_clock::time_point | m_pre |
| time point pre-rendering | |
| std::chrono::high_resolution_clock::time_point | m_post |
| time point post-rendering | |
| std::chrono::high_resolution_clock::time_point | m_lastFpsUpdate |
| time point for last framerate display update | |
| double | m_visualFps = 0.0 |
| double | m_lastFps = 0.0 |
Protected Attributes inherited from imstk::Module | |
| std::atomic< bool > | m_init = ATOMIC_VAR_INIT(false) |
| std::atomic< bool > | m_paused = ATOMIC_VAR_INIT(false) |
| double | m_dt = 0.0 |
| ExecutionType | m_executionType = ExecutionType::PARALLEL |
| bool | m_muteUpdateEvents = false |
| double | m_sleepDelay = 0.0 |
Protected Attributes inherited from imstk::EventObject | |
| ParallelUtils::SpinLock | eventQueueLock |
| std::deque< Command > | eventQueue |
| std::vector< std::pair< std::string, std::vector< Observer > > > | queuedObservers |
| std::vector< std::pair< std::string, std::vector< Observer > > > | directObservers |
Subclasses viewer for the VTK rendering back-end Creates vtk renderer for each scene. Forwards mouse and keyboard events to the vtk renderwindow.
Subclasses viewer for the VTK rendering back-end Creates vtk renderer for each scene.
Definition at line 25 of file imstkVTKViewer.h.
1.8.13