VTK  9.4.20250114
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
23VTK_ABI_NAMESPACE_BEGIN
24
25class VTKRENDERINGOPENXR_EXPORT vtkOpenXRManagerConnection : public vtkObject
26{
27public:
30
34 virtual bool Initialize() { return true; }
35
39 virtual bool EndInitialize() { return true; }
40
41 virtual bool ConnectToRemote(XrInstance vtkNotUsed(instance), XrSystemId vtkNotUsed(id))
42 {
43 return true;
44 }
45
49 virtual const char* GetExtensionName() { return ""; }
50
54 virtual bool HandleXrEvent(const XrEventDataBuffer& vtkNotUsed(eventData)) { return false; }
55
57
60 void SetIPAddress(std::string ip) { this->IPAddress = std::move(ip); }
61 std::string const& GetIPAddress() const { return this->IPAddress; }
63
64protected:
66 ~vtkOpenXRManagerConnection() override = default;
67
68 // IP Address to connect to
69 std::string IPAddress;
70
71private:
73 void operator=(const vtkOpenXRManagerConnection&) = delete;
74};
75
76VTK_ABI_NAMESPACE_END
77#endif
abstract base class for most VTK objects
Definition vtkObject.h:162
OpenXR manager connection no-op implementation.
void SetIPAddress(std::string ip)
Specify the address to connect to.
virtual bool Initialize()
Function called by vtkOpenXRManager before OpenXR initialization.
~vtkOpenXRManagerConnection() override=default
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.
virtual const char * GetExtensionName()
Return the OpenXR extension name that corresponds to this connection strategy.
vtkOpenXRManagerConnection()=default
virtual bool EndInitialize()
Function called by vtkOpenXRManager after OpenXR initialization.
Defines the OpenXR types and extensions common to all platforms.