iMSTK
Interactive Medical Simulation Toolkit
imstkVTKViewer.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkAbstractVTKViewer.h"
10 #include "imstkMacros.h"
11 
12 namespace imstk
13 {
14 class KeyboardDeviceClient;
15 class MouseDeviceClient;
16 class Scene;
17 class VTKScreenCaptureUtility;
18 
26 {
27 public:
28  VTKViewer(std::string name = "VTKViewer");
29  ~VTKViewer() override = default;
30 
31  IMSTK_TYPE_NAME(VTKViewer)
32 
33 
34  void setRenderingMode(const Renderer::Mode mode) override;
37 
41  void setActiveScene(std::shared_ptr<Scene> scene) override;
42 
46  const int getInfoLevelCount() const override { return 3; }
47 
51  std::shared_ptr<VTKScreenCaptureUtility> getScreenCaptureUtility() const;
52 
56  std::shared_ptr<KeyboardDeviceClient> getKeyboardDevice() const override;
57 
61  std::shared_ptr<MouseDeviceClient> getMouseDevice() const override;
62 
63 protected:
64  bool initModule() override;
65 
66  void updateModule() override;
67 };
68 } // namespace imstk
void setActiveScene(std::shared_ptr< Scene > scene) override
Set scene to be rendered.
std::shared_ptr< KeyboardDeviceClient > getKeyboardDevice() const override
Returns the device that emits key events.
Compound Geometry.
const int getInfoLevelCount() const override
Get the amount of info levels.
std::shared_ptr< VTKScreenCaptureUtility > getScreenCaptureUtility() const
Access screen shot utility.
Subclasses viewer for the VTK rendering back-end Creates vtk renderer for each scene. Forwards mouse and keyboard events to the vtk renderwindow.
Mode
Enumerations for the render mode.
Definition: imstkRenderer.h:47
Subclasses viewer for the VTK rendering back-end.
void setRenderingMode(const Renderer::Mode mode) override
Set the rendering mode. In debug, debug actors will be shown.
void updateModule() override
last framerate value used for moving average estimate
std::shared_ptr< MouseDeviceClient > getMouseDevice() const override
Returns the device that emits mouse events.