VTK  9.7.1
vtkSkybox.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
13 #ifndef vtkSkybox_h
14 #define vtkSkybox_h
15 
16 #include "vtkActor.h"
17 #include "vtkRenderingCoreModule.h" // For export macro
18 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkSkybox : public vtkActor
22 {
23 public:
24  static vtkSkybox* New();
25  vtkTypeMacro(vtkSkybox, vtkActor);
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
33  double* GetBounds() override;
34 
36 
40  {
44  StereoSphere
45  };
46  vtkGetMacro(Projection, int);
47  vtkSetMacro(Projection, int);
48  void SetProjectionToCube() { this->SetProjection(vtkSkybox::Cube); }
49  void SetProjectionToSphere() { this->SetProjection(vtkSkybox::Sphere); }
50  void SetProjectionToStereoSphere() { this->SetProjection(vtkSkybox::StereoSphere); }
51  void SetProjectionToFloor() { this->SetProjection(vtkSkybox::Floor); }
53 
55 
58  vtkSetVector4Macro(FloorPlane, float);
59  vtkGetVector4Macro(FloorPlane, float);
60  vtkSetVector3Macro(FloorRight, float);
61  vtkGetVector3Macro(FloorRight, float);
63 
65 
72  vtkGetVector2Macro(FloorTexCoordScale, float);
73  vtkSetVector2Macro(FloorTexCoordScale, float);
75 
77 
82  vtkGetMacro(GammaCorrect, bool);
83  vtkSetMacro(GammaCorrect, bool);
84  vtkBooleanMacro(GammaCorrect, bool);
86 
87 protected:
88  vtkSkybox();
89  ~vtkSkybox() override;
90 
92  float FloorPlane[4];
93  float FloorRight[3];
94  float FloorTexCoordScale[2];
95 
96  bool GammaCorrect = false;
97 
98 private:
99  vtkSkybox(const vtkSkybox&) = delete;
100  void operator=(const vtkSkybox&) = delete;
101 };
102 
103 VTK_ABI_NAMESPACE_END
104 #endif // vtkSkybox_h
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
Projection
Set/Get the projection to be used.
Definition: vtkSkybox.h:39
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,1,1) visibility=1 pickable=1 dragable=1 orientation=(0,0,0).
void SetProjectionToSphere()
Set/Get the projection to be used.
Definition: vtkSkybox.h:49
a simple class to control print indentation
Definition: vtkIndent.h:28
Renders a skybox environment.
Definition: vtkSkybox.h:21
int Projection
Definition: vtkSkybox.h:91
void SetProjectionToCube()
Set/Get the projection to be used.
Definition: vtkSkybox.h:48
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
void SetProjectionToFloor()
Set/Get the projection to be used.
Definition: vtkSkybox.h:51
#define VTK_MARSHALAUTO
void SetProjectionToStereoSphere()
Set/Get the projection to be used.
Definition: vtkSkybox.h:50