This reference page is linked to from the following overview topics: Object Plug-ins, Lesson 2: The Scene Graph and Nodes, Overview: Scene Graph and Nodes, Plug-in Base Classes, Principal Light Classes, Light Parameters.
This is the base class from which plug-in lights may be derived.
#include <object.h>
Public Member Functions |
|
SClass_ID | SuperClassID () |
Retrieves a constant representing the type
of the plugin. |
|
int | IsRenderable () |
Indicates whether the object may be
rendered. |
|
virtual void | InitNodeName (MSTR &s) |
This is the default name of the node when it
is created. |
|
virtual CoreExport void * | GetInterface (ULONG id) |
Inherited from Animatable. |
|
virtual CoreExport BaseInterface * | GetInterface (Interface_ID id) |
Inherited from Animatable. |
|
virtual RefResult | EvalLightState (TimeValue time, Interval &valid, LightState *ls)=0 |
This method is called to update the passed
LightState
and validity interval of the light. |
|
virtual ObjLightDesc * | CreateLightDesc (INode *n, BOOL forceShadowBuffer=FALSE) |
When the renderer goes to render the scene
it asks all of the lights to create an ObjectLighDesc object.
|
|
virtual ObjLightDesc * | CreateLightDesc (RenderGlobalContext *rgc, INode *inode, BOOL forceShadowBuf=FALSE) |
virtual void | SetUseLight (int onOff)=0 |
Sets if the light is on or off. |
|
virtual BOOL | GetUseLight (void)=0 |
Returns TRUE if the light is on; otherwise
FALSE. |
|
virtual void | SetHotspot (TimeValue time, float f)=0 |
Sets the hotspot to the specified angle at
the specified time. |
|
virtual float | GetHotspot (TimeValue t, Interval &valid=Interval(0, 0))=0 |
Retrieves the hotspot angle. |
|
virtual void | SetFallsize (TimeValue time, float f)=0 |
Sets the falloff setting of the light.
|
|
virtual float | GetFallsize (TimeValue t, Interval &valid=Interval(0, 0))=0 |
Returns the falloff angle of the light in
radians. |
|
virtual void | SetAtten (TimeValue time, int which, float f)=0 |
Sets the specified attenuation range
distance at the time passed. |
|
virtual float | GetAtten (TimeValue t, int which, Interval &valid=Interval(0, 0))=0 |
Returns the specified attenuation range
distance at the time passed. |
|
virtual void | SetTDist (TimeValue time, float f)=0 |
Sets the light's target distance. |
|
virtual float | GetTDist (TimeValue t, Interval &valid=Interval(0, 0))=0 |
Retrieves the light's target distance.
|
|
virtual void | SetConeDisplay (int s, int notify=TRUE)=0 |
Sets the light's cone display flag. |
|
virtual BOOL | GetConeDisplay (void)=0 |
Retrieves the light's cone display setting.
|
|
virtual int | GetShadowMethod () |
Returns the type of shadows used by the
light. |
|
virtual void | SetRGBColor (TimeValue t, Point3 &rgb) |
Sets the color of the light at the specified
time. |
|
virtual Point3 | GetRGBColor (TimeValue t, Interval &valid=Interval(0, 0)) |
Returns the color of the light at the
specified time and updates the validity interval to reflect this
parameters validity interval. |
|
virtual void | SetIntensity (TimeValue time, float f) |
Sets the intensity of the light to the value
passed. |
|
virtual float | GetIntensity (TimeValue t, Interval &valid=Interval(0, 0)) |
Retrieves the intensity of the light at the
specified time and updates the validity interval passed to reflect
the validity interval of this parameter. |
|
virtual void | SetAspect (TimeValue t, float f) |
Sets the aspect ratio of the light at the
specified time. |
|
virtual float | GetAspect (TimeValue t, Interval &valid=Interval(0, 0)) |
Retrieves the aspect ratio of the light at
the specified time and updates the validity interval passed to
reflect the validity interval of this parameter. |
|
virtual void | SetUseAtten (int s) |
Sets the flag to indicate if the light is
attenuated. |
|
virtual BOOL | GetUseAtten (void) |
Returns TRUE to indicate the light is
attenuated; otherwise FALSE. |
|
virtual void | SetAttenDisplay (int s) |
Sets the flag to indicate if the light
attenuation ranges are displayed. |
|
virtual BOOL | GetAttenDisplay (void) |
Returns TRUE if the light attenuation ranges
are displayed; otherwise FALSE. |
|
virtual void | Enable (int enab) |
Sets the light to enabled or disables (on or
off). |
|
virtual void | SetMapBias (TimeValue t, float f) |
Sets the map bias setting at the time
passed. |
|
virtual float | GetMapBias (TimeValue t, Interval &valid=Interval(0, 0)) |
Returns the map bias setting at the time
passed and updates the validity interval to reflect the validity
interval of this parameter. |
|
virtual void | SetMapRange (TimeValue t, float f) |
Sets the map sample range setting to the
value passed at the time passed. |
|
virtual float | GetMapRange (TimeValue t, Interval &valid=Interval(0, 0)) |
Retrieves the lights map sample range
setting at the specified time and updates the validity interval to
reflect the validity interval of this parameter. |
|
virtual void | SetMapSize (TimeValue t, int f) |
Sets the lights map size parameter to the
value passed at the time passed. |
|
virtual int | GetMapSize (TimeValue t, Interval &valid=Interval(0, 0)) |
Returns the lights map size parameter at the
specified time and updates the validity interval passed to reflect
the validity interval of this parameter. |
|
virtual void | SetRayBias (TimeValue t, float f) |
Sets the raytrace bias setting to the value
passed at the specified time. |
|
virtual float | GetRayBias (TimeValue t, Interval &valid=Interval(0, 0)) |
Returns the lights raytrace bias setting at
the specified time and updates the validity interval passed to
reflect the validity interval of this parameter. |
|
virtual int | GetUseGlobal () |
Returns the Use Global Settings flag
setting. |
|
virtual void | SetUseGlobal (int a) |
Sets the lights Use Global Settings flag.
|
|
virtual int | GetShadow () |
Returns the lights Cast Shadows flag.
|
|
virtual void | SetShadow (int a) |
Sets the lights Cast Shadows flag. |
|
virtual int | GetShadowType () |
Retrieves the type of shadows used by the
light - mapped or raytraced. |
|
virtual void | SetShadowType (int a) |
Sets the type of shadows used by the light -
mapped or raytraced. |
|
virtual int | GetAbsMapBias () |
Returns the lights Absolute Map Bias
setting. |
|
virtual void | SetAbsMapBias (int a) |
Sets the lights Absolute Map Bias setting.
|
|
virtual int | GetOvershoot () |
Returns the lights Overshoot on / off
setting. |
|
virtual void | SetOvershoot (int a) |
Sets the lights Overshoot on / off setting.
|
|
virtual int | GetProjector () |
Returns the lights Projector on / off
setting. |
|
virtual void | SetProjector (int a) |
Sets the lights projector on / off setting.
|
|
virtual ExclList * | GetExclList () |
Returns the list of names of items included
or excluded by this light. |
|
virtual BOOL | Include () |
Returns TRUE if the light's name list is of
items to be included by the light. |
|
virtual Texmap * | GetProjMap () |
Returns the map used by a projector light.
|
|
virtual void | SetProjMap (Texmap *pmap) |
Sets the image(s) used by the projector
light. |
|
virtual void | UpdateTargDistance (TimeValue t, INode *inode) |
Updates the display of the light's target
distance in the light's rollup page. |
SClass_ID SuperClassID | ( | ) | [inline, virtual] |
Retrieves a constant representing the type of the plugin.
Reimplemented from ReferenceTarget.
{ return LIGHT_CLASS_ID; }
int IsRenderable | ( | ) | [inline, virtual] |
Indicates whether the object may be rendered.
Some objects such as construction grids and helpers should not be rendered and can return zero.
Implements Object.
{ return(0);}
virtual void InitNodeName | ( | MSTR & | s | ) | [inline, virtual] |
This is the default name of the node when it is created.
s | The default name of the node is stored here. |
Implements Object.
Reimplemented in MSPluginObject< GenLight >, and MSObjectXtnd< GenLight, MSPluginLight >.
{ s = _M("Light"); }
virtual CoreExport void* GetInterface | ( | ULONG | id | ) | [virtual] |
Inherited from Animatable.
Returns a pointer to the interface.
id | - The id of the interface. |
Reimplemented from Object.
Reimplemented in MSPluginObject< GenLight >, and MSObjectXtnd< GenLight, MSPluginLight >.
virtual CoreExport BaseInterface* GetInterface | ( | Interface_ID | id | ) | [virtual] |
Inherited from Animatable.
Returns a pointer to the Base Interface for the interface ID passed.
id | - The unique ID of the interface to get |
Reimplemented from Object.
Reimplemented in MSPluginObject< GenLight >, and MSObjectXtnd< GenLight, MSPluginLight >.
virtual RefResult EvalLightState | ( | TimeValue | time, |
Interval & | valid, | ||
LightState * | ls | ||
) | [pure virtual] |
This method is called to update the passed LightState and validity interval of the light.
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. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
virtual ObjLightDesc* CreateLightDesc | ( | INode * | n, |
BOOL | forceShadowBuffer =
FALSE |
||
) | [inline, virtual] |
When the renderer goes to render the scene it asks all of the lights to create an ObjectLighDesc object.
This is the method that is called to return this object.
n | The node pointer of the light. |
forceShadowBuffer | Forces the creation of a shadow buffer. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return NULL;}
virtual ObjLightDesc* CreateLightDesc | ( | RenderGlobalContext * | rgc, |
INode * | inode, | ||
BOOL | forceShadowBuf =
FALSE |
||
) | [inline, virtual] |
virtual void SetUseLight | ( | int | onOff | ) | [pure virtual] |
Sets if the light is on or off.
onOff | TRUE for on; FALSE for off. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
virtual BOOL GetUseLight | ( | void | ) | [pure virtual] |
Returns TRUE if the light is on; otherwise FALSE.
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
virtual void SetHotspot | ( | TimeValue | time, |
float | f | ||
) | [pure virtual] |
Sets the hotspot to the specified angle at the specified time.
time | The time to set the hotspot angle. |
f | The angle to set in degrees. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
Retrieves the hotspot angle.
t | The time to retrieve the angle. |
valid | The validity interval that this method will update to reflect the hotspot setting. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
virtual void SetFallsize | ( | TimeValue | time, |
float | f | ||
) | [pure virtual] |
Sets the falloff setting of the light.
time | The time to set the falloff. |
f | The falloff angle in degrees. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
Returns the falloff angle of the light in radians.
t | The time to retrieve the falloff angle. |
valid | The validity interval that this method will update to reflect the falloff setting. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
virtual void SetAtten | ( | TimeValue | time, |
int | which, | ||
float | f | ||
) | [pure virtual] |
Sets the specified attenuation range distance at the time passed.
time | The time to set the attenuation distance. |
which | Indicates which distance to set. One of the following values:
LIGHT_ATTEN_START - The start range radius. LIGHT_ATTEN_END - The end range radius. |
f | The distance to set. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
Returns the specified attenuation range distance at the time passed.
t | The time to retrieve the attenuation distance. |
which | Indicates which distance to retrieve. One of the following
values:
LIGHT_ATTEN_START - The start range radius. LIGHT_ATTEN_END - The end range radius. |
valid | The validity interval that this method will update to reflect the attenuation setting. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
virtual void SetTDist | ( | TimeValue | time, |
float | f | ||
) | [pure virtual] |
Sets the light's target distance.
time | The time to set the distance. |
f | The distance to set. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
Retrieves the light's target distance.
t | The time to retrieve the distance. |
valid | The validity interval that this method will update to reflect the target distance setting. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
virtual void SetConeDisplay | ( | int | s, |
int | notify =
TRUE |
||
) | [pure virtual] |
Sets the light's cone display flag.
This controls if the cone is depicted graphically in the viewports.
s | Indicates if the cone display should be on or off. If nonzero, the cone should be displayed; otherwise it should be turned off. |
notify | If notify is TRUE the plug-in should call NotifyDependents() to notify its dependents. |
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
virtual BOOL GetConeDisplay | ( | void | ) | [pure virtual] |
Retrieves the light's cone display setting.
This indicates if the cone is depicted graphically in the viewports.
Implemented in GenLight, MSPluginLight, and MSLightXtnd.
virtual int GetShadowMethod | ( | ) | [inline, virtual] |
Returns the type of shadows used by the light.
Reimplemented in MSPluginLight, and MSLightXtnd.
{return LIGHTSHADOW_NONE;}
virtual void SetRGBColor | ( | TimeValue | t, |
Point3 & | rgb | ||
) | [inline, virtual] |
Sets the color of the light at the specified time.
t | The time to set the color. |
rgb | The color to set. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
Returns the color of the light at the specified time and updates the validity interval to reflect this parameters validity interval.
t | The time to retrieve the value. |
valid | The validity interval to intersect with this parameters interval. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return Point3(0,0,0);}
virtual void SetIntensity | ( | TimeValue | time, |
float | f | ||
) | [inline, virtual] |
Sets the intensity of the light to the value passed.
time | The time to set the value. |
f | The value to set. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
Retrieves the intensity of the light at the specified time and updates the validity interval passed to reflect the validity interval of this parameter.
t | The time to retrieve the value. |
valid | The validity interval to intersect with this parameters interval. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0.0f;}
virtual void SetAspect | ( | TimeValue | t, |
float | f | ||
) | [inline, virtual] |
Sets the aspect ratio of the light at the specified time.
t | The time to set the value. |
f | The value to set. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
Retrieves the aspect ratio of the light at the specified time and updates the validity interval passed to reflect the validity interval of this parameter.
t | The time to retrieve the value. |
valid | The validity interval to intersect with this parameters interval. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0.0f;}
virtual void SetUseAtten | ( | int | s | ) | [inline, virtual] |
Sets the flag to indicate if the light is attenuated.
s | Nonzero to indicate the light is attenuated; otherwise 0. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
virtual BOOL GetUseAtten | ( | void | ) | [inline, virtual] |
Returns TRUE to indicate the light is attenuated; otherwise FALSE.
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return FALSE;}
virtual void SetAttenDisplay | ( | int | s | ) | [inline, virtual] |
Sets the flag to indicate if the light attenuation ranges are displayed.
s | Nonzero to indicate the light attenuation ranges are displayed; otherwise 0. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
virtual BOOL GetAttenDisplay | ( | void | ) | [inline, virtual] |
Returns TRUE if the light attenuation ranges are displayed; otherwise FALSE.
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return FALSE;}
virtual void Enable | ( | int | enab | ) | [inline, virtual] |
Sets the light to enabled or disables (on or off).
enab | Nonzero to set the light to on; zero to turn the light off. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
virtual void SetMapBias | ( | TimeValue | t, |
float | f | ||
) | [inline, virtual] |
Sets the map bias setting at the time passed.
t | The time to set the value. |
f | The map bias value to set. The 3ds Max lights use a range of 0.0 to 100.0. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
Returns the map bias setting at the time passed and updates the validity interval to reflect the validity interval of this parameter.
t | The time to retrieve the value. |
valid | The validity interval to update to reflect this parameters validity interval. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0.0f;}
virtual void SetMapRange | ( | TimeValue | t, |
float | f | ||
) | [inline, virtual] |
Sets the map sample range setting to the value passed at the time passed.
t | The time to set the value.\ |
f | The value to set. The 3ds Max lights use a range of 0.0 to 20.0. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
Retrieves the lights map sample range setting at the specified time and updates the validity interval to reflect the validity interval of this parameter.
t | The time to retrieve the value. |
valid | The validity interval to update to reflect this parameters validity interval. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0.0f;}
virtual void SetMapSize | ( | TimeValue | t, |
int | f | ||
) | [inline, virtual] |
Sets the lights map size parameter to the value passed at the time passed.
t | The time to set the value. |
f | The value to set. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
Returns the lights map size parameter at the specified time and updates the validity interval passed to reflect the validity interval of this parameter.
t | The time to retrieve the value. |
valid | The validity interval to update to reflect this parameters validity interval. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0;}
virtual void SetRayBias | ( | TimeValue | t, |
float | f | ||
) | [inline, virtual] |
Sets the raytrace bias setting to the value passed at the specified time.
t | The time to set the value. |
f | The value to set. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
Returns the lights raytrace bias setting at the specified time and updates the validity interval passed to reflect the validity interval of this parameter.
t | The time to retrieve the value. |
valid | The validity interval to update to reflect this parameters validity interval. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0.0f;}
virtual int GetUseGlobal | ( | ) | [inline, virtual] |
Returns the Use Global Settings flag setting.
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0;}
virtual void SetUseGlobal | ( | int | a | ) | [inline, virtual] |
Sets the lights Use Global Settings flag.
a | Nonzero indicates the light uses the global settings; zero indicates the light uses its own settings. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
virtual int GetShadow | ( | ) | [inline, virtual] |
Returns the lights Cast Shadows flag.
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0;}
virtual void SetShadow | ( | int | a | ) | [inline, virtual] |
Sets the lights Cast Shadows flag.
a | Nonzero indicates the light casts shadows; zero indicates the light does not cast shadows. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
virtual int GetShadowType | ( | ) | [inline, virtual] |
Retrieves the type of shadows used by the light - mapped or raytraced.
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0;}
virtual void SetShadowType | ( | int | a | ) | [inline, virtual] |
Sets the type of shadows used by the light - mapped or raytraced.
a | 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 NOOP. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
virtual int GetAbsMapBias | ( | ) | [inline, virtual] |
Returns the lights Absolute Map Bias setting.
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0;}
virtual void SetAbsMapBias | ( | int | a | ) | [inline, virtual] |
Sets the lights Absolute Map Bias setting.
a | Nonzero indicates Absolute Map Bias is on; zero indicates it is off. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
virtual int GetOvershoot | ( | ) | [inline, virtual] |
Returns the lights Overshoot on / off setting.
Nonzero indicates overshoot is on; otherwise 0.
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return 0;}
virtual void SetOvershoot | ( | int | a | ) | [inline, virtual] |
Sets the lights Overshoot on / off setting.
a | Nonzero indicates overshoot is on; otherwise 0. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
virtual int GetProjector | ( | ) | [inline, virtual] |
Returns the lights Projector on / off setting.
Nonzero indicates this light projects an image; otherwise 0.
Reimplemented in MSPluginLight, and MSLightXtnd.
{return 0;}
virtual void SetProjector | ( | int | a | ) | [inline, virtual] |
Sets the lights projector on / off setting.
a | Nonzero indicates this light projects an image; otherwise 0. |
Reimplemented in MSPluginLight, and MSLightXtnd.
{}
virtual ExclList* GetExclList | ( | ) | [inline, virtual] |
Returns the list of names of items included or excluded by this light.
See Class NameTab.
Reimplemented in MSPluginLight, and MSLightXtnd.
{return NULL;}
virtual 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 in MSPluginLight, and MSLightXtnd.
{return FALSE;}
virtual Texmap* GetProjMap | ( | ) | [inline, virtual] |
Returns the map used by a projector light.
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{return NULL;}
virtual void SetProjMap | ( | Texmap * | pmap | ) | [inline, virtual] |
Sets the image(s) used by the projector light.
pmap | The map to use. |
Reimplemented in GenLight, MSPluginLight, and MSLightXtnd.
{}
virtual void UpdateTargDistance | ( | TimeValue | t, |
INode * | inode | ||
) | [inline, virtual] |
Updates the display of the light's target distance in the light's rollup page.
t | The time to retrieve the distance. |
inode | The light node. |
Reimplemented in LightscapeLight, MSPluginLight, and MSLightXtnd.
{}