VTK
vtkLightActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLightActor.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 =========================================================================*/
37 #ifndef vtkLightActor_h
38 #define vtkLightActor_h
39 
40 #include "vtkRenderingCoreModule.h" // For export macro
41 #include "vtkProp3D.h"
42 
43 class vtkLight;
44 class vtkConeSource;
45 class vtkPolyDataMapper;
46 class vtkActor;
47 class vtkCamera;
48 class vtkCameraActor;
49 class vtkBoundingBox;
50 
51 class VTKRENDERINGCORE_EXPORT vtkLightActor : public vtkProp3D
52 {
53 public:
54  static vtkLightActor *New();
55  vtkTypeMacro(vtkLightActor, vtkProp3D);
56  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
57 
59 
62  void SetLight(vtkLight *light);
63  vtkGetObjectMacro(Light, vtkLight);
65 
67 
72  void SetClippingRange(double dNear, double dFar);
73  void SetClippingRange(const double a[2]);
74  vtkGetVector2Macro(ClippingRange, double);
76 
80  int RenderOpaqueGeometry(vtkViewport *viewport) VTK_OVERRIDE;
81 
85  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
86 
92  void ReleaseGraphicsResources(vtkWindow *) VTK_OVERRIDE;
93 
97  double *GetBounds() VTK_OVERRIDE;
98 
102  vtkMTimeType GetMTime() VTK_OVERRIDE;
103 
104 protected:
105  vtkLightActor();
106  ~vtkLightActor() VTK_OVERRIDE;
107 
108  void UpdateViewProps();
109 
110  vtkLight *Light;
111  double ClippingRange[2];
112 
113  vtkConeSource *ConeSource;
114  vtkPolyDataMapper *ConeMapper;
115  vtkActor *ConeActor;
116 
117  vtkCamera *CameraLight;
118  vtkCameraActor *FrustumActor;
119 
120  vtkBoundingBox *BoundingBox;
121 
122 private:
123  vtkLightActor(const vtkLightActor&) VTK_DELETE_FUNCTION;
124  void operator=(const vtkLightActor&) VTK_DELETE_FUNCTION;
125 };
126 
127 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
abstract specification for Viewports
Definition: vtkViewport.h:44
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:216
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:288
generate polygonal cone
Definition: vtkConeSource.h:38
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
a frustum to represent a camera.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
a simple class to control print indentation
Definition: vtkIndent.h:33
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
a virtual light for 3D rendering
Definition: vtkLight.h:55
a cone and a frustum to represent a spotlight.
Definition: vtkLightActor.h:51
map vtkPolyData to graphics primitives
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Fast Simple Class for dealing with 3D bounds.