Class Light

3DS Max Plug-In SDK

Class Light

See Also: Data Types.

class Light : public BaseInterfaceServer

Description:

This class describes the lights used in the interactive renderer. All methods of this class are implemented by the system.

Methods:

Prototype:

Light();

Remarks:

Class constructor. Sets the default values of the light.

type = OMNI_LGT;

attenType = NO_ATTEN;

atten = (float)0.0;

intensity = (float)1.0;

angle = (float)30.0;

color[0] = (float)1.0;

color[1] = (float)1.0;

color[2] = (float)1.0;

Data Members:

public:

LightType type;

One of the following values:

OMNI_LGT

Omni-directional.

SPOT_LGT

Spot light.

DIRECT_LGT

Directional light.

AMBIENT_LGT

Ambient light - global illumination.

Point3 color;

The color of the light. Individual values are from 0.0 to 1.0 with 1.0 as white.

Attenuation attenType;

Attenuation is not currently implemented. A developer should pass NO_ATTEN.

float atten;

Note: Attenuation is not currently implemented.

Light attenuation factor.

float intensity;

Light multiplier factor.

float angle;

Angle of cone for spot and cone lights in degrees.

int shape;

One of the following values:

GW_SHAPE_RECT - Rectangular spotlights.

GW_SHAPE_CIRCULAR - Circular spotlights.

float aspect;

The aspect ratio of the light.

int overshoot;

Nonzero indicates the light supports overshoot; otherwise 0.

BOOL affectDiffuse;

This data member is available in release 2.0 and later only.

This defaults to TRUE, but if the user set it to FALSE in the light modifier panel, then the

light is not supposed to illuminate the diffuse component of an object's material.

BOOL affectSpecular;

This data member is available in release 2.0 and later only.

This defaults to TRUE, but if the user set it to FALSE in the light modifier panel, then the

light is not supposed to illuminate the specular component of an object's material.