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 =========================================================================*/
40 #ifndef vtkLightActor_h
41 #define vtkLightActor_h
42 
43 #include "vtkRenderingCoreModule.h" // For export macro
44 #include "vtkProp3D.h"
45 
46 class vtkLight;
47 class vtkConeSource;
48 class vtkPolyDataMapper;
49 class vtkActor;
50 class vtkCamera;
51 class vtkCameraActor;
52 class vtkBoundingBox;
53 
54 class VTKRENDERINGCORE_EXPORT vtkLightActor : public vtkProp3D
55 {
56 public:
57  static vtkLightActor *New();
58  vtkTypeMacro(vtkLightActor, vtkProp3D);
59  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
60 
62 
65  void SetLight(vtkLight *light);
66  vtkGetObjectMacro(Light, vtkLight);
68 
70 
75  void SetClippingRange(double dNear, double dFar);
76  void SetClippingRange(const double a[2]);
77  vtkGetVector2Macro(ClippingRange, double);
79 
83  int RenderOpaqueGeometry(vtkViewport *viewport) VTK_OVERRIDE;
84 
88  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
89 
95  void ReleaseGraphicsResources(vtkWindow *) VTK_OVERRIDE;
96 
100  double *GetBounds() VTK_OVERRIDE;
101 
105  vtkMTimeType GetMTime() VTK_OVERRIDE;
106 
107 protected:
108  vtkLightActor();
109  ~vtkLightActor() VTK_OVERRIDE;
110 
111  void UpdateViewProps();
112 
113  vtkLight *Light;
114  double ClippingRange[2];
115 
116  vtkConeSource *ConeSource;
117  vtkPolyDataMapper *ConeMapper;
118  vtkActor *ConeActor;
119 
120  vtkCamera *CameraLight;
121  vtkCameraActor *FrustumActor;
122 
123  vtkBoundingBox *BoundingBox;
124 
125 private:
126  vtkLightActor(const vtkLightActor&) VTK_DELETE_FUNCTION;
127  void operator=(const vtkLightActor&) VTK_DELETE_FUNCTION;
128 };
129 
130 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
abstract specification for Viewports
Definition: vtkViewport.h:47
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:222
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:294
generate polygonal cone
Definition: vtkConeSource.h:44
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:46
a frustum to represent a camera.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
a simple class to control print indentation
Definition: vtkIndent.h:39
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
a virtual light for 3D rendering
Definition: vtkLight.h:61
a cone and a frustum to represent a spotlight.
Definition: vtkLightActor.h:54
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.