Structure LightState

3DS Max Plug-In SDK

Structure LightState

See Also: Class GenLight, Class LightObject, Class Color, Class Matrix3.

Description:

This structure describes the properties of a light.

struct LightState {

LightType type;

One of the following values:

(from enum LightType { OMNI_LGT, SPOT_LGT, DIRECT_LGT, AMBIENT_LGT };):

OMNI_LGT - Omnidirectional

SPOT_LGT - Spot (cone)

DIRECT_LGT - Directional (parallel)

AMBIENT_LGT - Global

Matrix3 tm;

The transformation matrix of the light.

Color color;

The color of the light (its intensity).

float intens;

The multiplier applied to the color.

float hotsize;

The hotspot size in degrees.

float fallsize;

The hotspot falloff size in degrees.

int useNearAtten;

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

Nonzero if near attenuation is used; otherwise zero.

float nearAttenStart;

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

The near attenuation start value.

float nearAttenEnd;

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

The near attenuation end value.

int useAtten;

Nonzero if (far) attenuation is used; otherwise zero.

float attenStart;

The (far) start attenuation value.

float attenEnd;

The (far) end attenuation value.

int shape;

One of the following values:

RECT_LIGHT

CIRCLE_LIGHT

float aspect;

The aspect ratio of the light.

BOOL overshoot;

TRUE if the light supports overshoot; otherwise FALSE.

BOOL shadow;

TRUE if shadows are on; otherwise FALSE.

BOOL on;

TRUE if the light is on; otherwise FALSE.

BOOL affectDiffuse;

TRUE if affect diffuse is on; otherwise FALSE.

BOOL affectSpecular;

TRUE if affect specular is on; otherwise FALSE.

};