Public Member Functions

MSLightXtnd Class Reference

Search for all occurrences

#include <mxsPlugin.h>

Inheritance diagram for MSLightXtnd:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  MSLightXtnd (MSPluginClass *pc, BOOL loading)
  ~MSLightXtnd ()
RefTargetHandle  Clone (RemapDir &remap)
  This method is used by 3ds Max to clone an object.
int  Display (TimeValue t, INode *inode, ViewExp *vpt, int flags)
  This is called by the system to have the item display itself (perform a quick render in viewport, using the current TM).
void  GetWorldBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &abox)
  This method returns the world space bounding box for Objects (see below for the Sub-object gizmo or Modifiers gizmo version).
void  GetLocalBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &abox)
  This is the object space bounding box, the box in the object's local coordinates.
void  GetDeformBBox (TimeValue t, Box3 &abox, Matrix3 *tm, BOOL useSel)
  This method computes the bounding box in the objects local coordinates or the optional space defined by tm.
int  HitTest (TimeValue t, INode *inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt)
  This method is called to determine if the specified screen point intersects the item.
void  Snap (TimeValue t, INode *inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt)
  Checks the point passed for a snap and updates the SnapInfo structure.
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  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))
int  GetUseGlobal ()
void  SetUseGlobal (int a)
int  GetShadow ()
void  SetShadow (int a)
int  GetShadowType ()
void  SetShadowType (int a)
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 ()

Constructor & Destructor Documentation

MSLightXtnd ( MSPluginClass *  pc,
BOOL  loading 
)
~MSLightXtnd ( ) [inline]

Member Function Documentation

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

int Display ( TimeValue  t,
INode inode,
ViewExp vpt,
int  flags 
) [virtual]

This is called by the system to have the item display itself (perform a quick render in viewport, using the current TM).

Note: For this method to be called the object's validity interval must be invalid at the specified time t. If the interval is valid, the system may not call this method since it thinks the display is already valid.

Parameters:
t The time to display the object.
inode The node to display.
vpt An interface pointer that may be used to call methods associated with the viewports.
flags See Display Flags.
Returns:
The return value is not currently used.

Reimplemented from MSObjectXtnd< GenLight, MSPluginLight >.

void GetWorldBoundBox ( TimeValue  t,
INode inode,
ViewExp vp,
Box3 box 
) [virtual]

This method returns the world space bounding box for Objects (see below for the Sub-object gizmo or Modifiers gizmo version).

The bounding box returned by this method does not need to be precise. It should however be calculated rapidly. The object can handle this by transforming the 8 points of its local bounding box into world space and take the minimums and maximums of the result. Although this isn't necessarily the tightest bounding box of the objects points in world space, it is close enough.

Parameters:
t The time to compute the bounding box.
inode The node to calculate the bounding box for.
vp An interface pointer that can be used to call methods associated with the viewports.
box Contains the returned bounding box.

Reimplemented from MSObjectXtnd< GenLight, MSPluginLight >.

void GetLocalBoundBox ( TimeValue  t,
INode inode,
ViewExp vp,
Box3 box 
) [virtual]

This is the object space bounding box, the box in the object's local coordinates.

The system expects that requesting the object space bounding box will be fast.

Parameters:
t The time to retrieve the bounding box.
inode The node to calculate the bounding box for.
vp An interface pointer that may be used to call methods associated with the viewports.
box Contains the returned bounding box.

Reimplemented from MSObjectXtnd< GenLight, MSPluginLight >.

void GetDeformBBox ( TimeValue  t,
Box3 box,
Matrix3 tm,
BOOL  useSel 
) [virtual]

This method computes the bounding box in the objects local coordinates or the optional space defined by tm.

Note: If you are looking for a precise bounding box, use this method and pass in the node's object TM (INode::GetObjectTM()) as the matrix.

Parameters:
t The time to compute the box.
box A reference to a box the result is stored in.
tm This is an alternate coordinate system used to compute the box. If the tm is not NULL this matrix should be used in the computation of the result.
useSel If TRUE, the bounding box of selected sub-elements should be computed; otherwise the entire object should be used.

Reimplemented from MSObjectXtnd< GenLight, MSPluginLight >.

int HitTest ( TimeValue  t,
INode inode,
int  type,
int  crossing,
int  flags,
IPoint2 p,
ViewExp vpt 
) [virtual]

This method is called to determine if the specified screen point intersects the item.

The method returns nonzero if the item was hit; otherwise 0.

Parameters:
t The time to perform the hit test.
inode A pointer to the node to test.
type The type of hit testing to perform. See Scene and Node Hit Test Types. for details.
crossing The state of the crossing setting. If TRUE crossing selection is on.
flags The hit test flags. See Scene and Node Hit Testing Flags for details.
p The screen point to test.
vpt An interface pointer that may be used to call methods associated with the viewports.
Returns:
Nonzero if the item was hit; otherwise 0.

Reimplemented from MSObjectXtnd< GenLight, MSPluginLight >.

void Snap ( TimeValue  t,
INode inode,
SnapInfo snap,
IPoint2 p,
ViewExp vpt 
) [virtual]

Checks the point passed for a snap and updates the SnapInfo structure.

Note:
Developers wanting to find snap points on an Editable Mesh object should see the method XmeshSnap::Snap() in /MAXSDK/SAMPLES/SNAPS/XMESH/XMESH.CPP.
Parameters:
t The time to check.
inode The node to check.
snap The snap info structure to update.
p The screen point to check.
vpt An interface pointer that may be used to call methods associated with the viewports.

Reimplemented from MSObjectXtnd< GenLight, MSPluginLight >.

RefResult EvalLightState ( TimeValue  time,
Interval valid,
LightState ls 
) [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.

Reimplemented from MSPluginLight.

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.

Reimplemented from MSPluginLight.

{ return delegate->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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->GetUseLight(); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetHotspot(time, f); } 
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.

Reimplemented from MSPluginLight.

{ return delegate->GetHotspot(t, valid); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetFallsize(time, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetFallsize(t, valid); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetAtten(time, which, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetAtten(t, which, valid); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetTDist(time, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetTDist(t, valid); }
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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->GetConeDisplay(); }
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 MSPluginLight.

{return delegate->GetShadowMethod();}
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.

Reimplemented from MSPluginLight.

{ delegate->SetRGBColor(t, rgb); }
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.

Reimplemented from MSPluginLight.

{return delegate->GetRGBColor(t, valid);}        
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.

Reimplemented from MSPluginLight.

{ delegate->SetIntensity(time, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetIntensity(t, valid); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetAspect(t, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetAspect(t, valid); }    
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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->GetUseAtten(); }
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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->GetAttenDisplay(); }      
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.

Reimplemented from MSPluginLight.

{ delegate->Enable(enab); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetMapBias(t, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetMapBias(t, valid); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetMapRange(t, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetMapRange(t, valid); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetMapSize(t, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetMapSize(t, valid); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetRayBias(t, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetRayBias(t, valid); }
int GetAbsMapBias ( ) [inline, virtual]

Returns the lights Absolute Map Bias setting.

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

Reimplemented from MSPluginLight.

{ return delegate->GetAbsMapBias(); }
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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

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

Nonzero for on; zero for off.

Reimplemented from MSPluginLight.

int GetProjector ( ) [inline, virtual]

Returns the lights Projector on / off setting.

Nonzero indicates this light projects an image; otherwise 0.

Reimplemented from MSPluginLight.

{ return delegate->GetProjector(); }
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 MSPluginLight.

ExclList* GetExclList ( ) [inline, virtual]

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

See Class NameTab.

Reimplemented from MSPluginLight.

{ return delegate->GetExclList(); }
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 MSPluginLight.

{ return delegate->Include(); }
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 MSPluginLight.

{ return delegate->GetProjMap(); }
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 MSPluginLight.

{ delegate->SetProjMap(pmap); }
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 MSPluginLight.

{ delegate->UpdateTargDistance(t, inode); }
int UsesWireColor ( ) [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 MSPluginLight.

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.

Reimplemented from MSPluginLight.

{ return delegate->NewLight(type); }
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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

{ delegate->SetType(tp); } // 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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->IsDir(); }
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

Reimplemented from MSPluginLight.

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

RECT_LIGHT

CIRCLE_LIGHT

Reimplemented from MSPluginLight.

{ return delegate->GetSpotShape(); }
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);

}

Reimplemented from MSPluginLight.

{ delegate->SetHSVColor(t, hsv); }
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).

Reimplemented from MSPluginLight.

{ return delegate->GetHSVColor(t, valid); }
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.

Reimplemented from MSPluginLight.

{ delegate->SetContrast(time, f); }
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.

Reimplemented from MSPluginLight.

{ return delegate->GetContrast(t, valid); }
void SetUseAttenNear ( int  s ) [inline, virtual]
Remarks:
Sets if the light uses near attenuation.
Parameters:
int s

Nonzero to use near attenuation; otherwise zero.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->GetUseAttenNear(); }
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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

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

The exclusion list.

Reimplemented from MSPluginLight.

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.

Reimplemented from MSPluginLight.

{ return delegate->SetHotSpotControl(c); }
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.

Reimplemented from MSPluginLight.

{ return delegate->SetFalloffControl(c); }
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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->GetColorControl(); }
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 MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->GetAffectDiffuse(); }
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 MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->GetAffectSpecular(); }
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 MSPluginLight.

{ delegate->SetDecayType(onOff); }
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 MSPluginLight.

{ return delegate->GetDecayType(); }
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 MSPluginLight.

{ delegate->SetDecayRadius(time, f); }
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 MSPluginLight.

{ return delegate->GetDecayRadius(t, valid);}
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 MSPluginLight.

{ delegate->SetDiffuseSoft(time, f); }
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 MSPluginLight.

{ return delegate->GetDiffuseSoft(t, valid); }
int GetUseGlobal ( ) [inline, virtual]
Remarks:
Returns TRUE if the use global setting is on; otherwise FALSE.

Reimplemented from MSPluginLight.

{ return delegate->GetUseGlobal(); }
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.

Reimplemented from MSPluginLight.

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

Reimplemented from MSPluginLight.

{ return delegate->GetShadow(); }
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:
{}

Reimplemented from MSPluginLight.

{ delegate->SetShadow(a); }
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;}

Reimplemented from MSPluginLight.

{ return delegate->GetShadowType(); }
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:
{}

Reimplemented from MSPluginLight.

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

{ delegate->SetShadColor(t, rgb); }
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 MSPluginLight.

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

Reimplemented from MSPluginLight.

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

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

{ delegate->SetShadMult(t, m); }
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 MSPluginLight.

{ return delegate->GetShadMult(t, valid); }
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 MSPluginLight.

{ return delegate->GetShadowProjMap();  }
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 MSPluginLight.

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

{ delegate->SetAmbientOnly(onOff); }
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 MSPluginLight.

{ return delegate->GetAmbientOnly(); }
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 MSPluginLight.

{ delegate->SetAtmosShadows(t, onOff);}
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 MSPluginLight.

{ return delegate->GetAtmosShadows(t); }
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 MSPluginLight.

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

{ return delegate->GetAtmosOpacity(t); }
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 MSPluginLight.

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

{ return delegate->GetAtmosColAmt(t); }
void SetUseShadowColorMap ( TimeValue  t,
int  onOff 
) [inline, virtual]
int GetUseShadowColorMap ( TimeValue  t ) [inline, virtual]
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 MSPluginLight.

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

{ return delegate->GetShadowGenerator(); } 

MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd
MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd MSLightXtnd