Man Page for vtkLight
Table of Contents

NAME

vtkLight - a virtual light for 3D rendering

SYNOPSIS


#include "/opt/vtk-c++/graphics/vtkLight.h"

class VTK_EXPORT vtkLight : public vtkObject

vtkLight();
static vtkLight *New();
const char *GetClassName() {return "vtkLight";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual void Render(vtkRenderer *, int) {};
void SetColor(float, float, float);
void SetColor(float *);
float *GetColor();
void GetColor(float data[3]);
void SetPosition(float, float, float);
void SetPosition(float *);
float *GetPosition();
void GetPosition(float data[3]);
void SetFocalPoint(float, float, float);
void SetFocalPoint(float *);
float *GetFocalPoint();
void GetFocalPoint(float data[3]);
void SetIntensity(float);
float GetIntensity();
void SetSwitch(int);
int GetSwitch();
void SwitchOn();
void SwitchOff();
void SetPositional(int);
int GetPositional();
void PositionalOn();
void PositionalOff();
void SetExponent(float);
float GetExponent();
void SetConeAngle(float);
float GetConeAngle();
void SetAttenuationValues(float, float, float);
void SetAttenuationValues(float *);
float *GetAttenuationValues();
void GetAttenuationValues(float data[3]);

DESCRIPTION

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).

SEE ALSO

vtkLightDevice

SUMMARY

virtual void Render(vtkRenderer *, int) {};
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.

void SetColor(float, float, float)
void SetColor(float *)
Set/Get the color of the light.

void SetPosition(float, float, float)
void SetPosition(float *)
Set/Get the position of the light.

void SetFocalPoint(float, float, float)
void SetFocalPoint(float *)
Set/Get the point at which the light is shining.

void SetIntensity(float)
Set/Get the brightness of the light (from one to zero).

void SetSwitch(int)
Turn the light on or off.

void SetPositional(int)
Turn positional lighting on or off.

void SetExponent(float)
Set/Get the exponent of the cosine used in positional lighting.

void SetConeAngle(float)
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.

void SetAttenuationValues(float, float, float)
void SetAttenuationValues(float *)
Set/Get the quadratic attenuation constants. They are specified as constant, linear, and quadratic, in that order.

vtkLight()
Create a light with the focal point at the origin and its position set to (0,0,1). The lights color is white, intensity=1, and the light is turned on.


Table of Contents