VTK  9.3.1
vtkOpenXRModel.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
12 #ifndef vtkOpenXRModel_h
13 #define vtkOpenXRModel_h
14 
15 #include "vtkRenderingOpenXRModule.h" // For export macro
16 #include "vtkVRModel.h"
17 #include <atomic> // for ivars
18 #include <vector> // for ivars
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class VTKRENDERINGOPENXR_EXPORT vtkOpenXRModel : public vtkVRModel
22 {
23 public:
24  static vtkOpenXRModel* New();
25  vtkTypeMacro(vtkOpenXRModel, vtkVRModel);
26 
27 protected:
28  vtkOpenXRModel() = default;
29  ~vtkOpenXRModel() override = default;
30 
31  void FillModelHelper() override;
32  void SetPositionAndTCoords() override;
33  void CreateTextureObject(vtkOpenGLRenderWindow* win) override;
34  void LoadModelAndTexture(vtkOpenGLRenderWindow* win) override;
35 
36  std::atomic<bool> ModelLoading{ false };
37  std::atomic<bool> ModelLoaded{ false };
38  void AsyncLoad();
39 
40  std::vector<float> ModelVBOData;
41  std::vector<uint16_t> ModelIBOData;
42  std::vector<uint8_t> TextureData;
43 
44 private:
45  vtkOpenXRModel(const vtkOpenXRModel&) = delete;
46  void operator=(const vtkOpenXRModel&) = delete;
47 };
48 
49 VTK_ABI_NAMESPACE_END
50 #endif
OpenGL rendering window.
virtual void SetPositionAndTCoords()=0
virtual void CreateTextureObject(vtkOpenGLRenderWindow *win)=0
virtual void FillModelHelper()=0
std::vector< uint8_t > TextureData
std::vector< float > ModelVBOData
VR device model.
Definition: vtkVRModel.h:28
OpenXR device model.
virtual void LoadModelAndTexture(vtkOpenGLRenderWindow *win)=0
std::vector< uint16_t > ModelIBOData
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...