vtkSMVRPythonInteractorStyleProxy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef vtkSMVRPythonInteractorStyleProxy_h
4 #define vtkSMVRPythonInteractorStyleProxy_h
5 
6 #include "vtkPVIncubatorCAVEInteractionStylesModule.h" // for export macro
8 
9 #include <string>
10 
11 class vtkPVXMLElement;
12 class vtkSmartPyObject;
15 class vtkSMProxy;
17 class vtkTransform;
18 class vtkVREvent;
19 
20 class VTKPVINCUBATORCAVEINTERACTIONSTYLES_EXPORT vtkSMVRPythonInteractorStyleProxy
22 {
23 public:
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
29 
33  vtkSetFilePathMacro(FileName);
34  vtkGetFilePathMacro(FileName);
36 
38 
41  void ReloadPythonFile();
43 
45 
48  void RecreateVTKObjects() override;
50 
59  void SetPythonObject(void* obj);
61 
63 
67  void UpdateVTKObjects() override;
69 
70 protected:
73  void HandleTracker(const vtkVREvent& event) override;
74  void HandleValuator(const vtkVREvent& event) override;
75  void HandleButton(const vtkVREvent& event) override;
76  void InvokeHandler(const char* mname, const vtkVREvent& event);
78  bool Configure(vtkPVXMLElement* child, vtkSMProxyLocator* locator) override;
79 
80  // Read the python file located on the filesystem at "path" into "contents"
81  bool ReadPythonFile(const char* path, std::string& contents);
82 
83  char* FileName;
84 
85 private:
87  const vtkSMVRPythonInteractorStyleProxy&) = delete; // Not implemented.
88  void operator=(const vtkSMVRPythonInteractorStyleProxy&) = delete; // Not implemented.
89 
90  class Internal;
91  Internal* Internals;
92 };
93 
94 #endif // vtkSMVRPythonInteractorStyleProxy_h
virtual void HandleButton(const vtkVREvent &event)
virtual void RecreateVTKObjects()
Recreate the VTK object for this proxy.
virtual bool Configure(vtkPVXMLElement *child, vtkSMProxyLocator *)
Load state for the style from XML.
property representing a vector of integers
virtual void UpdateVTKObjects()
Update the VTK object on the server by pushing the values of all modified properties (un-modified pro...
implementation for View that includes render window and renderers.
property representing a vector of doubles
virtual void HandleTracker(const vtkVREvent &event)
virtual void HandleValuator(const vtkVREvent &event)
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
is used to locate proxies referred to in state xmls while loading state files.
void PrintSelf(ostream &os, vtkIndent indent) override
virtual vtkPVXMLElement * SaveConfiguration()
Save state to xml.
static vtkSMVRInteractorStyleProxy * New()
vtkSMProxyInternals * Internals
Definition: vtkSMProxy.h:1024
This is used by vtkPVXMLParser to represent an XML document starting at the root element.