VTK: Rendering/OpenXR/vtkOpenXRManagerConnection.h Source File

| VTK 9.3.1

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:
28 static vtkOpenXRManagerConnection* New();
29 vtkTypeMacro(vtkOpenXRManagerConnection, vtkObject);
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:
56 vtkOpenXRManagerConnection() = default;
57 ~vtkOpenXRManagerConnection() override = default;
58
59 // IP Address to connect to
60 std::string IPAddress;
61
62 private:
63 vtkOpenXRManagerConnection(const vtkOpenXRManagerConnection&) = delete;
64 void operator=(const vtkOpenXRManagerConnection&) = delete;
65 };
66
67 VTK_ABI_NAMESPACE_END
68 #endif
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkOpenXRManagerConnection
OpenXR manager connection no-op implementation.
Definition: vtkOpenXRManagerConnection.h:26
vtkOpenXRManagerConnection::IPAddress
std::string IPAddress
Definition: vtkOpenXRManagerConnection.h:60
vtkOpenXRManagerConnection::SetIPAddress
void SetIPAddress(std::string ip)
Specify the address to connect to.
Definition: vtkOpenXRManagerConnection.h:51
vtkOpenXRManagerConnection::Initialize
virtual bool Initialize()
Definition: vtkOpenXRManagerConnection.h:31
vtkOpenXRManagerConnection::~vtkOpenXRManagerConnection
~vtkOpenXRManagerConnection() override=default
vtkOpenXRManagerConnection::GetExtensionName
virtual const char * GetExtensionName()
Return the OpenXR extension name that corresponds to this connection strategy.
Definition: vtkOpenXRManagerConnection.h:40
vtkOpenXRManagerConnection::New
static vtkOpenXRManagerConnection * New()
vtkOpenXRManagerConnection::ConnectToRemote
virtual bool ConnectToRemote(XrInstance vtkNotUsed(instance), XrSystemId vtkNotUsed(id))
Definition: vtkOpenXRManagerConnection.h:32
vtkOpenXRManagerConnection::HandleXrEvent
virtual bool HandleXrEvent(const XrEventDataBuffer &vtkNotUsed(eventData))
Handle Xr events specific to this connection strategy.
Definition: vtkOpenXRManagerConnection.h:45
vtkOpenXRManagerConnection::GetIPAddress
std::string const & GetIPAddress() const
Specify the address to connect to.
Definition: vtkOpenXRManagerConnection.h:52
vtkOpenXRManagerConnection::vtkOpenXRManagerConnection
vtkOpenXRManagerConnection()=default
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkObject.h
vtkOpenXR.h
Defines the OpenXR types and extensions common to all platforms.