VTK
vtkOpenGLSkybox.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLSkybox.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
23 #ifndef vtkOpenGLSkybox_h
24 #define vtkOpenGLSkybox_h
25 
26 #include "vtkRenderingOpenGL2Module.h" // For export macro
27 #include "vtkSkybox.h"
28 #include "vtkNew.h" // for ivars
29 
30 class vtkOpenGLActor;
32 class vtkOpenGLRenderer;
33 
34 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLSkybox : public vtkSkybox
35 {
36 public:
37  static vtkOpenGLSkybox *New();
38  vtkTypeMacro(vtkOpenGLSkybox, vtkSkybox);
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
44  void Render(vtkRenderer *ren, vtkMapper *mapper) override;
45 
46 protected:
48  ~vtkOpenGLSkybox() override;
49 
51  float LastCameraPosition[3];
52 
53  void UpdateUniforms(vtkObject*, unsigned long, void*);
54 
57 
58 private:
59  vtkOpenGLSkybox(const vtkOpenGLSkybox&) = delete;
60  void operator=(const vtkOpenGLSkybox&) = delete;
61 };
62 
63 #endif
vtkNew< vtkOpenGLPolyDataMapper > CubeMapper
PolyDataMapper using OpenGL to render.
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:90
abstract base class for most VTK objects
Definition: vtkObject.h:59
abstract specification for renderers
Definition: vtkRenderer.h:63
OpenGL actor.
a simple class to control print indentation
Definition: vtkIndent.h:39
Renders a skybox environment.
Definition: vtkSkybox.h:28
OpenGL Skybox.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:86
vtkNew< vtkOpenGLActor > OpenGLActor
static vtkSkybox * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
OpenGL renderer.