#include <vtkLight.h>
Inheritance diagram for vtkLight:
vtkLight is a virtual light for 3D rendering. It provides methods to locate and point the light, turn it on and off, and set its brightness and color. In addition to the basic infinite distance point light source attributes, you also can specify the light attenuation values and cone angle. These attributes are only used if the light is a positional light. The default is a directional light (e.g. infinite point light source).
Lights have a type that describes how the light should move with respect to the camera. A Headlight is always located at the current camera position and shines on the camera's focal point. A CameraLight also moves with the camera, but may not be coincident to it. CameraLights are defined in a normalized coordinate space where the camera is located at (0, 0, 1), the camera is looking at (0, 0, 0), and up is (0, 1, 0). Finally, a SceneLight is part of the scene itself and does not move with the camera. (Renderers are responsible for moving the light based on its type.)
Lights have a transformation matrix that describes the space in which they are positioned. A light's world space position and focal point are defined by their local position and focal point, transformed by their transformation matrix (if it exists).
Definition at line 59 of file vtkLight.h.
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | ReadSelf (istream &is) |
void | WriteSelf (ostream &os) |
virtual void | Render (vtkRenderer *, int) |
virtual void | SetAmbientColor (double, double, double) |
virtual void | SetAmbientColor (double[3]) |
virtual double * | GetAmbientColor () |
virtual void | GetAmbientColor (double data[3]) |
virtual void | SetDiffuseColor (double, double, double) |
virtual void | SetDiffuseColor (double[3]) |
virtual double * | GetDiffuseColor () |
virtual void | GetDiffuseColor (double data[3]) |
virtual void | SetSpecularColor (double, double, double) |
virtual void | SetSpecularColor (double[3]) |
virtual double * | GetSpecularColor () |
virtual void | GetSpecularColor (double data[3]) |
void | SetColor (double, double, double) |
void | SetColor (double a[3]) |
void | GetColor (double rgb[3]) |
double * | GetColor () |
virtual void | SetPosition (double, double, double) |
virtual void | SetPosition (double[3]) |
virtual double * | GetPosition () |
virtual void | GetPosition (double data[3]) |
void | SetPosition (float *a) |
virtual void | SetFocalPoint (double, double, double) |
virtual void | SetFocalPoint (double[3]) |
virtual double * | GetFocalPoint () |
virtual void | GetFocalPoint (double data[3]) |
void | SetFocalPoint (float *a) |
virtual void | SetIntensity (double) |
virtual double | GetIntensity () |
virtual void | SetSwitch (int) |
virtual int | GetSwitch () |
virtual void | SwitchOn () |
virtual void | SwitchOff () |
virtual void | SetPositional (int) |
virtual int | GetPositional () |
virtual void | PositionalOn () |
virtual void | PositionalOff () |
virtual void | SetExponent (double) |
virtual double | GetExponent () |
virtual void | SetConeAngle (double) |
virtual double | GetConeAngle () |
virtual void | SetAttenuationValues (double, double, double) |
virtual void | SetAttenuationValues (double[3]) |
virtual double * | GetAttenuationValues () |
virtual void | GetAttenuationValues (double data[3]) |
virtual void | SetTransformMatrix (vtkMatrix4x4 *) |
virtual vtkMatrix4x4 * | GetTransformMatrix () |
void | GetTransformedPosition (double &a0, double &a1, double &a2) |
void | GetTransformedPosition (double a[3]) |
double * | GetTransformedPosition () |
void | GetTransformedFocalPoint (double &a0, double &a1, double &a2) |
void | GetTransformedFocalPoint (double a[3]) |
double * | GetTransformedFocalPoint () |
void | SetDirectionAngle (double elevation, double azimuth) |
void | SetDirectionAngle (double ang[2]) |
void | DeepCopy (vtkLight *light) |
virtual void | SetLightType (int) |
virtual int | GetLightType () |
void | SetLightTypeToHeadlight () |
void | SetLightTypeToSceneLight () |
void | SetLightTypeToCameraLight () |
int | LightTypeIsHeadlight () |
int | LightTypeIsSceneLight () |
int | LightTypeIsCameraLight () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkLight * | SafeDownCast (vtkObject *o) |
static vtkLight * | New () |
Protected Member Functions | |
vtkLight () | |
~vtkLight () | |
Protected Attributes | |
double | FocalPoint [3] |
double | Position [3] |
double | Intensity |
double | AmbientColor [3] |
double | DiffuseColor [3] |
double | SpecularColor [3] |
int | Switch |
int | Positional |
double | Exponent |
double | ConeAngle |
double | AttenuationValues [3] |
vtkMatrix4x4 * | TransformMatrix |
double | TransformedFocalPointReturn [3] |
double | TransformedPositionReturn [3] |
int | LightType |
|
Reimplemented from vtkObject. Reimplemented in vtkRIBLight, vtkMesaLight, and vtkOpenGLLight. Definition at line 62 of file vtkLight.h. |
|
|
|
|
|
Reimplemented from vtkObject. Reimplemented in vtkRIBLight, vtkMesaLight, and vtkOpenGLLight. |
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkRIBLight, vtkMesaLight, and vtkOpenGLLight. |
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkRIBLight, vtkMesaLight, and vtkOpenGLLight. |
|
Reimplemented from vtkObject. Reimplemented in vtkRIBLight, vtkMesaLight, and vtkOpenGLLight. |
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject. Reimplemented in vtkRIBLight, vtkMesaLight, and vtkOpenGLLight. |
|
Create a light with the focal point at the origin and its position set to (0,0,1). The light is a SceneLight, its color is white, intensity=1, and the light is turned on. Reimplemented from vtkObject. Reimplemented in vtkRIBLight, vtkMesaLight, and vtkOpenGLLight. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. Reimplemented in vtkRIBLight, vtkMesaLight, and vtkOpenGLLight. Definition at line 74 of file vtkLight.h. |
|
Set/Get the color of the light. It is possible to set the ambient, diffuse and specular colors separately. The SetColor() method sets the diffuse and specular colors to the same color (this is a feature to preserve backward compatbility.) |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. Definition at line 88 of file vtkLight.h. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Abstract interface to renderer. Each concrete subclass of vtkLight will load its data into the graphics system in response to this method invocation. The actual loading is performed by a vtkLightDevice subclass, which will get created automatically. |
|
Set/Get the position of the light. Note: The position of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space position, use vtkGetTransformedPosition() instead of vtkGetPosition(). |
|
Set/Get the position of the light. Note: The position of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space position, use vtkGetTransformedPosition() instead of vtkGetPosition(). |
|
Set/Get the position of the light. Note: The position of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space position, use vtkGetTransformedPosition() instead of vtkGetPosition(). |
|
Set/Get the position of the light. Note: The position of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space position, use vtkGetTransformedPosition() instead of vtkGetPosition(). |
|
Set/Get the position of the light. Note: The position of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space position, use vtkGetTransformedPosition() instead of vtkGetPosition(). Definition at line 100 of file vtkLight.h. |
|
Set/Get the point at which the light is shining. Note: The focal point of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space focal point, use vtkGetTransformedFocalPoint() instead of vtkGetFocalPoint(). |
|
Set/Get the point at which the light is shining. Note: The focal point of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space focal point, use vtkGetTransformedFocalPoint() instead of vtkGetFocalPoint(). |
|
Set/Get the point at which the light is shining. Note: The focal point of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space focal point, use vtkGetTransformedFocalPoint() instead of vtkGetFocalPoint(). |
|
Set/Get the point at which the light is shining. Note: The focal point of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space focal point, use vtkGetTransformedFocalPoint() instead of vtkGetFocalPoint(). |
|
Set/Get the point at which the light is shining. Note: The focal point of the light is defined in the coordinate space indicated by its transformation matrix (if it exists). Thus, to get the light's world space focal point, use vtkGetTransformedFocalPoint() instead of vtkGetFocalPoint(). Definition at line 111 of file vtkLight.h. |
|
Set/Get the brightness of the light (from one to zero). |
|
Set/Get the brightness of the light (from one to zero). |
|
Turn the light on or off. |
|
Turn the light on or off. |
|
Turn the light on or off. |
|
Turn the light on or off. |
|
Turn positional lighting on or off. |
|
Turn positional lighting on or off. |
|
Turn positional lighting on or off. |
|
Turn positional lighting on or off. |
|
Set/Get the exponent of the cosine used in positional lighting. |
|
Set/Get the exponent of the cosine used in positional lighting. |
|
Set/Get the lighting cone angle of a positional light in degrees. A value of 180 indicates that you want no spot lighting effects just a positional light. |
|
Set/Get the lighting cone angle of a positional light in degrees. A value of 180 indicates that you want no spot lighting effects just a positional light. |
|
Set/Get the quadratic attenuation constants. They are specified as constant, linear, and quadratic, in that order. |
|
Set/Get the quadratic attenuation constants. They are specified as constant, linear, and quadratic, in that order. |
|
Set/Get the quadratic attenuation constants. They are specified as constant, linear, and quadratic, in that order. |
|
Set/Get the quadratic attenuation constants. They are specified as constant, linear, and quadratic, in that order. |
|
Set/Get the light's transformation matrix. If a matrix is set for a light, the light's parameters (position and focal point) are transformed by the matrix before being rendered. |
|
Set/Get the light's transformation matrix. If a matrix is set for a light, the light's parameters (position and focal point) are transformed by the matrix before being rendered. |
|
Get the position of the light, modified by the transformation matrix (if it exists). |
|
Get the position of the light, modified by the transformation matrix (if it exists). |
|
Get the position of the light, modified by the transformation matrix (if it exists). |
|
Get the focal point of the light, modified by the transformation matrix (if it exists). |
|
Get the focal point of the light, modified by the transformation matrix (if it exists). |
|
Get the focal point of the light, modified by the transformation matrix (if it exists). |
|
Set the position and focal point of a light based on elevation and azimuth. The light is moved so it is shining from the given angle. Angles are given in degrees. If the light is a positional light, it is made directional instead. |
|
Set the position and focal point of a light based on elevation and azimuth. The light is moved so it is shining from the given angle. Angles are given in degrees. If the light is a positional light, it is made directional instead. Definition at line 185 of file vtkLight.h. |
|
Perform deep copy of this light. |
|
Set/Get the type of the light. A SceneLight is a light located in the world coordinate space. A light is initially created as a scene light. A Headlight is always located at the camera and is pointed at the camera's focal point. The renderer is free to modify the position and focal point of the camera at any time. A CameraLight is also attached to the camera, but is not necessarily located at the camera's position. CameraLights are defined in a coordinate space where the camera is located at (0, 0, 1), looking towards (0, 0, 0) at a distance of 1, with up being (0, 1, 0). Note: Use SetLightTypeToSceneLight, rather than SetLightType(3), since the former clears the light's transform matrix. |
|
Perform deep copy of this light. |
|
Perform deep copy of this light. Definition at line 206 of file vtkLight.h. References VTK_LIGHT_TYPE_HEADLIGHT. |
|
Perform deep copy of this light. Definition at line 208 of file vtkLight.h. References VTK_LIGHT_TYPE_SCENE_LIGHT. |
|
Perform deep copy of this light. Definition at line 213 of file vtkLight.h. References VTK_LIGHT_TYPE_CAMERA_LIGHT. |
|
Query the type of the light. |
|
Query the type of the light. |
|
Query the type of the light. |
|
|
|
|
|
Definition at line 231 of file vtkLight.h. |
|
Definition at line 232 of file vtkLight.h. |
|
Definition at line 233 of file vtkLight.h. |
|
Definition at line 234 of file vtkLight.h. |
|
Definition at line 235 of file vtkLight.h. |
|
Definition at line 236 of file vtkLight.h. |
|
Definition at line 237 of file vtkLight.h. |
|
Definition at line 238 of file vtkLight.h. |
|
Definition at line 239 of file vtkLight.h. |
|
Definition at line 240 of file vtkLight.h. |
|
Definition at line 241 of file vtkLight.h. |
|
Definition at line 242 of file vtkLight.h. |
|
Definition at line 243 of file vtkLight.h. |
|
Definition at line 244 of file vtkLight.h. |
|
Definition at line 245 of file vtkLight.h. |