VTK  9.3.1
vtkExternalLight.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
44 #ifndef vtkExternalLight_h
45 #define vtkExternalLight_h
46 
47 #include "vtkLight.h"
48 #include "vtkRenderingExternalModule.h" // For export macro
49 
50 VTK_ABI_NAMESPACE_BEGIN
51 class VTKRENDERINGEXTERNAL_EXPORT vtkExternalLight : public vtkLight
52 {
53 public:
54  vtkTypeMacro(vtkExternalLight, vtkLight);
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
66  static vtkExternalLight* New();
67 
69  {
70  INDIVIDUAL_PARAMS = 0, // default
71  ALL_PARAMS = 1
72  };
73 
75 
80  vtkSetMacro(LightIndex, int);
81  vtkGetMacro(LightIndex, int);
83 
85 
98  vtkSetMacro(ReplaceMode, int);
99  vtkGetMacro(ReplaceMode, int);
101 
105  void SetPosition(double, double, double) override;
106  using Superclass::SetPosition;
107 
111  void SetFocalPoint(double, double, double) override;
112  using Superclass::SetFocalPoint;
113 
117  void SetAmbientColor(double, double, double) override;
118  using Superclass::SetAmbientColor;
119 
123  void SetDiffuseColor(double, double, double) override;
124  using Superclass::SetDiffuseColor;
125 
129  void SetSpecularColor(double, double, double) override;
130  using Superclass::SetSpecularColor;
131 
135  void SetIntensity(double) override;
136 
140  void SetConeAngle(double) override;
141 
145  void SetAttenuationValues(double, double, double) override;
146  using Superclass::SetAttenuationValues;
147 
151  void SetExponent(double) override;
152 
156  void SetPositional(vtkTypeBool) override;
157 
159 
162  vtkGetMacro(PositionSet, bool);
164 
166 
169  vtkGetMacro(FocalPointSet, bool);
171 
173 
176  vtkGetMacro(AmbientColorSet, bool);
178 
180 
183  vtkGetMacro(DiffuseColorSet, bool);
185 
187 
190  vtkGetMacro(SpecularColorSet, bool);
192 
194 
197  vtkGetMacro(IntensitySet, bool);
199 
201 
204  vtkGetMacro(ConeAngleSet, bool);
206 
208 
211  vtkGetMacro(AttenuationValuesSet, bool);
213 
215 
218  vtkGetMacro(ExponentSet, bool);
220 
222 
225  vtkGetMacro(PositionalSet, bool);
227 
228 protected:
230  ~vtkExternalLight() override;
231 
234 
245 
246 private:
247  vtkExternalLight(const vtkExternalLight&) = delete;
248  void operator=(const vtkExternalLight&) = delete;
249 };
250 
251 VTK_ABI_NAMESPACE_END
252 #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).
int vtkTypeBool
Definition: vtkABI.h:64
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:28
virtual void SetAttenuationValues(double, double, double)
Set/Get the quadratic attenuation constants.
a virtual light for 3D rendering
Definition: vtkLight.h:48
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.