1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOpenXRManagerConnection.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkOpenXRManagerConnection
* @brief OpenXR manager connection no-op implementation
*
* Base class defining the connection strategy used by vtkOpenXRManager.
* It does not perform any operation and will result in vtkOpenXRManager
* initializing a regular Xr session without any connection.
*
* @sa
* vtkOpenXRManager
*/
#ifndef vtkOpenXRManagerConnection_h
#define vtkOpenXRManagerConnection_h
#include "vtkObject.h"
#include "vtkRenderingOpenXRModule.h" // For export macro
#include "vtkOpenXR.h" // For XrEventDataBuffer
VTK_ABI_NAMESPACE_BEGIN
class VTKRENDERINGOPENXR_EXPORT vtkOpenXRManagerConnection : public vtkObject
{
public:
static vtkOpenXRManagerConnection* New();
vtkTypeMacro(vtkOpenXRManagerConnection, vtkObject);
virtual bool Initialize() { return true; }
virtual bool ConnectToRemote(XrInstance vtkNotUsed(instance), XrSystemId vtkNotUsed(id))
{
return true;
}
/**
* Return the OpenXR extension name that corresponds to this connection strategy.
*/
virtual const char* GetExtensionName() { return ""; }
/**
* Handle Xr events specific to this connection strategy
*/
virtual bool HandleXrEvent(const XrEventDataBuffer& vtkNotUsed(eventData)) { return false; }
///@{
/**
* Specify the address to connect to.
*/
void SetIPAddress(std::string ip) { this->IPAddress = std::move(ip); }
std::string const& GetIPAddress() const { return this->IPAddress; }
///@}
protected:
vtkOpenXRManagerConnection() = default;
~vtkOpenXRManagerConnection() = default;
// IP Address to connect to
std::string IPAddress;
private:
vtkOpenXRManagerConnection(const vtkOpenXRManagerConnection&) = delete;
void operator=(const vtkOpenXRManagerConnection&) = delete;
};
VTK_ABI_NAMESPACE_END
#endif
|