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) VTK_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) VTK_OVERRIDE;
116 
120  void SetFocalPoint(double, double, double) VTK_OVERRIDE;
121 
125  void SetAmbientColor(double, double, double) VTK_OVERRIDE;
126 
130  void SetDiffuseColor(double, double, double) VTK_OVERRIDE;
131 
135  void SetSpecularColor(double, double, double) VTK_OVERRIDE;
136 
140  void SetIntensity(double) VTK_OVERRIDE;
141 
145  void SetConeAngle(double) VTK_OVERRIDE;
146 
150  void SetAttenuationValues(double, double, double) VTK_OVERRIDE;
151 
155  void SetExponent(double) VTK_OVERRIDE;
156 
160  void SetPositional(int) VTK_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() VTK_OVERRIDE;
235 
236  int LightIndex;
237  int ReplaceMode;
238 
239  bool PositionSet;
240  bool FocalPointSet;
241  bool AmbientColorSet;
242  bool DiffuseColorSet;
243  bool SpecularColorSet;
244  bool IntensitySet;
245  bool ConeAngleSet;
246  bool AttenuationValuesSet;
247  bool ExponentSet;
248  bool PositionalSet;
249 
250 private:
251  vtkExternalLight(const vtkExternalLight&) VTK_DELETE_FUNCTION;
252  void operator=(const vtkExternalLight&) VTK_DELETE_FUNCTION;
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:33
virtual void SetAttenuationValues(double, double, double)
Set/Get the quadratic attenuation constants.
a virtual light for 3D rendering
Definition: vtkLight.h:55
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.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual void SetPositional(int)
Turn positional lighting on or off.
virtual void SetFocalPoint(double, double, double)
Set/Get the point at which the light is shining.