VTK  9.6.20260513
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
15
16#ifndef vtkOpenXRManagerConnection_h
17#define vtkOpenXRManagerConnection_h
18
19#include "vtkObject.h"
20#include "vtkRenderingOpenXRModule.h" // For export macro
21
22namespace vtk::detail
23{
24VTK_ABI_NAMESPACE_BEGIN
26VTK_ABI_NAMESPACE_END
27}
28
29VTK_ABI_NAMESPACE_BEGIN
30class VTKRENDERINGOPENXR_EXPORT vtkOpenXRManagerConnection : public vtkObject
31{
32public:
35
39 virtual bool Initialize() { return true; }
40
44 virtual bool EndInitialize() { return true; }
45
49 virtual const char* GetExtensionName() { return ""; }
50
52
55 void SetIPAddress(std::string ip) { this->IPAddress = std::move(ip); }
56 std::string const& GetIPAddress() const { return this->IPAddress; }
58
59protected:
61 ~vtkOpenXRManagerConnection() override = default;
62
63 // IP Address to connect to
64 std::string IPAddress;
65
66 virtual bool ConnectToRemote(vtk::detail::vtkOpenXRManager& vtkNotUsed(manager)) { return true; }
67
68 friend class vtk::detail::vtkOpenXRManager; // for vtkOpenXRManager::Initialize
69
70private:
72 void operator=(const vtkOpenXRManagerConnection&) = delete;
73};
74
75VTK_ABI_NAMESPACE_END
76#endif
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(vtk::detail::vtkOpenXRManager &manager)
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.
Singleton class that holds a collection of utility functions and member variables to communicate with...