VTK  9.7.1
vtkOpenGLSkybox.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
14 #ifndef vtkOpenGLSkybox_h
15 #define vtkOpenGLSkybox_h
16 
17 #include "vtkMatrix3x3.h"
18 #include "vtkNew.h" // for ivars
19 #include "vtkRenderingOpenGL2Module.h" // For export macro
20 #include "vtkSkybox.h"
21 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkOpenGLActor;
27 
28 class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOpenGLSkybox : public vtkSkybox
29 {
30 public:
31  static vtkOpenGLSkybox* New();
33  static vtkOverrideAttribute* CreateOverrideAttributes();
34  vtkTypeMacro(vtkOpenGLSkybox, vtkSkybox);
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
40  void Render(vtkRenderer* ren, vtkMapper* mapper) override;
41 
46  void SetMapper(vtkMapper* mapper) override;
47 
48 protected:
50  ~vtkOpenGLSkybox() override;
51 
54  float LastCameraPosition[3];
55 
56  void UpdateUniforms(vtkObject*, unsigned long, void*);
57 
61 
62 private:
63  vtkOpenGLSkybox(const vtkOpenGLSkybox&) = delete;
64  void operator=(const vtkOpenGLSkybox&) = delete;
65 
66  vtkNew<vtkMatrix3x3> RotationMatrix;
67 };
68 
69 #define vtkOpenGLSkybox_OVERRIDE_ATTRIBUTES vtkOpenGLSkybox::CreateOverrideAttributes()
70 VTK_ABI_NAMESPACE_END
71 #endif
vtkNew< vtkOpenGLPolyDataMapper > CubeMapper
PolyDataMapper using OpenGL to render.
Attribute for vtkObjectFactory overrides.
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:83
abstract base class for most VTK objects
Definition: vtkObject.h:52
abstract specification for renderers
Definition: vtkRenderer.h:63
OpenGL actor.
a simple class to control print indentation
Definition: vtkIndent.h:28
Renders a skybox environment.
Definition: vtkSkybox.h:21
OpenGL Skybox.
#define VTK_NEWINSTANCE
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:77
vtkNew< vtkOpenGLActor > OpenGLActor
static vtkSkybox * New()
vtkRenderer * CurrentRenderer
virtual void SetMapper(vtkMapper *)
This is the method that is used to connect an actor to the end of a visualization pipeline...
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.