VTK  9.3.0
vtkOpenXRManagerConnection.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkOpenXRManagerConnection_h
17 #define vtkOpenXRManagerConnection_h
18 
19 #include "vtkObject.h"
20 #include "vtkRenderingOpenXRModule.h" // For export macro
21 
22 #include "vtkOpenXR.h" // For XrEventDataBuffer
23 VTK_ABI_NAMESPACE_BEGIN
24 
25 class VTKRENDERINGOPENXR_EXPORT vtkOpenXRManagerConnection : public vtkObject
26 {
27 public:
30 
31  virtual bool Initialize() { return true; }
32  virtual bool ConnectToRemote(XrInstance vtkNotUsed(instance), XrSystemId vtkNotUsed(id))
33  {
34  return true;
35  }
36 
40  virtual const char* GetExtensionName() { return ""; }
41 
45  virtual bool HandleXrEvent(const XrEventDataBuffer& vtkNotUsed(eventData)) { return false; }
46 
48 
51  void SetIPAddress(std::string ip) { this->IPAddress = std::move(ip); }
52  std::string const& GetIPAddress() const { return this->IPAddress; }
54 
55 protected:
57  ~vtkOpenXRManagerConnection() override = default;
58 
59  // IP Address to connect to
61 
62 private:
64  void operator=(const vtkOpenXRManagerConnection&) = delete;
65 };
66 
67 VTK_ABI_NAMESPACE_END
68 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
OpenXR manager connection no-op implementation.
void SetIPAddress(std::string ip)
Specify the address to connect to.
~vtkOpenXRManagerConnection() override=default
virtual const char * GetExtensionName()
Return the OpenXR extension name that corresponds to this connection strategy.
static vtkOpenXRManagerConnection * New()
virtual bool ConnectToRemote(XrInstance vtkNotUsed(instance), XrSystemId vtkNotUsed(id))
virtual bool HandleXrEvent(const XrEventDataBuffer &vtkNotUsed(eventData))
Handle Xr events specific to this connection strategy.
std::string const & GetIPAddress() const
Specify the address to connect to.
vtkOpenXRManagerConnection()=default
@ string
Definition: vtkX3D.h:490
Defines the OpenXR types and extensions common to all platforms.