00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkLightActor.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00039 #ifndef __vtkLightActor_h 00040 #define __vtkLightActor_h 00041 00042 #include "vtkProp3D.h" 00043 00044 class vtkLight; 00045 class vtkConeSource; 00046 class vtkPolyDataMapper; 00047 class vtkActor; 00048 class vtkCamera; 00049 class vtkCameraActor; 00050 class vtkBoundingBox; 00051 00052 class VTK_RENDERING_EXPORT vtkLightActor : public vtkProp3D 00053 { 00054 public: 00055 static vtkLightActor *New(); 00056 vtkTypeMacro(vtkLightActor,vtkProp3D); 00057 void PrintSelf(ostream& os, vtkIndent indent); 00058 00060 00061 void SetLight(vtkLight *light); 00062 vtkGetObjectMacro(Light,vtkLight); 00064 00066 00069 void SetClippingRange(double dNear, 00070 double dFar); 00071 void SetClippingRange(const double a[2]); 00072 vtkGetVector2Macro(ClippingRange,double); 00074 00076 virtual int RenderOpaqueGeometry(vtkViewport *viewport); 00077 00079 virtual int HasTranslucentPolygonalGeometry(); 00080 00084 void ReleaseGraphicsResources(vtkWindow *); 00085 00087 double *GetBounds(); 00088 00090 unsigned long int GetMTime(); 00091 00092 protected: 00093 vtkLightActor(); 00094 ~vtkLightActor(); 00095 00096 void UpdateViewProps(); 00097 00098 vtkLight *Light; 00099 double ClippingRange[2]; 00100 00101 vtkConeSource *ConeSource; 00102 vtkPolyDataMapper *ConeMapper; 00103 vtkActor *ConeActor; 00104 00105 vtkCamera *CameraLight; 00106 vtkCameraActor *FrustumActor; 00107 00108 vtkBoundingBox *BoundingBox; 00109 00110 private: 00111 vtkLightActor(const vtkLightActor&); // Not implemented. 00112 void operator=(const vtkLightActor&); // Not implemented. 00113 }; 00114 00115 #endif