VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkOpenGLLightMonitor 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 =========================================================================*/ 00032 #ifndef vtkOpenGLLightMonitor_h 00033 #define vtkOpenGLLightMonitor_h 00034 00035 #include "vtkRenderingOpenGLModule.h" // for export macro 00036 #include "vtkObject.h" 00037 00038 class VTKRENDERINGOPENGL_EXPORT vtkOpenGLLightMonitor : public vtkObject 00039 { 00040 public: 00041 static vtkOpenGLLightMonitor* New(); 00042 static vtkOpenGLLightMonitor *New(int lightId); 00043 vtkTypeMacro(vtkOpenGLLightMonitor, vtkObject); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00049 vtkSetMacro(LightId, int); 00050 vtkGetMacro(LightId, int); 00052 00056 bool StateChanged(); 00057 00060 void Update(); 00061 00062 //BTX 00064 00065 void SetEnabled(int val); 00066 void SetAmbient(float *val); 00067 void SetDiffuse(float *val); 00068 void SetSpecular(float *val); 00069 void SetPosition(float *val); 00070 void SetSpotDirection(float *val); 00071 void SetSpotExponent(float val); 00072 void SetSpotCutoff(float val); 00073 void SetAttenuation(float *val); 00074 //ETX 00076 00077 private: 00078 vtkOpenGLLightMonitor(int lightId) : LightId(lightId), UpTime(0) 00079 { this->Initialize(); } 00080 00081 vtkOpenGLLightMonitor() : LightId(0), UpTime(0) 00082 { this->Initialize(); } 00083 00084 ~vtkOpenGLLightMonitor(){} 00085 00086 void Initialize(); 00087 00088 private: 00089 int LightId; 00090 int Enabled; 00091 float Ambient[4]; 00092 float Diffuse[4]; 00093 float Specular[4]; 00094 float Position[4]; 00095 float SpotDirection[3]; 00096 float SpotExponent; 00097 float SpotCutoff; 00098 float Attenuation[3]; 00099 long long UpTime; 00100 00101 private: 00102 vtkOpenGLLightMonitor(const vtkOpenGLLightMonitor &); // Not implemented 00103 void operator=(const vtkOpenGLLightMonitor &); // Not implemented 00104 }; 00105 00106 #endif