Classes | Public Types | Public Member Functions | Static Public Member Functions

LightscapeLight Class Reference

Search for all occurrences

Detailed Description

Common Photoemtric light.

LightscapeLight is the base class for all Photometric lights. You can safely cast an Animatble* to LightscapeLight* if IsSubClass(LIGHTSCAPE_LIGHT_CLASS) returns true.

#include <lslights.h>

Inheritance diagram for LightscapeLight:
Inheritance graph
[legend]

List of all members.

Classes

class   AreaLightCustAttrib
  Area Lights sampling custom attribute. More...

Public Types

enum   LightTypes {
  TYPE_BASE = 532, TARGET_POINT_TYPE = TYPE_BASE + 0, POINT_TYPE = TYPE_BASE + 1, TARGET_LINEAR_TYPE = TYPE_BASE + 2,
  LINEAR_TYPE = TYPE_BASE + 3, TARGET_AREA_TYPE = TYPE_BASE + 4, AREA_TYPE = TYPE_BASE + 5, TARGET_DISC_TYPE = TYPE_BASE + 6,
  DISC_TYPE = TYPE_BASE + 7, TARGET_SPHERE_TYPE = TYPE_BASE + 8, SPHERE_TYPE = TYPE_BASE + 9, TARGET_CYLINDER_TYPE = TYPE_BASE + 10,
  CYLINDER_TYPE = TYPE_BASE + 11, LAST_TYPE = CYLINDER_TYPE
}
 

Types for the lights.

More...
enum   DistTypes {
  ISOTROPIC_DIST = 0, SPOTLIGHT_DIST = 1, DIFFUSE_DIST = 2, WEB_DIST = 3,
  LAST_DIST = WEB_DIST
}
 

Types for the distributions.

More...
enum   ReferenceIDs {
  REF_PARAMS = 0, REF_SHADOW_PARAMS = 1, REF_SPOT_PARAMS = 2, REF_WEB_PARAMS = 3,
  REF_SHADOWGEN = 4, REF_EXT_PARAMS = 5, LAST_REF = REF_EXT_PARAMS
}
 

IDs for the references kept by this object.

More...
enum   ParameterBlockID {
  PB_GENERAL = 0, PB_SHADOW = 1, PB_SPOT = 2, PB_WEB = 3,
  PB_EXT = 4, LAST_PB = PB_EXT
}
 

IDs for the parameters blocks for Lightscape lights.

More...
enum   ParameterIDs {
  PB_DIST_TYPE = 1, PB_USE_LIGHT = 2, PB_CAST_SHADOWS = 3, PB_LIGHT_COLOR = 4,
  PB_FILTER_COLOR = 5, PB_INTENSITY = 6, PB_KELVIN = 8, PB_USE_KELVIN = 10,
  PB_INTENSITY_AT = 13, PB_INTENSITY_TYPE = 14, PB_FLUX = 15, PB_ORIGINAL_INTENSITY = 16,
  PB_ORIGINAL_FLUX = 17, PB_USE_DIMMER = 18, PB_DIMMER = 19, PB_COLORSHIFT_DIMMING = 20,
  PB_USE_FARATTENUATION = 21, PB_SHOW_FARATTENUATION_GIZMO = 22, PB_START_FARATTENUATION = 23, PB_END_FARATTENUATION = 24,
  LAST_GEN_PB = PB_END_FARATTENUATION
}
 

This enum is used to hold the General parameter IDs.

More...
enum   ExtParamIDs {
  PB_CONTRAST = 0, PB_DIFFSOFT = 1, PB_PROJECTOR = 2, PB_PROJECTOR_MAP = 3,
  PB_AFFECT_DIFFUSE = 4, PB_AFFECT_SPECULAR = 5, PB_AMBIENT_ONLY = 6, PB_TDIST = 7,
  PB_LINELIGHT_LENGTH = 11, PB_AREALIGHT_LENGTH = 11, PB_AREALIGHT_WIDTH = 12, PB_DISCLIGHT_RADIUS = 13,
  PB_SPHERELIGHT_RADIUS_OLD = 14, PB_SPHERELIGHT_RADIUS = PB_DISCLIGHT_RADIUS, PB_CYLINDERLIGHT_RADIUS_OLD = 15, PB_CYLINDERLIGHT_RADIUS = PB_DISCLIGHT_RADIUS,
  PB_CYLINDERLIGHT_LENGTH_OLD = 16, PB_CYLINDERLIGHT_LENGTH = PB_LINELIGHT_LENGTH, LAST_EXT_PB = PB_CYLINDERLIGHT_LENGTH_OLD
}
 

This enum is used to hold the Extended parameter IDs.

More...
enum   ShadowIDs {
  PB_ATMOS_SHAD = 0, PB_ATMOS_OPACITY = 1, PB_ATMOS_COLAMT = 2, PB_SHADMULT = 3,
  PB_SHAD_COLMAP = 4, PB_SHADCOLOR = 5, PB_LIGHT_AFFECTS_SHADOW = 6, PB_USE_GLOBAL_PARAMS = 7,
  PB_SHAD_PROJ_MAP = 8, LAST_SHAD_PB = PB_SHAD_PROJ_MAP
}
 

This enum is used to hold the Shadow parameter IDs.

More...
enum   SpotlightIDs { PB_BEAM_ANGLE = 0, PB_FIELD_ANGLE = 1, PB_CONE_DISPLAY = 2, LAST_SPOT_PB = PB_CONE_DISPLAY }
 

This enum is used to hold the Spotlight parameter IDs.

More...
enum   DistributionIDs {
  PB_WEB_FILE_NAME = 0, PB_WEB_ROTATE_X = 1, PB_WEB_ROTATE_Y = 2, PB_WEB_ROTATE_Z = 3,
  LAST_WEB_PB = PB_WEB_ROTATE_Z
}
 

This enum is used to hold the Photometric Web parameter IDs.

More...
enum   IntensityType { LUMENS = 0, CANDELAS = 1, LUX_AT = 2 }
 

This enum is used to hold the intensity types.

More...
enum   MaxShadowType { NO_SHADOW_GENERATOR = -1, BITMAP_SHADOWS = 0, RAYTRACE_SHADOWS = 1, OTHER_SHADOWS = 0xffff }
 

Shadow types for MAX.

More...

Public Member Functions

virtual void  SetInclude (BOOL onOff)=0
  Sets whether the Include/Exclude list should include or exclude objects.
virtual void  UpdateTargDistance (TimeValue t, INode *inode)=0
  Update the target distance parameter of the light to the distance between the light target and the light.
virtual Point3  GetCenter () const =0
  Returns the location of the center of the light.
virtual void  SetType (int type)=0
  Sets the light type.
virtual void  SetType (const MCHAR *name)=0
  Sets the light type.
virtual int  Type ()=0
  Returns the current light type.
virtual const MCHAR *  TypeName ()=0
  Returns the light type.
virtual void  SetDistribution (DistTypes dist)=0
  Sets the distribution of the light.
virtual DistTypes  GetDistribution () const =0
  Returns the distribution of the light.
virtual void  SetIntensityAt (float f)=0
  Sets the distance at which the light intensity is measured.
virtual float  GetIntensityAt ()=0
  Returns the distance at which the light intensity is measured.
virtual void  SetIntensityType (IntensityType t)=0
  Sets the intensity type of the light.
virtual IntensityType  GetIntensityType ()=0
  Returns the intensity type of the light.
virtual void  SetFlux (TimeValue t, float flux)=0
  Sets the flux of the light.
virtual float  GetFlux (TimeValue t, Interval &valid=Interval(0, 0)) const =0
  Returns the flux of the light.
virtual void  SetRGBFilter (TimeValue t, Point3 &rgb)=0
  Sets the color of the light filter.
virtual Point3  GetRGBFilter (TimeValue t, Interval &valid=Interval(0, 0))=0
  Returns the color of the light filter.
virtual void  SetHSVFilter (TimeValue t, Point3 &hsv)=0
  Sets the color of the light filter.
virtual Point3  GetHSVFilter (TimeValue t, Interval &valid=Interval(0, 0))=0
  Returns the color of the light filter.
virtual ShadowType ActiveShadowType ()=0
  Returns the plug-in shadow generator.
virtual ShadowType GetShadowGenerator ()=0
  Returns the plug-in shadow generator.
virtual const MCHAR *  GetShadowGeneratorName ()=0
  Returns the plug-in shadow generator name.
virtual void  SetShadowGenerator (ShadowType *s)=0
  Sets the plug-in shadow generator.
virtual void  SetShadowGenerator (const MCHAR *name)=0
  Sets the plug-in shadow generator.
virtual void  SetUseShadowColorMap (TimeValue t, int onOff)=0
  Sets whether a shadow color map is used by the light.
virtual int  GetUseShadowColorMap (TimeValue t)=0
  Returns whether a shadow color map is used by the light.
virtual BOOL  SetKelvinControl (Control *kelvin)=0
  Sets the controller for the Kelvin temperature.
virtual BOOL  SetFilterControl (Control *filter)=0
  Sets the controller for the filter color.
virtual Control GetKelvinControl ()=0
  Returns the controller for the Kelvin temperature.
virtual Control GetFilterControl ()=0
  Returns the controller for the filter color.
virtual float  GetKelvin (TimeValue t, Interval &v=Interval(0, 0))=0
  Returns the Kelvin temperature of the light.
virtual void  SetKelvin (TimeValue t, float kelvin)=0
  Sets the Kelvin temperature of the light.
virtual BOOL  GetUseKelvin ()=0
  Returns whether the kelvin temperature or light color is to be used.
virtual void  SetUseKelvin (BOOL useKelvin)=0
  Sets whether the kelvin temperature or light color is to be used.
virtual
MaxSDK::AssetManagement::AssetUser 
GetWebFile () const =0
  Returns the web distribution file for the light as an AssetUser.
virtual const MCHAR *  GetFullWebFileName () const =0
  Returns the filename of the web distribution file for the light.
virtual void  SetWebFile (const MaxSDK::AssetManagement::AssetUser &file)=0
  Sets the web distribution file for the light.
virtual float  GetWebRotateX () const =0
  Returns the rotation along the X axis of the web distribution in the light.
virtual void  SetWebRotateX (float degrees)=0
  Sets the rotation along the X axis for the web distribution in the light.
virtual float  GetWebRotateY () const =0
  Returns the rotation along the Y axis of the web distribution in the light.
virtual void  SetWebRotateY (float degrees)=0
  Sets the rotation along the Y axis for the web distribution in the light.
virtual float  GetWebRotateZ () const =0
  Returns the rotation along the Z axis of the web distribution in the light.
virtual void  SetWebRotateZ (float degrees)=0
  Sets the rotation along the Z axis for the web distribution in the light.
virtual float  GetDimmerValue (TimeValue t, Interval &valid=Interval(0, 0)) const =0
  Returns the dimmer value for the light.
virtual void  SetDimmerValue (TimeValue t, float dimmer)=0
  Sets the dimmer value for the light.
virtual BOOL  GetUseMultiplier () const =0
  Returns whether the dimmer is used.
virtual void  SetUseMultiplier (BOOL on)=0
  Sets whether the dimmer is used.
virtual BOOL  IsColorShiftEnabled () const =0
  Returns whether the light's intensity shifts (affects) its color.
virtual void  EnableColorShift (BOOL on)=0
  Sets whether the color of the light shifts when its intensity changes Note that this parameter is really activated only if GetUseMultiplier() is true.
virtual float  GetResultingIntensity (TimeValue t, Interval &valid=Interval(0, 0)) const =0
  Returns the intensity including the dimmer multiplier if it is used.
virtual float  GetResultingFlux (TimeValue t, Interval &valid=Interval(0, 0)) const =0
  Returns the flux including the dimmer multiplier if it is used.
virtual float  GetRadius (TimeValue t, Interval &valid=Interval(0, 0)) const =0
  Returns the radius of a disc, sphere, cylinder light.
virtual void  SetRadius (TimeValue t, float radius)=0
  Sets the radius of a disc, sphere, cylinder light.
virtual float  GetLength (TimeValue t, Interval &valid=Interval(0, 0)) const =0
  Returns the length of a linear, area, cylinder light.
virtual void  SetLength (TimeValue t, float length)=0
  Sets the length of a linear, area, cylinder light.
virtual float  GetWidth (TimeValue t, Interval &valid=Interval(0, 0)) const =0
  Returns the width of an area light.
virtual void  SetWidth (TimeValue t, float width)=0
  Sets the width of an area light.
virtual void  SetShape (int count, const Point3 *pointsIn)=0
  Sets the coordinates of the light.
virtual int  GetShape (Point3 *pointsOut, int bufSize) const =0
  Returns the coordinates of the light.
virtual float  GetOriginalFlux () const =0
  Returns the original flux for a light.
virtual void  SetOriginalFlux (float flux)=0
  Sets the original flux for a light.
virtual float  GetOriginalIntensity () const =0
  Returns the original intensity for a light.
virtual void  SetOriginalIntensity (float candelas)=0
  Sets the original intensity for a light.

Static Public Member Functions

static AreaLightCustAttrib GetAreaLightCustAttrib (CustAttrib *attrib)
  Returns the AreaLightCustAttrib interface for a custom attribute.

Member Enumeration Documentation

enum LightTypes

Types for the lights.

These values are used in SetType and returned by Type.

Enumerator:
TYPE_BASE 
TARGET_POINT_TYPE 

Target point light type.

POINT_TYPE 

Free point light type.

TARGET_LINEAR_TYPE 

Target linear light type.

LINEAR_TYPE 

Free linear light type.

TARGET_AREA_TYPE 

Target area light type.

AREA_TYPE 

Free area light type.

TARGET_DISC_TYPE 

Target disc light type.

DISC_TYPE 

Free disc light type.

TARGET_SPHERE_TYPE 

Target sphere light type.

SPHERE_TYPE 

Free sphere light type.

TARGET_CYLINDER_TYPE 

Target cylinder light type.

CYLINDER_TYPE 

Free cylinder light type.

LAST_TYPE 

Last valid type.

enum DistTypes

Types for the distributions.

These values are used in SetDistribution and returned by GetDistribution.

Enumerator:
ISOTROPIC_DIST 

Isotropic distribution type.

SPOTLIGHT_DIST 

Spolight distribution type.

DIFFUSE_DIST 

Diffuse distribution type.

WEB_DIST 

Web distribution type.

LAST_DIST 

Last valid distribution type.

IDs for the references kept by this object.

Enumerator:
REF_PARAMS 

Reference to the common parameters.

REF_SHADOW_PARAMS 

Reference to the shadow parameters.

REF_SPOT_PARAMS 

Reference to the spotlight distribution parameters.

REF_WEB_PARAMS 

Reference to the web distribution parameters.

REF_SHADOWGEN 

Reference to the shadow generator.

REF_EXT_PARAMS 

Reference to the extended parameters.

LAST_REF 

The last reference ID.

IDs for the parameters blocks for Lightscape lights.

Enumerator:
PB_GENERAL 

Parameter block ID for the common parameters.

PB_SHADOW 

Parameter block ID for the shadow parameters.

PB_SPOT 

Parameter block ID for the spotlight distribution parameters.

PB_WEB 

Parameter block ID for the web distribution parameters.

PB_EXT 

Parameter block ID for the extended parameters.

LAST_PB 

Last parameter block ID.

                          {
      PB_GENERAL                 = 0,
      PB_SHADOW                  = 1,
      PB_SPOT                    = 2,
      PB_WEB                     = 3,
      PB_EXT                     = 4,
      LAST_PB                    = PB_EXT
    };

This enum is used to hold the General parameter IDs.

Enumerator:
PB_DIST_TYPE 

The light distribution type.

PB_USE_LIGHT 

Use the light.

PB_CAST_SHADOWS 

Cast shadows.

PB_LIGHT_COLOR 

Light Color.

PB_FILTER_COLOR 

Filter Color.

PB_INTENSITY 

Intensity.

PB_KELVIN 

Light color in degrees kelvin.

PB_USE_KELVIN 

Flag to use Kelvin or RGB.

PB_INTENSITY_AT 

Intensity At.

PB_INTENSITY_TYPE 

Intensity Type.

PB_FLUX 

Flux.

PB_ORIGINAL_INTENSITY 

Original Intensity.

PB_ORIGINAL_FLUX 

Original Flux.

PB_USE_DIMMER 

use the dimmer slider/spinner

PB_DIMMER 

Dimmer/Multiplier.

PB_COLORSHIFT_DIMMING 

Lamp color shift on dimming.

PB_USE_FARATTENUATION 

use the far attenuation

PB_SHOW_FARATTENUATION_GIZMO 

display the far attenuation when unselected

PB_START_FARATTENUATION 

start far attenuation value

PB_END_FARATTENUATION 

end far attenuation value

LAST_GEN_PB 

Last id in list.

This enum is used to hold the Extended parameter IDs.

Enumerator:
PB_CONTRAST 

Contrast between diffuse and ambient.

PB_DIFFSOFT 

Softening between diffuse and ambient.

PB_PROJECTOR 

Use projector map.

PB_PROJECTOR_MAP 

The projector map.

PB_AFFECT_DIFFUSE 

Affect diffuse channel.

PB_AFFECT_SPECULAR 

Affect specular channel.

PB_AMBIENT_ONLY 

Ambient only.

PB_TDIST 

Target distance.

PB_LINELIGHT_LENGTH 

Line Light length.

PB_AREALIGHT_LENGTH 

Area Light length (Rectangle)

PB_AREALIGHT_WIDTH 

Area light height (Rectangle)

PB_DISCLIGHT_RADIUS 

Disc light radius.

PB_SPHERELIGHT_RADIUS_OLD 

Sphere light radius.

PB_SPHERELIGHT_RADIUS 
PB_CYLINDERLIGHT_RADIUS_OLD 

Cylinder light radius.

PB_CYLINDERLIGHT_RADIUS 
PB_CYLINDERLIGHT_LENGTH_OLD 

Cylinder light length.

PB_CYLINDERLIGHT_LENGTH 
LAST_EXT_PB 

Last id in list.

                     {
      PB_CONTRAST                = 0,
      PB_DIFFSOFT                = 1,
      PB_PROJECTOR               = 2,
      PB_PROJECTOR_MAP           = 3,
      PB_AFFECT_DIFFUSE          = 4,
      PB_AFFECT_SPECULAR         = 5,
      PB_AMBIENT_ONLY            = 6,
      PB_TDIST                   = 7,
//      PB_LENGTH                       = 8,
//      PB_WIDTH                            = 9,  
//      PB_GARBAGE                      = 10,
//      WARNING:  DO NOT REDEFINE ABOVE IDs.  THIS MAY CAUSE A CRASH WHEN LOADING OLD
//                   FILES
//    Change made August 27, 2001 David Cunningham
//    for B24 of VIZ R4
        PB_LINELIGHT_LENGTH             = 11,
        PB_AREALIGHT_LENGTH             = 11,
        PB_AREALIGHT_WIDTH              = 12, 
        PB_DISCLIGHT_RADIUS             = 13,
        PB_SPHERELIGHT_RADIUS_OLD       = 14, // obsolete, use PB_SPHERELIGHT_RADIUS instead
        PB_SPHERELIGHT_RADIUS           = PB_DISCLIGHT_RADIUS,
        PB_CYLINDERLIGHT_RADIUS_OLD     = 15, // obsolete, use PB_CYLINDERLIGHT_RADIUS instead
        PB_CYLINDERLIGHT_RADIUS         = PB_DISCLIGHT_RADIUS,
        PB_CYLINDERLIGHT_LENGTH_OLD     = 16, // obsolete, use PB_CYLINDERLIGHT_LENGTH instead
        PB_CYLINDERLIGHT_LENGTH         = PB_LINELIGHT_LENGTH,
      LAST_EXT_PB                = PB_CYLINDERLIGHT_LENGTH_OLD
    };
enum ShadowIDs

This enum is used to hold the Shadow parameter IDs.

Enumerator:
PB_ATMOS_SHAD 

Atmospheric shadows.

PB_ATMOS_OPACITY 

Atmosphere opacity.

PB_ATMOS_COLAMT 

Atmosphere color influence.

PB_SHADMULT 

Shadow Density.

PB_SHAD_COLMAP 

Shadow Color Map Enabled.

PB_SHADCOLOR 

Shadow color.

PB_LIGHT_AFFECTS_SHADOW 

Light affects shadow color.

PB_USE_GLOBAL_PARAMS 

Use global shadow generator.

PB_SHAD_PROJ_MAP 

Shadow Projection map.

LAST_SHAD_PB 

Last shadow id.

This enum is used to hold the Spotlight parameter IDs.

Enumerator:
PB_BEAM_ANGLE 

Beam angle.

PB_FIELD_ANGLE 

Field angle.

PB_CONE_DISPLAY 

Display the spot light cone.

LAST_SPOT_PB 

Last spotlight distribution id.

This enum is used to hold the Photometric Web parameter IDs.

Enumerator:
PB_WEB_FILE_NAME 

The name of the webfile.

PB_WEB_ROTATE_X 

Rotate X.

PB_WEB_ROTATE_Y 

Rotate Y.

PB_WEB_ROTATE_Z 

Rotate Z.

LAST_WEB_PB 

Last web distribution id.

This enum is used to hold the intensity types.

These are valid values for the Intensity Type parameter.

Enumerator:
LUMENS 

Intensity is in lumens.

CANDELAS 

Intensity is in candelas.

LUX_AT 

Intensity is in Lux at distance.

                       {
      LUMENS                     = 0,
      CANDELAS                   = 1,
      LUX_AT                     =2,
    };

Shadow types for MAX.

Enumerator:
NO_SHADOW_GENERATOR 

No Shadow Generator.

BITMAP_SHADOWS 

Bitmap Shadows.

RAYTRACE_SHADOWS 

RayTraceShadows.

OTHER_SHADOWS 

Other shadow generator.


Member Function Documentation

LightscapeLight::AreaLightCustAttrib * GetAreaLightCustAttrib ( CustAttrib attrib ) [inline, static]

Returns the AreaLightCustAttrib interface for a custom attribute.

Precondition:
attrib is non-null
Parameters:
[in] attrib - The custom attribute whose AreaLightCustAttrib interface is desired.
Returns:
The AreaLightCustAttrib interface to attrib, or NULL if attrib doesn't support the interface.

Returns NULL if the interface is not present.

{
    return attrib == NULL ? NULL
        : static_cast<LightscapeLight::AreaLightCustAttrib*>(
            attrib->GetInterface(LS_AREALIGHTCUSTATTRIB_INTERFACE_ID));
}
virtual void SetType ( int  type ) [pure virtual]

Sets the light type.

Postcondition:
The light type is changed. When setting the light type to an invaild value, nothing is changed, and no error is returned.
Parameters:
[in] type - The type id the light is to be changed to. Must be a value in the LightTypes enum
See also:
LightscapeLight::LightTypes

Reimplemented from GenLight.

virtual void SetType ( const MCHAR *  name ) [pure virtual]

Sets the light type.

Parameters:
[in] name - The type name the light is to be changed to. May not be NULL. The valid strings are:
  • "Target_Point"
  • "Free_Point"
  • "Target_Linear"
  • "Free_Linear"
  • "Target_Area"
  • "Free_Area"
  • "Target_Disc"
  • "Free_Disc"
  • "Target_Sphere"
  • "Free_Sphere"
  • "Target_Cylinder"
  • "Free_Cylinder"
Postcondition:
The light type is changed or returned. When setting the light type to an invaild value, nothing is changed, and no error is returned.
virtual int Type ( ) [pure virtual]

Returns the current light type.

Returns:
The current light type, as a value from the LightTypes enum
See also:
LightscapeLight::LightTypes

Implements GenLight.

virtual const MCHAR* TypeName ( ) [pure virtual]

Returns the light type.

Returns:
The current light type, as a string
virtual void SetDistribution ( DistTypes  dist ) [pure virtual]

Sets the distribution of the light.

Postcondition:
The distribution is changed
Parameters:
[in] dist - The ID distribution that the light is to use. Must be a value from DistTypes.
virtual DistTypes GetDistribution ( ) const [pure virtual]

Returns the distribution of the light.

Returns:
The distribution ID of the current distribution.
virtual void SetIntensityAt ( float  f ) [pure virtual]

Sets the distance at which the light intensity is measured.

This distance is used then the light intensity type is LUX_AT.

Postcondition:
The distance is set
Parameters:
[in] f - The distance at which the light intensity is measured in system units. Must be greater than 0.
virtual float GetIntensityAt ( ) [pure virtual]

Returns the distance at which the light intensity is measured.

This distance is used then the light intensity type is LUX_AT.

Returns:
The distance is returned.
virtual void SetIntensityType ( IntensityType  t ) [pure virtual]

Sets the intensity type of the light.

Postcondition:
The intensity type is set
Parameters:
[in] t - The new intensity type of the light. Must be a value from IntensityType.
See also:
LightscapeLight::IntensityType.
virtual IntensityType GetIntensityType ( ) [pure virtual]

Returns the intensity type of the light.

See also:
LightscapeLight::IntensityType.
virtual void SetFlux ( TimeValue  t,
float  flux 
) [pure virtual]

Sets the flux of the light.

The flux of a light is a measure of how much light the light produces. It is related to the intensity by a constant factor that depends on the distribution of the light. For example the flux of an isotropic light is always 4PI times the intensity (4PI is the area of a unit sphere).

Postcondition:
The flux of the light is set, which changes the intensity.
Parameters:
[in] t - The time at which the flux is set.
[in] flux - The flux to be set in lumens. Must be greater than or equal to 0.
virtual float GetFlux ( TimeValue  t,
Interval valid = Interval(0, 0) 
) const [pure virtual]

Returns the flux of the light.

Parameters:
[in] t - The time at which the flux is retrieved.
[in,out] valid - The validity of the flux is intersected with the validity in this argument.
Returns:
The flux is returned in lumens.
See also:
For an explanation for flux, see LightscapeLight::SetFlux()
virtual void SetRGBFilter ( TimeValue  t,
Point3 rgb 
) [pure virtual]

Sets the color of the light filter.

Lightscape lights use separate values for the light color and filter color. You should imagine that the light color is the color of the light bulb, and the filter color is the color of the surrounding piece of glass or plastic. The effective color of the light is the product of the filter and light colors. The color can be set in either RGB or HSV format.

Postcondition:
The filter color is changed or returned.
Parameters:
[in] t - The time at which the filter color is set.
[in] rgb - The RGB color to be set
virtual Point3 GetRGBFilter ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [pure virtual]

Returns the color of the light filter.

Parameters:
[in] t - The time at which the filter color is retreived.
[in,out] valid - The validity of the filter color is intersected with the validity in this argument.
Returns:
The filter color is returned in either RGB format.
See also:
For an explanation of the light filter, see LightscapeLight::SetRBGFilter()
virtual void SetHSVFilter ( TimeValue  t,
Point3 hsv 
) [pure virtual]

Sets the color of the light filter.

Postcondition:
The filter color is changed or returned.
Parameters:
[in] t - The time at which the filter color is set.
[in] hsv - The HSV color to be set
See also:
For an explanation of the light filter, see LightscapeLight::SetRBGFilter()
virtual Point3 GetHSVFilter ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [pure virtual]

Returns the color of the light filter.

Parameters:
[in] t - The time at which the filter color is retrieved.
[in,out] valid - The validity of the filter color is intersected with the validity in this argument.
Returns:
The filter color is returned in either HSV format.
See also:
For an explanation of the light filter, see LightscapeLight::SetRBGFilter()
virtual ShadowType* ActiveShadowType ( ) [pure virtual]

Returns the plug-in shadow generator.

There are two shadow generators that can be used by a light. The local shadow generator that is referenced by the light and the global shadow generator that is in the scene. The LightObject methods GetUseGlobal() and SetUseGlobal() access the parameter that determines which shadow generator is actually used. GetShadowGenerator() always returns the local shadow generator, while other methods return and set the shadow generator based on the value of the use global parameter.

Returns:
The shadow generator is returned.
virtual ShadowType* GetShadowGenerator ( ) [pure virtual]

Returns the plug-in shadow generator.

Returns:
The local shadow generator. Always returns the local shadow generator, not the global generator.
See also:
For an explanation of local and global shadow generators, see LightscapeLight::ActiveShadowType()

Reimplemented from GenLight.

virtual const MCHAR* GetShadowGeneratorName ( ) [pure virtual]

Returns the plug-in shadow generator name.

Returns:
The local or global shadow generator name, depending on the value of the use global parameter.
See also:
For an explanation of local and global shadow generators, see LightscapeLight::ActiveShadowType()
virtual void SetShadowGenerator ( ShadowType s ) [pure virtual]

Sets the plug-in shadow generator.

Postcondition:
The shadow generator is set.
Parameters:
[in] s - An instance of the shadow type to be set. The light establishes a reference to this object.
See also:
For an explanation of local and global shadow generators, see LightscapeLight::ActiveShadowType()

Reimplemented from GenLight.

virtual void SetShadowGenerator ( const MCHAR *  name ) [pure virtual]

Sets the plug-in shadow generator.

Postcondition:
The shadow generator is set.
Parameters:
[in] name - The class name of the shadow type to be set.
See also:
For an explanation of local and global shadow generators, see LightscapeLight::ActiveShadowType()
virtual void SetUseShadowColorMap ( TimeValue  t,
int  onOff 
) [pure virtual]

Sets whether a shadow color map is used by the light.

Postcondition:
The flag value is set.
Parameters:
[in] t - The time at which the flag value is set.
[in] onOff - The value to be set. TRUE indicates the the light should use a shadow color map.

Reimplemented from GenLight.

virtual int GetUseShadowColorMap ( TimeValue  t ) [pure virtual]

Returns whether a shadow color map is used by the light.

Parameters:
[in] t - The time at which the flag value is set.
Returns:
The flag value is returned.

Reimplemented from GenLight.

virtual void SetInclude ( BOOL  onOff ) [pure virtual]

Sets whether the Include/Exclude list should include or exclude objects.

Postcondition:
The flag value is set.
Parameters:
[in] onOff - The flag value to be set. TRUE indicates that the light should include objects in the Include/Exclude list.
virtual void UpdateTargDistance ( TimeValue  t,
INode inode 
) [pure virtual]

Update the target distance parameter of the light to the distance between the light target and the light.

Precondition:
The inode should have a target. Nothing is changed if no target is present, however, the method does not check whether this light is attached to the inode argument.
Postcondition:
The distance is updated.
Parameters:
[in] t - The time at which the distance is calculated and set.
[in] inode - The node to be used to calculate the target.

Reimplemented from LightObject.

virtual BOOL SetKelvinControl ( Control kelvin ) [pure virtual]

Sets the controller for the Kelvin temperature.

Postcondition:
The controller is set.
Parameters:
[in] kelvin - The new controller to use for kelvin temperature. NULL will remove any animation.
virtual BOOL SetFilterControl ( Control filter ) [pure virtual]

Sets the controller for the filter color.

Postcondition:
The controller is set.
Parameters:
[in] filter - The new controller to use for filter color. NULL will remove any animation.
virtual Control* GetKelvinControl ( ) [pure virtual]

Returns the controller for the Kelvin temperature.

Returns:
The controller is returned.
virtual Control* GetFilterControl ( ) [pure virtual]

Returns the controller for the filter color.

Returns:
The controller is returned.
virtual float GetKelvin ( TimeValue  t,
Interval v = Interval(0, 0) 
) [pure virtual]

Returns the Kelvin temperature of the light.

Kelvin temperature is a method for retreiving light color based on black body radiation from physics.

Parameters:
[in] t - The time at which the color is retrieved.
[in,out] v - The validity of the color is intersected with this argument.
Returns:
The current kelvin temperature.
virtual void SetKelvin ( TimeValue  t,
float  kelvin 
) [pure virtual]

Sets the Kelvin temperature of the light.

Kelvin temperature is a method for specifying light color based on black body radiation from physics.

Postcondition:
The kelvin temperature is changed.
Parameters:
[in] t - The time at which the color is set.
[in] kelvin - The kelvin temperature in degrees Kelvin. Should be greater than or equal to 0.
virtual BOOL GetUseKelvin ( ) [pure virtual]

Returns whether the kelvin temperature or light color is to be used.

The light color can be set using either an RGB value or a kelvin temperature.

Returns:
TRUE if the kelvin temperature is used, or FALSE if the RBG value is used.
virtual void SetUseKelvin ( BOOL  useKelvin ) [pure virtual]

Sets whether the kelvin temperature or light color is to be used.

The light color can be set using either an RGB value or a kelvin temperature.

Postcondition:
The flag value is changed or returned.
Parameters:
[in] useKelvin - TRUE to use the kelvin temperature, or FALSE to use the RGB value.
virtual MaxSDK::AssetManagement::AssetUser GetWebFile ( ) const [pure virtual]

Returns the web distribution file for the light as an AssetUser.

Returns:
The AssetUser is returned.
virtual const MCHAR* GetFullWebFileName ( ) const [pure virtual]

Returns the filename of the web distribution file for the light.

The full web filename is the full path to the web filename. If the file couldn't be found or the current distribution is not the web distribution, the filename stored in the light is returned.

Returns:
The filename is returned.
virtual void SetWebFile ( const MaxSDK::AssetManagement::AssetUser file ) [pure virtual]

Sets the web distribution file for the light.

Postcondition:
The file is set
Parameters:
[in] file - The new file for the web distribution
virtual float GetWebRotateX ( ) const [pure virtual]

Returns the rotation along the X axis of the web distribution in the light.

Returns:
The rotation in degrees is returned.
virtual void SetWebRotateX ( float  degrees ) [pure virtual]

Sets the rotation along the X axis for the web distribution in the light.

Postcondition:
The rotation is set.
Parameters:
[in] degrees - The amount of rotation in degrees.
virtual float GetWebRotateY ( ) const [pure virtual]

Returns the rotation along the Y axis of the web distribution in the light.

Returns:
The rotation in degrees is returned.
virtual void SetWebRotateY ( float  degrees ) [pure virtual]

Sets the rotation along the Y axis for the web distribution in the light.

Postcondition:
The rotation is set.
Parameters:
[in] degrees - The amount of rotation in degrees.
virtual float GetWebRotateZ ( ) const [pure virtual]

Returns the rotation along the Z axis of the web distribution in the light.

Returns:
The rotation in degrees is returned.
virtual void SetWebRotateZ ( float  degrees ) [pure virtual]

Sets the rotation along the Z axis for the web distribution in the light.

Postcondition:
The rotation is set.
Parameters:
[in] degrees - The amount of rotation in degrees.
virtual float GetDimmerValue ( TimeValue  t,
Interval valid = Interval(0, 0) 
) const [pure virtual]

Returns the dimmer value for the light.

An additional dimmer can be used to independently modify the light intensity.

Parameters:
[in] t - The time at which the dimmer value is retrieved.
[in,out] valid - The validity of the dimmer is intersected with the validity in this argument.
Returns:
the dimmer value is returned.
virtual void SetDimmerValue ( TimeValue  t,
float  dimmer 
) [pure virtual]

Sets the dimmer value for the light.

An additional dimmer can be used to independently modify the light intensity.

Postcondition:
The dimmer value is set.
Parameters:
[in] t - The time at which the dimmer value is set.
[in] dimmer - The value of the dimmer. 1.0 is full-on. 0.0 if full-off.
virtual BOOL GetUseMultiplier ( ) const [pure virtual]

Returns whether the dimmer is used.

Returns:
The value of the flag is returned.
virtual void SetUseMultiplier ( BOOL  on ) [pure virtual]

Sets whether the dimmer is used.

Postcondition:
The value of the flag is changed.
Parameters:
[in] on - The value of the flag to be set. TRUE indicates that the dimmer is used.
virtual BOOL IsColorShiftEnabled ( ) const [pure virtual]

Returns whether the light's intensity shifts (affects) its color.

Note that this parameter is really activated only if GetUseMultiplier() is true.

Returns:
The value of the flag is returned.
virtual void EnableColorShift ( BOOL  on ) [pure virtual]

Sets whether the color of the light shifts when its intensity changes Note that this parameter is really activated only if GetUseMultiplier() is true.

Postcondition:
The value of the flag is changed.
Parameters:
[in] on - If true, the changes in the light's intensity will cause shifts in the light's color, otherwise the light's color will be unaffected by the intensity
virtual float GetResultingIntensity ( TimeValue  t,
Interval valid = Interval(0, 0) 
) const [pure virtual]

Returns the intensity including the dimmer multiplier if it is used.

This utility method returns the effective intensity of a light including the dimmer value if there is one.

Parameters:
[in] t - The time at which to retrieve the intensity or flux.
[in,out] valid - The validity of the effective intensity is intersected with this argument. This includes the validity of the dimmer.
Returns:
The effective intensity in candelas.
virtual float GetResultingFlux ( TimeValue  t,
Interval valid = Interval(0, 0) 
) const [pure virtual]

Returns the flux including the dimmer multiplier if it is used.

This utility method returns the effective flux of a light including the dimmer value if there is one.

Parameters:
[in] t - The time at which to retrieve the intensity or flux.
[in,out] valid - The validity of the effective flux is intersected with this argument. This includes the validity of the dimmer.
Returns:
The effective flux in lumens.
virtual Point3 GetCenter ( ) const [pure virtual]

Returns the location of the center of the light.

This location is in the light's coordinates.

Returns:
The light coordinate of the center of the light.
virtual float GetRadius ( TimeValue  t,
Interval valid = Interval(0, 0) 
) const [pure virtual]

Returns the radius of a disc, sphere, cylinder light.

This method allows to access the radius of a disc, sphere or cylinder light type.

Parameters:
[in] t - The time at which the radius is retrieved.
[in,out] valid - The validity interval of the radius is intersected with this argument.
Returns:
The radius of the light, or zero if the light is not of any of the above mentioned types.
virtual void SetRadius ( TimeValue  t,
float  radius 
) [pure virtual]

Sets the radius of a disc, sphere, cylinder light.

This method allows to set the radius of a disc, sphere or cylinder light. If the light is not of one of the above mentioned types, the method is a no-op.

Parameters:
[in] t - The time at which the radius is set.
[in] radius - The new radius value
virtual float GetLength ( TimeValue  t,
Interval valid = Interval(0, 0) 
) const [pure virtual]

Returns the length of a linear, area, cylinder light.

This method allows to access the length of a linear, area, or cylinder light.

Parameters:
[in] t - The time at which the length is retrieved.
[in,out] valid - The validity interval of the length is intersected with this argument.
Returns:
The length of the light, or zero if the light is not of any of the above mentioned types.
virtual void SetLength ( TimeValue  t,
float  length 
) [pure virtual]

Sets the length of a linear, area, cylinder light.

This method allow to set the length of a linear, area, cylinder light. If the light is not of one of the above mentioned types, the method is a no-op.

Parameters:
[in] t - The time at which the length is set.
[in] length - The new length value
virtual float GetWidth ( TimeValue  t,
Interval valid = Interval(0, 0) 
) const [pure virtual]

Returns the width of an area light.

This method allows to access the width of an area light.

Parameters:
[in] t - The time at which the width is retrieved.
[in,out] valid - The validity interval of the width is intersected with this argument.
Returns:
The width of the light, or zero if the light is not of any of the above mentioned types.
virtual void SetWidth ( TimeValue  t,
float  width 
) [pure virtual]

Sets the width of an area light.

This method allows to set the width of an area light. If the light is not of one of the above mentioned types, the method is a no-op.

Parameters:
[in] t - The time at which the width is set.
[in] width - The new width value
virtual void SetShape ( int  count,
const Point3 pointsIn 
) [pure virtual]

Sets the coordinates of the light.

The use of this functions varies based on the current light type. If the light is a point light, the center is set to the center of the set of points. If the light is a linear light the light's line segment is set to the segment between the first two points. If fewer than two points are specified, no change is made. If the light is an area light, the light area is set to the triangle or quadrilater defined by the 3 or 4 points, respectively. If fewer than 3 points is specified, no change is made. If more than 4 points is specified a quadrliateral is made from the first 4 points.

Precondition:
All points are in light coordinates. Quadrilaterals must be planar.
Postcondition:
The shape is changed.
Parameters:
[in] count - Number of points of the shape.
[in] pointsIn - The array of points in the shape.
virtual int GetShape ( Point3 pointsOut,
int  bufSize 
) const [pure virtual]

Returns the coordinates of the light.

Parameters:
[out] - pointsOut The buffer that will receive the vertices in the shape. If bufSize is 0 this can be NULL.
[in] bufSize - The number of points in the buffer. Only the vertices that fit in the buffer will be stored. The return value will include the count of vertices that could not be stored.
Returns:
The total number of vertices in the shape. This is independant of the number of point in the receiving buffer.
See also:
For further usage notes, see LightscapeLight::SetShape()
virtual float GetOriginalFlux ( ) const [pure virtual]

Returns the original flux for a light.

This is the original flux in the web distribution for a light.

Returns:
The original flux in lumens is returned.
virtual void SetOriginalFlux ( float  flux ) [pure virtual]

Sets the original flux for a light.

This is the original flux in the web distribution for a light. It can be used to reset a light intensity to a default value. The method can be used, but the flux will be reset if the web filename is changed.

Postcondition:
The original flux is set
Parameters:
[in] flux - The flux to be set, in lumens.
virtual float GetOriginalIntensity ( ) const [pure virtual]

Returns the original intensity for a light.

This is the original intensity in the web distribution for a light.

Returns:
The original intensity in candelas is returned.
virtual void SetOriginalIntensity ( float  candelas ) [pure virtual]

Sets the original intensity for a light.

This is the original intensity in the web distribution for a light. It can be used to reset a light intensity to a default value. The method can be used, but the intensity will be reset if the web filename is changed.

Postcondition:
The original intensity is set.
Parameters:
[in] candelas - The intensity to be set, in candelas

LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight
LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight LightscapeLight