VTK  9.2.6
vtkOpenXRModel.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 
5 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6 All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
23 #ifndef vtkOpenXRModel_h
24 #define vtkOpenXRModel_h
25 
26 #include "vtkRenderingOpenXRModule.h" // For export macro
27 #include "vtkVRModel.h"
28 #include <atomic> // for ivars
29 #include <vector> // for ivars
30 
31 class VTKRENDERINGOPENXR_EXPORT vtkOpenXRModel : public vtkVRModel
32 {
33 public:
34  static vtkOpenXRModel* New();
35  vtkTypeMacro(vtkOpenXRModel, vtkVRModel);
36 
37 protected:
38  vtkOpenXRModel() = default;
39  ~vtkOpenXRModel() override = default;
40 
41  void FillModelHelper() override;
42  void SetPositionAndTCoords() override;
43  void CreateTextureObject(vtkOpenGLRenderWindow* win) override;
44  void LoadModelAndTexture(vtkOpenGLRenderWindow* win) override;
45 
46  std::atomic<bool> ModelLoading{ false };
47  std::atomic<bool> ModelLoaded{ false };
48  void AsyncLoad();
49 
50  std::vector<float> ModelVBOData;
51  std::vector<uint16_t> ModelIBOData;
52  std::vector<uint8_t> TextureData;
53 
54 private:
55  vtkOpenXRModel(const vtkOpenXRModel&) = delete;
56  void operator=(const vtkOpenXRModel&) = delete;
57 };
58 
59 #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:39
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...