00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00071 #ifndef __vtkLight_h
00072 #define __vtkLight_h
00073
00074 #include "vtkObject.h"
00075 #include "vtkMatrix4x4.h"
00076
00077
00078 class vtkRenderer;
00079
00080 #define VTK_LIGHT_TYPE_HEADLIGHT 1
00081 #define VTK_LIGHT_TYPE_CAMERA_LIGHT 2
00082 #define VTK_LIGHT_TYPE_SCENE_LIGHT 3
00083
00084 class VTK_EXPORT vtkLight : public vtkObject
00085 {
00086 public:
00087 vtkTypeMacro(vtkLight,vtkObject);
00088 void PrintSelf(ostream& os, vtkIndent indent);
00089
00093 static vtkLight *New();
00094
00099 virtual void Render(vtkRenderer *, int) {};
00100
00102 vtkSetVector3Macro(Color,float);
00103 vtkGetVectorMacro(Color,float,3);
00104
00109 vtkSetVector3Macro(Position,float);
00110 vtkGetVectorMacro(Position,float,3);
00111 void SetPosition(double *a) {this->SetPosition(a[0],a[1],a[2]);};
00112
00118 vtkSetVector3Macro(FocalPoint,float);
00119 vtkGetVectorMacro(FocalPoint,float,3);
00120 void SetFocalPoint(double *a) {this->SetFocalPoint(a[0],a[1],a[2]);};
00121
00123 vtkSetMacro(Intensity,float);
00124 vtkGetMacro(Intensity,float);
00125
00127 vtkSetMacro(Switch,int);
00128 vtkGetMacro(Switch,int);
00129 vtkBooleanMacro(Switch,int);
00130
00132 vtkSetMacro(Positional,int);
00133 vtkGetMacro(Positional,int);
00134 vtkBooleanMacro(Positional,int);
00135
00137 vtkSetMacro(Exponent,float);
00138 vtkGetMacro(Exponent,float);
00139
00143 vtkSetMacro(ConeAngle,float);
00144 vtkGetMacro(ConeAngle,float);
00145
00148 vtkSetVector3Macro(AttenuationValues,float);
00149 vtkGetVectorMacro(AttenuationValues,float,3);
00150
00154 vtkSetObjectMacro(TransformMatrix,vtkMatrix4x4);
00155 vtkGetObjectMacro(TransformMatrix,vtkMatrix4x4);
00156
00159 void GetTransformedPosition(float &a0, float &a1, float &a2);
00160 void GetTransformedPosition(float a[3]);
00161 float *GetTransformedPosition();
00162
00165 void GetTransformedFocalPoint(float &a0, float &a1, float &a2);
00166 void GetTransformedFocalPoint(float a[3]);
00167 float *GetTransformedFocalPoint();
00168
00173 void SetDirectionAngle(float elevation, float azimuth);
00174 void SetDirectionAngle(float ang[2]) { this->SetDirectionAngle(ang[0], ang[1]); };
00175
00177 void DeepCopy(vtkLight *light);
00178
00189 vtkSetMacro(LightType, int);
00190 vtkGetMacro(LightType, int);
00191
00192 void SetLightTypeToHeadlight();
00193 void SetLightTypeToSceneLight();
00194 void SetLightTypeToCameraLight();
00195
00197 int LightTypeIsHeadlight();
00198 int LightTypeIsSceneLight();
00199 int LightTypeIsCameraLight();
00200
00201 void ReadSelf(istream& is);
00202 void WriteSelf(ostream& os);
00203
00204 protected:
00205 vtkLight();
00206 ~vtkLight();
00207 vtkLight(const vtkLight&) {};
00208 void operator=(const vtkLight&) {};
00209
00210 float FocalPoint[3];
00211 float Position[3];
00212 float Intensity;
00213 float Color[3];
00214 int Switch;
00215 int Positional;
00216 float Exponent;
00217 float ConeAngle;
00218 float AttenuationValues[3];
00219 vtkMatrix4x4 *TransformMatrix;
00220 float TransformedFocalPointReturn[3];
00221 float TransformedPositionReturn[3];
00222 int LightType;
00223 };
00224
00225 #endif