Public Member Functions | Static Public Member Functions | Public Attributes

MSPluginLight Class Reference

Search for all occurrences

#include <mxsPlugin.h>

Inheritance diagram for MSPluginLight:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  MSPluginLight ()
  MSPluginLight (MSPluginClass *pc, BOOL loading)
  ~MSPluginLight ()
RefTargetHandle  Clone (RemapDir &remap)
  This method is used by 3ds Max to clone an object.
RefResult  EvalLightState (TimeValue time, Interval &valid, LightState *ls)
  This method is called to update the passed LightState and validity interval of the light.
ObjLightDesc CreateLightDesc (INode *n, BOOL forceShadowBuf)
void  SetUseLight (int onOff)
BOOL  GetUseLight (void)
void  SetHotspot (TimeValue time, float f)
float  GetHotspot (TimeValue t, Interval &valid=Interval(0, 0))
void  SetFallsize (TimeValue time, float f)
float  GetFallsize (TimeValue t, Interval &valid=Interval(0, 0))
void  SetAtten (TimeValue time, int which, float f)
float  GetAtten (TimeValue t, int which, Interval &valid=Interval(0, 0))
void  SetTDist (TimeValue time, float f)
float  GetTDist (TimeValue t, Interval &valid=Interval(0, 0))
void  SetConeDisplay (int s, int notify=TRUE)
BOOL  GetConeDisplay (void)
int  GetShadowMethod ()
  Returns the type of shadows used by the light.
void  SetRGBColor (TimeValue t, Point3 &rgb)
Point3  GetRGBColor (TimeValue t, Interval &valid=Interval(0, 0))
void  SetIntensity (TimeValue time, float f)
float  GetIntensity (TimeValue t, Interval &valid=Interval(0, 0))
void  SetAspect (TimeValue t, float f)
float  GetAspect (TimeValue t, Interval &valid=Interval(0, 0))
void  SetUseAtten (int s)
BOOL  GetUseAtten (void)
void  SetAttenDisplay (int s)
BOOL  GetAttenDisplay (void)
void  Enable (int enab)
void  SetMapBias (TimeValue t, float f)
float  GetMapBias (TimeValue t, Interval &valid=Interval(0, 0))
void  SetMapRange (TimeValue t, float f)
float  GetMapRange (TimeValue t, Interval &valid=Interval(0, 0))
void  SetMapSize (TimeValue t, int f)
int  GetMapSize (TimeValue t, Interval &valid=Interval(0, 0))
void  SetRayBias (TimeValue t, float f)
float  GetRayBias (TimeValue t, Interval &valid=Interval(0, 0))
int  GetUseGlobal ()
void  SetUseGlobal (int a)
int  GetShadow ()
void  SetShadow (int a)
int  GetShadowType ()
void  SetShadowType (int a)
int  GetAbsMapBias ()
  Returns the lights Absolute Map Bias setting.
void  SetAbsMapBias (int a)
  Sets the lights Absolute Map Bias setting.
int  GetOvershoot ()
void  SetOvershoot (int a)
int  GetProjector ()
  Returns the lights Projector on / off setting.
void  SetProjector (int a)
  Sets the lights projector on / off setting.
ExclList GetExclList ()
  Returns the list of names of items included or excluded by this light.
BOOL  Include ()
  Returns TRUE if the light's name list is of items to be included by the light.
Texmap GetProjMap ()
void  SetProjMap (Texmap *pmap)
void  UpdateTargDistance (TimeValue t, INode *inode)
  Updates the display of the light's target distance in the light's rollup page.
int  UsesWireColor ()
  This method determines if the object color is used for display.
GenLight NewLight (int type)
int  Type ()
void  SetType (int tp)
BOOL  IsSpot ()
BOOL  IsDir ()
void  SetSpotShape (int s)
int  GetSpotShape (void)
void  SetHSVColor (TimeValue t, Point3 &hsv)
Point3  GetHSVColor (TimeValue t, Interval &valid=Interval(0, 0))
void  SetContrast (TimeValue time, float f)
float  GetContrast (TimeValue t, Interval &valid=Interval(0, 0))
void  SetUseAttenNear (int s)
BOOL  GetUseAttenNear (void)
void  SetAttenNearDisplay (int s)
BOOL  GetAttenNearDisplay (void)
ExclList GetExclusionList ()
void  SetExclusionList (ExclList &list)
BOOL  SetHotSpotControl (Control *c)
BOOL  SetFalloffControl (Control *c)
BOOL  SetColorControl (Control *c)
Control GetHotSpotControl ()
Control GetFalloffControl ()
Control GetColorControl ()
void  SetAffectDiffuse (BOOL onOff)
BOOL  GetAffectDiffuse ()
void  SetAffectSpecular (BOOL onOff)
BOOL  GetAffectSpecular ()
void  SetDecayType (BOOL onOff)
BOOL  GetDecayType ()
void  SetDecayRadius (TimeValue time, float f)
float  GetDecayRadius (TimeValue t, Interval &valid=Interval(0, 0))
void  SetDiffuseSoft (TimeValue time, float f)
float  GetDiffuseSoft (TimeValue t, Interval &valid=Interval(0, 0))
void  SetShadColor (TimeValue t, Point3 &rgb)
Point3  GetShadColor (TimeValue t, Interval &valid=Interval(0, 0))
BOOL  GetLightAffectsShadow ()
void  SetLightAffectsShadow (BOOL b)
void  SetShadMult (TimeValue t, float m)
float  GetShadMult (TimeValue t, Interval &valid=Interval(0, 0))
Texmap GetShadowProjMap ()
void  SetShadowProjMap (Texmap *pmap)
void  SetAmbientOnly (BOOL onOff)
BOOL  GetAmbientOnly ()
void  SetAtmosShadows (TimeValue t, int onOff)
int  GetAtmosShadows (TimeValue t)
void  SetAtmosOpacity (TimeValue t, float f)
float  GetAtmosOpacity (TimeValue t, Interval &valid=FOREVER)
void  SetAtmosColAmt (TimeValue t, float f)
float  GetAtmosColAmt (TimeValue t, Interval &valid=FOREVER)
void  SetUseShadowColorMap (TimeValue t, int onOff)
int  GetUseShadowColorMap (TimeValue t)
void  SetShadowGenerator (ShadowType *s)
ShadowType GetShadowGenerator ()

Static Public Member Functions

static RefTargetHandle  create (MSPluginClass *pc, BOOL loading)

Public Attributes

ExclList  exclusionList

Constructor & Destructor Documentation

MSPluginLight ( ) [inline]
{ }
MSPluginLight ( MSPluginClass *  pc,
BOOL  loading 
)
~MSPluginLight ( ) [inline]

Member Function Documentation

static RefTargetHandle create ( MSPluginClass *  pc,
BOOL  loading 
) [static]
RefTargetHandle Clone ( RemapDir remap ) [virtual]

This method is used by 3ds Max to clone an object.

See also:
CloneRefHierarchy(), class RemapDir This method is called by 3ds Max to have the plugin clone itself. The plug-in's implementation of this method should copy both the data structure and all the data residing in the data structure of this reference target. The plugin should clone all its references as well. Also, the plug-in's implementation of this method must call BaseClone(). In order for classes derived from this class to clone cleanly, the Clone method should just create the new instance, and then call an implementation of BaseClone that clones the references and copies any other necessary data. For example:
            class MyDerivedPlugin
                : public MyBasePlugin
            {
                const int MY_REFERENCE = 1;

                ReferenceTarget* Clone(RemapDir& remap)
                {
                    ReferenceTarget* result = new MyDerivedPlugin();
                    BaseClone(this, result, remap);
                    return result;
                }

                void BaseClone(ReferenceTarget* from, ReferenceTarget* to, RemapDir& remap)
                {
                    if (!to || !from || from == to)
                        return;    
                    MyBasePlugin::BaseClone(from, to, remap);
                    to->ReplaceReference(MY_REFERENCE, remap->CloneRef(from->GetReference(MY_REFERENCE)));
                }
            };

This method should not be directly called by plug-ins. Instead, either RemapDir::CloneRef() or CloneRefHierachy() should be used to perform cloning. These methods ensure that the mapping from the original object to the clone is added to the RemapDir used for cloning, which may be used during backpatch operations

Note:
See the remarks in method BaseClone() below.
Parameters:
remap - A RemapDir instance used for remapping references during a Clone.
Returns:
A pointer to the cloned item.

Reimplemented from ReferenceTarget.

Reimplemented in MSLightXtnd.

RefResult EvalLightState ( TimeValue  time,
Interval valid,
LightState ls 
) [inline, virtual]

This method is called to update the passed LightState and validity interval of the light.

Parameters:
time The time to evaluate the light state.
valid The validity interval of the light about the specified time. This interval should be updated to reflect the validity interval of the light.
ls A pointer to the LightState structure which describes the properties of the light. This function updates the data in the structure to reflect the properties of the light at the specified time. See Structure LightState.
Returns:
REF_SUCCEED if the LightState was updated; otherwise REF_FAIL.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return REF_SUCCEED; }
ObjLightDesc* CreateLightDesc ( INode inode,
BOOL  forceShadowBuf 
) [inline, virtual]
Remarks:
When the renderer goes to render the scene it asks all of the lights to create an ObjLighDesc object. This is the method that is called to return a pointer to this object.
Parameters:
INode *n

The node pointer of the light.

BOOL forceShadowBuffer

Forces the creation of a shadow buffer.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return LightObject::CreateLightDesc(n, forceShadowBuf); }
void SetUseLight ( int  onOff ) [inline, virtual]
Remarks:
Sets the light on or off.
Parameters:
int onOff

Nonzero sets the light on; zero sets it off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL GetUseLight ( void  ) [inline, virtual]
Remarks:
Returns TRUE if the light is on; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
void SetHotspot ( TimeValue  time,
float  f 
) [inline, virtual]
Remarks:
Sets the hotspot to the specified angle at the specified time.
Parameters:
TimeValue time

The time to set the value.

float f

The angle in degrees.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ } 
float GetHotspot ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the hotspot angle in degrees at the specified time and updates the interval to reflect the validity of the hotspot controller.
Parameters:
TimeValue t

The time to get the angle.

Interval& valid = Interval(0,0)

The interval which is updated.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return 0.0f; }
void SetFallsize ( TimeValue  time,
float  f 
) [inline, virtual]
Remarks:
Sets the falloff angle at the specified time.
Parameters:
TimeValue time

The time to set the angle.

float f

The angle to set in degrees.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetFallsize ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the falloff angle in degrees at the specified time and updates the interval passed to reflect the validity of the falloff controller.
Parameters:
TimeValue t

The time to return the value.

Interval& valid = Interval(0,0)

The interval which is updated.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return 0.0f; }
void SetAtten ( TimeValue  time,
int  which,
float  f 
) [inline, virtual]
Remarks:
Sets the specified attenuation range distance at the time passed.
Parameters:
TimeValue time

The time to set the attenuation distance.

int which

Indicates which distance to set. One of the following values:

ATTEN1_START

The near start range.

ATTEN1_END

The near end range.

ATTEN_START

The far start range.

ATTEN_END

The far end range.

float f

The distance to set.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetAtten ( TimeValue  t,
int  which,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the specified attenuation distance at the time passed and updates the interval to reflect the validity of the attenuation controller.
Parameters:
TimeValue t

The time to get the attenuation distance.

int which

Indicates which distance to get. One of the following values:

ATTEN1_START

The near start range.

ATTEN1_END

The near end range.

ATTEN_START

The far start range.

ATTEN_END

The far end range.

Interval& valid = Interval(0,0)

The interval which is updated.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return 0.0f; }
void SetTDist ( TimeValue  time,
float  f 
) [inline, virtual]
Remarks:
Sets the light's target distance.
Parameters:
TimeValue time

The time to set the distance.

float f

The distance to set.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetTDist ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the light's target distance at the specified time and updates the interval passed to reflect the validity of the target distance.
Parameters:
TimeValue t

The time to retrieve the distance.

Interval& valid = Interval(0,0)

The interval to update.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return 0.0f; }
void SetConeDisplay ( int  s,
int  notify = TRUE 
) [inline, virtual]
Remarks:
Sets the spotlight cone display to on or off. This controls if the cone is depicted graphically in the viewports.
Parameters:
int s

Indicates if the cone display should be on or off. Nonzero indicates the cone should be displayed; otherwise it will be turned off.

int notify=TRUE

If notify is TRUE the plug-in should call NotifyDependents() to notify its dependents.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL GetConeDisplay ( void  ) [inline, virtual]
Remarks:
Returns the cone display property. TRUE if the spotlight cone is on; FALSE if off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
int GetShadowMethod ( ) [inline, virtual]

Returns the type of shadows used by the light.

Returns:
One of the following values: LIGHTSHADOW_NONE LIGHTSHADOW_MAPPED LIGHTSHADOW_RAYTRACED

Reimplemented from LightObject.

Reimplemented in MSLightXtnd.

{return LIGHTSHADOW_NONE;}
void SetRGBColor ( TimeValue  t,
Point3 rgb 
) [inline, virtual]
Remarks:
Sets the color of the light at the specified time.
Parameters:
TimeValue t

The time to set the color.

Point3& rgb

The color to set.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
Point3 GetRGBColor ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the color of the light at the specified time and updates the validity interval to reflect this parameters validity interval.
Parameters:
TimeValue t

The time to get the color.

Interval &valid = Interval(0,0)

The interval which is updated.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return Point3(0,0,0);}        
void SetIntensity ( TimeValue  time,
float  f 
) [inline, virtual]
Remarks:
Sets the intensity (multiplier value) of the light at the specified time.
Parameters:
TimeValue time

The time to set the intensity.

float f

The value to set.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetIntensity ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the intensity (multiplier value) of the light at the specified time and updates the interval passed to reflect the validity of the controller.
Parameters:
TimeValue t

The time to get the value.

Interval& valid = Interval(0,0)

The interval is updated.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0.0f;}
void SetAspect ( TimeValue  t,
float  f 
) [inline, virtual]
Remarks:
Set the aspect property to the specified value.
Parameters:
TimeValue t

The time at which to set the aspect ratio.

float f

Specifies the aspect ratio setting.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetAspect ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the aspect property (for rectangular lights) at the specified time and updates the interval passed to reflect the validity of the aspect controller.
Parameters:
TimeValue t

The time to get the value.

Interval& valid = Interval(0,0)

The interval to update.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0.0f;}    
void SetUseAtten ( int  s ) [inline, virtual]
Remarks:
Sets the far attenuation state to on or off.
Parameters:
int s

Nonzero for on; zero for off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL GetUseAtten ( void  ) [inline, virtual]
Remarks:
Returns nonzero if far attenuation is on; zero if off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return FALSE;}
void SetAttenDisplay ( int  s ) [inline, virtual]
Remarks:
Establishes if the light far attenuation range is displayed in the viewports.
Parameters:
int s

Nonzero for on; zero for off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL GetAttenDisplay ( void  ) [inline, virtual]
Remarks:
Returns TRUE if the far attenuation range is displayed; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return FALSE;}      
void Enable ( int  enab ) [inline, virtual]
Remarks:
Sets the light to enabled or disables (on or off).
Parameters:
int enab

Nonzero for on; zero for off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
void SetMapBias ( TimeValue  t,
float  f 
) [inline, virtual]
Remarks:
Sets the map bias value at the time passed.
Parameters:
TimeValue t

The time to set the value.

float f

The value to set.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetMapBias ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the map bias setting at the specified time and updates the interval passed to reflect the validity of the map bias.
Parameters:
TimeValue t

The time to get the value.

Interval& valid = Interval(0,0)

The interval to update.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0.0f;}
void SetMapRange ( TimeValue  t,
float  f 
) [inline, virtual]
Remarks:
Sets the map range value at the time passed.
Parameters:
TimeValue t

The time to set the value.

float f

The value to set.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetMapRange ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the map range setting at the specified time and updates the interval passed to reflect the validity of the map range.
Parameters:
TimeValue t

The time to get the value.

Interval& valid = Interval(0,0)

The interval to update.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0.0f;}
void SetMapSize ( TimeValue  t,
int  f 
) [inline, virtual]
Remarks:
Sets the map size value at the time passed.
Parameters:
TimeValue t

The time to set the value.

int f

The value to set.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
int GetMapSize ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the map size setting at the specified time and updates the interval passed to reflect the validity of the map size.
Parameters:
TimeValue t

The time to get the value.

Interval& valid = Interval(0,0)

The interval to update.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0;}
void SetRayBias ( TimeValue  t,
float  f 
) [inline, virtual]
Remarks:
Sets the map raytrace bias value at the time passed.
Parameters:
TimeValue t

The time to set the value.

float f

The value to set.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetRayBias ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the raytrace bias setting at the specified time and updates the interval passed to reflect the validity of the bias.
Parameters:
TimeValue t

The time to get the value.

Interval& valid = Interval(0,0)

The interval to update.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0.0f;}
int GetUseGlobal ( ) [inline, virtual]
Remarks:
Returns TRUE if the use global setting is on; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0;}
void SetUseGlobal ( int  a ) [inline, virtual]
Remarks:
Set the use global setting to on or off.
Parameters:
int a

TRUE for on; FALSE for off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
int GetShadow ( ) [inline, virtual]
Remarks:
Returns the lights Cast Shadows flag. Nonzero indicates the light casts shadows; otherwise 0.
Default Implementation:
{return 0;}

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0;}
void SetShadow ( int  a ) [inline, virtual]
Remarks:
Sets the lights Cast Shadows flag.
Parameters:
int a

Nonzero indicates the light casts shadows; zero indicates the light does not cast shadows.
Default Implementation:
{}

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
int GetShadowType ( ) [inline, virtual]
Remarks:
Retrieves the type of shadows used by the light - mapped or raytraced.
Returns:
One of the following values:

-1: if the Shadow Generator is NULL. (R3 only).

0: if the light uses Shadow Maps.

1: if the light uses Raytraced Shadows.

0xffff: for any other Shadow Generators. (R3 only).
Default Implementation:
{return 0;}

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0;}
void SetShadowType ( int  a ) [inline, virtual]
Remarks:
Sets the type of shadows used by the light - mapped or raytraced.
Parameters:
int a

The shadow type. One of the following values:

0: This value plugs in a Shadow Map Generator.

1: This value plugs in a Raytraced Shadow Generator.

Any other value is a NO-OP.
Default Implementation:
{}

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
int GetAbsMapBias ( ) [inline, virtual]

Returns the lights Absolute Map Bias setting.

Returns:
Nonzero indicates Absolute Map Bias is on; zero indicates it is off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0;}
void SetAbsMapBias ( int  a ) [inline, virtual]

Sets the lights Absolute Map Bias setting.

Parameters:
a Nonzero indicates Absolute Map Bias is on; zero indicates it is off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
int GetOvershoot ( ) [inline, virtual]
Remarks:
Returns the overshoot setting. Nonzero is on; zero is off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{return 0;}
void SetOvershoot ( int  a ) [inline, virtual]
Remarks:
Sets the overshoot setting.
Parameters:
int a

Nonzero for on; zero for off.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
int GetProjector ( ) [inline, virtual]

Returns the lights Projector on / off setting.

Nonzero indicates this light projects an image; otherwise 0.

Reimplemented from LightObject.

Reimplemented in MSLightXtnd.

{return 0;}
void SetProjector ( int  a ) [inline, virtual]

Sets the lights projector on / off setting.

Parameters:
a Nonzero indicates this light projects an image; otherwise 0.

Reimplemented from LightObject.

Reimplemented in MSLightXtnd.

{ }
ExclList* GetExclList ( ) [inline, virtual]

Returns the list of names of items included or excluded by this light.

See Class NameTab.

Reimplemented from LightObject.

Reimplemented in MSLightXtnd.

{ return &exclusionList; }
BOOL Include ( ) [inline, virtual]

Returns TRUE if the light's name list is of items to be included by the light.

Returns FALSE if the list is of items to exclude from the light.

Reimplemented from LightObject.

Reimplemented in MSLightXtnd.

{return FALSE;}
Texmap* GetProjMap ( ) [inline, virtual]
Remarks:
Returns a pointer to the texmap used as the projector image or NULL if not set.
Default Implementation:
{ return NULL; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{return NULL;}
void SetProjMap ( Texmap pmap ) [inline, virtual]
Remarks:
Sets the texmap to use as the light's projector image.
Parameters:
Texmap* pmap

Points to the texmap to set or NULL to clear it.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ }
void UpdateTargDistance ( TimeValue  t,
INode inode 
) [inline, virtual]

Updates the display of the light's target distance in the light's rollup page.

Parameters:
t The time to retrieve the distance.
inode The light node.

Reimplemented from LightObject.

Reimplemented in MSLightXtnd.

{ }
int UsesWireColor ( ) [inline, virtual]

This method determines if the object color is used for display.

Returns:
TRUE if the object color is used for display; otherwise FALSE.

Reimplemented from Object.

Reimplemented in MSLightXtnd.

{ return LightObject::UsesWireColor(); }   // TRUE if the object color is used for display
GenLight* NewLight ( int  type ) [inline, virtual]
Remarks:
Creates a new light object of the specified type.
Parameters:
int type

One of the following values:

OMNI_LIGHT -- Omnidirectional light.

TSPOT_LIGHT -- Targeted spot light.

DIR_LIGHT -- Directional light.

FSPOT_LIGHT -- Free spot light.

TDIR_LIGHT -- Targeted directional light.
Returns:
A pointer to a new instance of the specified light type.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return NULL; }
int Type ( ) [inline, virtual]
Remarks:
Returns the type of light this is.
Returns:
One of the following values:

OMNI_LIGHT -- Omnidirectional light.

TSPOT_LIGHT -- Targeted spot light.

DIR_LIGHT -- Directional light.

FSPOT_LIGHT -- Free spot light.

TDIR_LIGHT -- Targeted directional light.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return 0; }  // OMNI_LIGHT, TSPOT_LIGHT, DIR_LIGHT, FSPOT_LIGHT, TDIR_LIGHT
void SetType ( int  tp ) [inline, virtual]

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ } // OMNI_LIGHT, TSPOT_LIGHT, DIR_LIGHT, FSPOT_LIGHT, TDIR_LIGHT      
BOOL IsSpot ( ) [inline, virtual]
Remarks:
Returns TRUE if the light is a spotlight; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
BOOL IsDir ( ) [inline, virtual]
Remarks:
Returns TRUE if the light is directional; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
void SetSpotShape ( int  s ) [inline, virtual]
Remarks:
Sets the shape used for a spotlight, either rectangular or circular.
Parameters:
int s

One of the following values:

RECT_LIGHT

CIRCLE_LIGHT

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
int GetSpotShape ( void  ) [inline, virtual]
Remarks:
Retrieves the shape used for a spotlight.
Returns:
One of the following values:

RECT_LIGHT

CIRCLE_LIGHT

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return 0; }
void SetHSVColor ( TimeValue  t,
Point3 hsv 
) [inline, virtual]
Remarks:
Sets the HSV color of the light at the specified time.
Parameters:
TimeValue t

The time to set the color.

Point3& hsv

The color.
Sample Code:
The following sample shows how the RGB value can be converted to HSV.

{

int h, s, v;

Point3 rgbf = GetRGBColor(t, valid);

DWORD rgb = RGB((int)(rgbf[0]*255.0f),

(int)(rgbf[1]*255.0f), (int)(rgbf[2]*255.0f));

RGBtoHSV (rgb, &h, &s, &v);

return Point3(h/255.0f, s/255.0f, v/255.0f);

}

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
Point3 GetHSVColor ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Retrieves the HSV color of the light at the specified time and updates the validity interval to reflect the color parameter.
Parameters:
TimeValue t

The time to retrieve the color.

Interval &valid = Interval(0,0)

The interval to update.
Returns:
The color of the light (as a Point3).

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return Point3(0.0f, 0.0f, 0.0f); }
void SetContrast ( TimeValue  time,
float  f 
) [inline, virtual]
Remarks:
Sets the light's contrast setting.
Parameters:
TimeValue time

The time to set the contrast value.

float f

The new contrast value in the range of 0.0 to 100.0.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetContrast ( TimeValue  t,
Interval valid = Interval(0, 0) 
) [inline, virtual]
Remarks:
Returns the light's contrast setting in the range 0.0 to 100.0.
Parameters:
TimeValue t

The time to get the light's contrast setting.

Interval& valid = Interval(0,0)

This interval is updated to reflect the interval of the light's contrast setting.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return 0.0f; }
void SetUseAttenNear ( int  s ) [inline, virtual]
Remarks:
Sets if the light uses near attenuation.
Parameters:
int s

Nonzero to use near attenuation; otherwise zero.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL GetUseAttenNear ( void  ) [inline, virtual]
Remarks:
Returns TRUE if the light has near attenuation on; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
void SetAttenNearDisplay ( int  s ) [inline, virtual]
Remarks:
Establishes if the light near attenuation range is displayed in the viewports.
Parameters:
int s

TRUE to turn on the display; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL GetAttenNearDisplay ( void  ) [inline, virtual]
Remarks:
Returns TRUE if the light near attenuation range is displayed in the viewports; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
ExclList& GetExclusionList ( ) [inline, virtual]
Remarks:
Returns the exclusion list for the light.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return exclusionList; }
void SetExclusionList ( ExclList list ) [inline, virtual]
Remarks:
Sets the exclusion list for the light.
Parameters:
ExclList &list

The exclusion list.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL SetHotSpotControl ( Control c ) [inline, virtual]
Remarks:
Sets the controller for the hot spot parameter.
Parameters:
Control *c

The controller to set.
Returns:
TRUE if the controller was set; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
BOOL SetFalloffControl ( Control c ) [inline, virtual]
Remarks:
Sets the controller for the falloff parameter.
Parameters:
Control *c

The controller to set.
Returns:
TRUE if the controller was set; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
BOOL SetColorControl ( Control c ) [inline, virtual]
Remarks:
Sets the controller for the color parameter.
Parameters:
Control *c

The controller to set.
Returns:
TRUE if the controller was set; otherwise FALSE.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
Control* GetHotSpotControl ( ) [inline, virtual]
Remarks:
Returns the controller for the hot spot parameter.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return NULL; }
Control* GetFalloffControl ( ) [inline, virtual]
Remarks:
Returns the controller for the falloff parameter.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return NULL; }
Control* GetColorControl ( ) [inline, virtual]
Remarks:
Returns the controller for the color parameter.

Implements GenLight.

Reimplemented in MSLightXtnd.

{ return NULL; }
void SetAffectDiffuse ( BOOL  onOff ) [inline, virtual]
Remarks:
Establishes if the light affects the diffuse color of objects.
Parameters:
BOOL onOff

TRUE to have the light affect the diffuse color; otherwise FALSE.

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL GetAffectDiffuse ( ) [inline, virtual]
Remarks:
Returns TRUE if the light affects the diffuse color of objects; otherwise FALSE.

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
void SetAffectSpecular ( BOOL  onOff ) [inline, virtual]
Remarks:
Establishes if the light affects the specular color of objects.
Parameters:
BOOL onOff

TRUE to have the light affect the specular color; otherwise FALSE.

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL GetAffectSpecular ( ) [inline, virtual]
Remarks:
Returns TRUE if the light affects the specular color of objects; otherwise FALSE.

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
void SetDecayType ( BOOL  onOff ) [inline, virtual]
Remarks:
Sets the decay state of the light.
Parameters:
BOOL onOff

This boolean works as an integer where 0 is None, 1 is Inverse and 2 is Inverse Square.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ }
BOOL GetDecayType ( ) [inline, virtual]
Remarks:
Returns the decay state of the light.
Returns:
This boolean works as an integer where 0 is None, 1 is Inverse and 2 is Inverse Square.
Default Implementation:
{return 0;}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
void SetDecayRadius ( TimeValue  time,
float  f 
) [inline, virtual]
Remarks:
Sets the decay radius (i.e. falloff) of the light.
Parameters:
TimeValue time

The time at which to set the radius.

float f

The radius to set.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{}
float GetDecayRadius ( TimeValue  t,
Interval valid = Interval(0,0) 
) [inline, virtual]
Remarks:
Returns the decay radius of the light and updates the validity interval to reflect the validity of the radius controller.
Parameters:
TimeValue t

The time at which to return the radius.

Interval& valid = Interval(0,0)

The validity interval which is updated.
Default Implementation:
{ return 0.0f;}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return 0.0f;}
void SetDiffuseSoft ( TimeValue  time,
float  f 
) [inline, virtual]
Remarks:
Sets the state of the 'Soften Diffuse Edge' parameter.
Parameters:
TimeValue time

The time at which to set the value.

float f

The value to set in the range of 0.0 to 100.0.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{}
float GetDiffuseSoft ( TimeValue  t,
Interval valid = Interval(0,0) 
) [inline, virtual]
Remarks:
Returns the state of the 'Soften Diffuse Edge' parameter.
Parameters:
TimeValue t

The time at which to return the value.

Interval& valid = Interval(0,0)

The validity interval that is updated to reflect the state of this parameter.
Default Implementation:
{ return 0.0f; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return 0.0f; }
void SetShadColor ( TimeValue  t,
Point3 rgb 
) [inline, virtual]
Remarks:
Sets the shadow color to the specified value at the time passed.
Parameters:
TimeValue t

The time at which to set the shadow color.

Point3& rgb

The color to set.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{}
Point3 GetShadColor ( TimeValue  t,
Interval valid = Interval(0,0) 
) [inline, virtual]
Remarks:
Returns the shadow color at the time passed and updates the validity interval passed to reflect the validity of the shadow color controller.
Parameters:
TimeValue t

The time at which to return the shadow color.

Interval &valid = Interval(0,0)

The validity interval which is updated.
Default Implementation:
{ return Point3(0,0,0); }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return Point3(0,0,0); }
BOOL GetLightAffectsShadow ( ) [inline, virtual]
Remarks:
Returns TRUE if the Light Affects Shadow Color flag is set; otherwise FALSE.
Default Implementation:
{ return 0; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
void SetLightAffectsShadow ( BOOL  b ) [inline, virtual]
Remarks:
Sets the state of the Light Affects Shadow Color flag to the value passed.
Parameters:
BOOL b

TRUE for set; FALSE for off.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{  }
void SetShadMult ( TimeValue  t,
float  m 
) [inline, virtual]
Remarks:
Sets the shadow color multiplier (density) to the value passed at the specified time.
Parameters:
TimeValue t

The time at which to set the value.

float m

The value to set.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{  }
float GetShadMult ( TimeValue  t,
Interval valid = Interval(0,0) 
) [inline, virtual]
Remarks:
Returns the shadow color multiplier (density) at the specified time and updates the interval passed to reflect the validity of the multiplier controller.
Parameters:
TimeValue t

The time at which to return the value.

Interval &valid = Interval(0,0)

The interval which is updated.
Default Implementation:
{ return 1.0f; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return 1.0f; }
Texmap* GetShadowProjMap ( ) [inline, virtual]
Remarks:
Returns a pointer to the texmap used as the shadow projector or NULL if not set.
Default Implementation:
{ return NULL; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return NULL;  }
void SetShadowProjMap ( Texmap pmap ) [inline, virtual]
Remarks:
Sets the texmap to use as the light's shadow projector.
Parameters:
Texmap* pmap

Points to the texmap to set or NULL to clear it.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{}
void SetAmbientOnly ( BOOL  onOff ) [inline, virtual]
Remarks:
Sets the ambient only flag to on or off.
Parameters:
BOOL onOff

TRUE for on; FALSE for off.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{  }
BOOL GetAmbientOnly ( ) [inline, virtual]
Remarks:
Returns the state of the ambient only flag. TRUE is on; FALSE is off.
Default Implementation:
{ return FALSE; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return FALSE; }
void SetAtmosShadows ( TimeValue  t,
int  onOff 
) [inline, virtual]
Remarks:
Sets the atmospheric shadow flag to on or off at the specified time.
Parameters:
TimeValue t

The time at which to set the value.

int onOff

TRUE for on; FALSE for off.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ }
int GetAtmosShadows ( TimeValue  t ) [inline, virtual]
Remarks:
Returns the atmospheric shadow setting at the specified time.
Parameters:
TimeValue t
Default Implementation:
{ return 0; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return 0; }
void SetAtmosOpacity ( TimeValue  t,
float  f 
) [inline, virtual]
Remarks:
Sets the atmospheric opacity value at the time passed.
Parameters:
TimeValue t

The time to set the value.

float f

The value to set.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetAtmosOpacity ( TimeValue  t,
Interval valid = FOREVER 
) [inline, virtual]
Remarks:
Returns the atmospheric opacity value at the specified time and updates the validity interval to reflect the validity of the opacity controller.
Parameters:
TimeValue t

The time to get the value.

Interval& valid=FOREVER

The interval to update.
Default Implementation:
{ return 0.0f; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return 0.0f; }
void SetAtmosColAmt ( TimeValue  t,
float  f 
) [inline, virtual]
Remarks:
Sets the atmospheric shadow color amount at the specified time.
Parameters:
TimeValue t

The time to set the value.

float f

The value to set.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ }
float GetAtmosColAmt ( TimeValue  t,
Interval valid = FOREVER 
) [inline, virtual]
Remarks:
Returns the atmospheric shadow color amount at the specified time and updates the interval passed to reflect the validity of the amount.
Parameters:
TimeValue t

The time to get.

Interval& valid=FOREVER

The interval to update.
Default Implementation:
{ return 0.0f; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

{ return 0.0f; }
void SetUseShadowColorMap ( TimeValue  t,
int  onOff 
) [inline, virtual]

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

int GetUseShadowColorMap ( TimeValue  t ) [inline, virtual]

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

void SetShadowGenerator ( ShadowType s ) [inline, virtual]
Remarks:
Sets the shadow generator used by the light.
Parameters:
ShadowType *s

The shadow plug-in to use. See Class ShadowType.
Default Implementation:
{}

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.

ShadowType* GetShadowGenerator ( ) [inline, virtual]
Remarks:
Returns a pointer to the shadow generator plug-in in use by the light. See Class ShadowType.
Default Implementation:
{ return NULL; }

Reimplemented from GenLight.

Reimplemented in MSLightXtnd.


Member Data Documentation


MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight
MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight MSPluginLight