VTK
vtkExternalLight.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExternalLight.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 =========================================================================*/
55 #ifndef vtkExternalLight_h
56 #define vtkExternalLight_h
57 
58 #include "vtkRenderingExternalModule.h" // For export macro
59 #include "vtkLight.h"
60 
61 class VTKRENDERINGEXTERNAL_EXPORT vtkExternalLight : public vtkLight
62 {
63 public:
64  vtkTypeMacro(vtkExternalLight, vtkLight);
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
76  static vtkExternalLight *New();
77 
79  {
80  INDIVIDUAL_PARAMS = 0, // default
81  ALL_PARAMS = 1
82  };
83 
85 
90  vtkSetMacro(LightIndex, int);
91  vtkGetMacro(LightIndex, int);
93 
95 
108  vtkSetMacro(ReplaceMode, int);
109  vtkGetMacro(ReplaceMode, int);
111 
115  void SetPosition(double, double, double) override;
116 
120  void SetFocalPoint(double, double, double) override;
121 
125  void SetAmbientColor(double, double, double) override;
126 
130  void SetDiffuseColor(double, double, double) override;
131 
135  void SetSpecularColor(double, double, double) override;
136 
140  void SetIntensity(double) override;
141 
145  void SetConeAngle(double) override;
146 
150  void SetAttenuationValues(double, double, double) override;
151 
155  void SetExponent(double) override;
156 
160  void SetPositional(int) override;
161 
163 
166  vtkGetMacro(PositionSet, bool);
168 
170 
173  vtkGetMacro(FocalPointSet, bool);
175 
177 
180  vtkGetMacro(AmbientColorSet, bool);
182 
184 
187  vtkGetMacro(DiffuseColorSet, bool);
189 
191 
194  vtkGetMacro(SpecularColorSet, bool);
196 
198 
201  vtkGetMacro(IntensitySet, bool);
203 
205 
208  vtkGetMacro(ConeAngleSet, bool);
210 
212 
215  vtkGetMacro(AttenuationValuesSet, bool);
217 
219 
222  vtkGetMacro(ExponentSet, bool);
224 
226 
229  vtkGetMacro(PositionalSet, bool);
231 
232 protected:
234  ~vtkExternalLight() override;
235 
238 
249 
250 private:
251  vtkExternalLight(const vtkExternalLight&) = delete;
252  void operator=(const vtkExternalLight&) = delete;
253 };
254 
255 #endif // vtkExternalLight_h
virtual void SetSpecularColor(double, double, double)
Set/Get the color of the light.
virtual void SetDiffuseColor(double, double, double)
Set/Get the color of the light.
virtual void SetExponent(double)
Set/Get the exponent of the cosine used in positional lighting.
virtual void SetPosition(double, double, double)
Set/Get the position of the light.
a virtual light object for tweaking existing lights in an external 3D rendering context ...
static vtkLight * New()
Create a light with the focal point at the origin and its position set to (0,0,1).
virtual void SetAmbientColor(double, double, double)
Set/Get the color of the light.
virtual void SetIntensity(double)
Set/Get the brightness of the light (from one to zero).
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void SetAttenuationValues(double, double, double)
Set/Get the quadratic attenuation constants.
a virtual light for 3D rendering
Definition: vtkLight.h:62
virtual void SetConeAngle(double)
Set/Get the lighting cone angle of a positional light in degrees.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetPositional(vtkTypeBool)
Turn positional lighting on or off.
virtual void SetFocalPoint(double, double, double)
Set/Get the point at which the light is shining.