IMrSkyPortalLight Class Reference

IMrSkyPortalLight Class Referenceabstract

#include <imrSkyPortalLight.h>

Class Description

Access interface for the Mental Ray Sky Portal.

This class represents the Mental Ray Sky Portal object, implemented by 3ds Max. For more information on the Sky Portal object see the 3ds Max User Guide. SDK client code can access this interface by querying a 3d Max light object for this interface:

Object* obj = // obtain a pointer to an object
IMrSkyPortalLight* mrSkyPortal = dynamic_cast<IMrSkyPortalLight*>(bi);
+ Inheritance diagram for IMrSkyPortalLight:

Public Member Functions

virtual Interface_ID GetID ()
 Returns the Interface ID of this interface. More...
 
virtual ~IMrSkyPortalLight ()
 A virtual destructor for the interface. More...
 
Multiplier

The multiplier for the value of the sky portal's output.

virtual float GetMultiplier (const TimeValue t, Interval &valid) const =0
 Gets the value of the multiplier for the sky portal's output. More...
 
virtual bool SetMultiplier (const TimeValue t, float multiplier)=0
 Sets the value of the multiplier for the sky portal's output. More...
 
Filter Color

Tints the coloring of the light going through a sky portal

virtual AColor GetFilterColor (const TimeValue t, Interval &valid) const =0
 Gets the filter color of the sky portal. More...
 
virtual bool SetFilterColor (const TimeValue t, const AColor &color)=0
 Sets the filter color of the sky portal. More...
 
Shadow Casting
virtual bool GetCastShadowsFromOutdoors () const =0
 Methods for accessing shadow casting related parameters For basic shadow casting related functionality see class LightObject. More...
 
virtual bool SetCastShadowsFromOutdoors (bool bEnable)=0
 Sets whether shadows are casts from objects that are "outdoors" or "outside" of the sky portal object. More...
 
Shadow Samples
virtual int GetShadowSamples (const TimeValue t, Interval &valid) const =0
 Affects the quality of the shadows cast by the light portal. More...
 
virtual bool SetShadowSamples (const TimeValue t, int shadowSamples)=0
 Sets the number of shadow samples. More...
 
Dimensions

The length and the width of the sky portal.

virtual float GetLength (const TimeValue t, Interval &valid) const =0
 Gets the length of the sky portal. More...
 
virtual bool SetLength (const TimeValue t, float length)=0
 Sets the length of the sky portal. More...
 
virtual float GetWidth (const TimeValue t, Interval &valid) const =0
 Gets the width of the sky portal. More...
 
virtual bool SetWidth (const TimeValue t, float width)=0
 Sets the width of the sky portal. More...
 
Visibility in renderings
virtual bool GetVisibleInRendering (const TimeValue t, Interval &valid) const =0
 Allows for specifying whether the sky portal is visible in renderings or not. More...
 
virtual bool SetVisibleInRenderin (const TimeValue t, bool visible)=0
 Sets whether the sky portal appears in rendering. More...
 
Transparency
virtual AColor GetTransparencyColor (const TimeValue t, Interval &valid) const =0
 Transparency Filters the view outside the window Changing this color does not change the light coming in, but has the effect of darkening outside objects, which can help if they are overexposed. More...
 
virtual bool SetTransparencyColor (const TimeValue t, const AColor &color)=0
 Sets the transparency color of the sky portal. More...
 
Custom Illumination Color

A map can be used to specify a custom illumination color for the sky portal

virtual TexmapGetIlluminationMap () const =0
 Gets the current map used to supply the illumination color. More...
 
virtual bool SetIlluminationMap (Texmap *illumColorMap)=0
 Sets the map used for supplying the illumination color. More...
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual LifetimeType LifetimeControl ()
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Light Flux Direction

enum  LightFluxDirection { kOutdoorToIndoor = 0, kIndoorToOutdoor = 1, kLastDir }
 Light Flux Direction Determines the direction in which light flows through the portal. More...
 
virtual LightFluxDirection GetLightFluxDirection () const =0
 Gets the light flux direction through the sky portal. More...
 
virtual bool SetLightFluxDirection (LightFluxDirection dir)=0
 Sets the light flux direction through the sky portal. More...
 

Illumination Color

The sky portal can derive its illumination color from different sources.

enum  IlluminationColorSource { kSceneEnvironmentColor, kCustomMapColor, kSkylightColor, kLastColorSource }
 The possible sources of illumination color used by a sky portal. More...
 
virtual IlluminationColorSource GetIllumColorSource () const =0
 Gets the illumination color source used by the sky portal. More...
 
virtual bool SetIllumColorSource (IlluminationColorSource source)=0
 Sets the illumination color source used by the sky portal. More...
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Member Enumeration Documentation

Light Flux Direction Determines the direction in which light flows through the portal.

The sky portal has two sides that can either correspond to the "indoor" or "outdoor" sides of the scene. The possible directions of the light flux through the sky portal

Enumerator
kOutdoorToIndoor 

Light flows from the "outdoor" towards "indoor" side of the sky portal.

kIndoorToOutdoor 

Light flows from the "indoor" towards "outdoor" side of the sky portal.

kLastDir 
169  {
171  kOutdoorToIndoor = 0,
173  kIndoorToOutdoor = 1,
174  kLastDir,
175  };
Light flows from the "indoor" towards "outdoor" side of the sky portal.
Definition: imrSkyPortalLight.h:173
Definition: imrSkyPortalLight.h:174
Light flows from the "outdoor" towards "indoor" side of the sky portal.
Definition: imrSkyPortalLight.h:171

The possible sources of illumination color used by a sky portal.

Enumerator
kSceneEnvironmentColor 

Uses the current scene environment map.

This allows the outdoor to be illuminated with a different color than the indoor.

kCustomMapColor 

Use a texture map for the illumination coloring.

See IMrSkyPortalLight::setIlluminationMap

kSkylightColor 

Uses the existent skylight in the scene.

kLastColorSource 
236  {
246  };
Uses the existent skylight in the scene.
Definition: imrSkyPortalLight.h:244
Uses the current scene environment map.
Definition: imrSkyPortalLight.h:239
Definition: imrSkyPortalLight.h:245
Use a texture map for the illumination coloring.
Definition: imrSkyPortalLight.h:242

Constructor & Destructor Documentation

virtual ~IMrSkyPortalLight ( )
inlinevirtual

A virtual destructor for the interface.

43 {};

Member Function Documentation

virtual Interface_ID GetID ( )
inlinevirtual

Returns the Interface ID of this interface.

Reimplemented from BaseInterface.

40 { return IID_MR_SKY_PORTAL_LIGHT; };
#define IID_MR_SKY_PORTAL_LIGHT
Definition: imrSkyPortalLight.h:22
virtual float GetMultiplier ( const TimeValue  t,
Interval valid 
) const
pure virtual

Gets the value of the multiplier for the sky portal's output.

Parameters
[in]t- The time at which the multiplier's value is retrieved
[in]valid- The time interval for which the multiplier value is valid *
Returns
The value of the multiplier
virtual bool SetMultiplier ( const TimeValue  t,
float  multiplier 
)
pure virtual

Sets the value of the multiplier for the sky portal's output.

Parameters
[in]t- The time at which the multiplier value is set
[in]multiplier- The new value of multiplier
Returns
true if the new value has been set successfully
virtual AColor GetFilterColor ( const TimeValue  t,
Interval valid 
) const
pure virtual

Gets the filter color of the sky portal.

Parameters
[in]t- The time at which the color is retrieved
[in,out]valid- The time interval for which the color value is valid
Returns
The value of the filter color
virtual bool SetFilterColor ( const TimeValue  t,
const AColor color 
)
pure virtual

Sets the filter color of the sky portal.

Parameters
[in]t- The time at which the color is set
[in]color- The new color value
Returns
true if setting the new color was successful, false otherwise
virtual bool GetCastShadowsFromOutdoors ( ) const
pure virtual

Methods for accessing shadow casting related parameters For basic shadow casting related functionality see class LightObject.

Gets whether shadows are casts from objects that are "outdoors" or "outside" of the sky portal object.

The "outside" represents the side that is away from the sky portal's arrow icon.

Returns
True if the sky portal casts shadows from "outdoor, false otherwise
virtual bool SetCastShadowsFromOutdoors ( bool  bEnable)
pure virtual

Sets whether shadows are casts from objects that are "outdoors" or "outside" of the sky portal object.

The "outside" represents the side that is away from the sky portal's arrow icon. Note that turning this option on can significantly increase render times.

Parameters
[in]bEnable- The new parameter value
Returns
true if setting the new parameter value was successful, false otherwise
virtual int GetShadowSamples ( const TimeValue  t,
Interval valid 
) const
pure virtual

Affects the quality of the shadows cast by the light portal.

Increase the value of this parameter if the shadows are grainy

Gets the number of shadow samples.

Parameters
[in]t- The time at which the parameter is retrieved
[in,out]valid- The time interval for which the parameter value is valid
Returns
The number of samples being used for shadows, as an exponent of 2. For example, if this method returns 10, the actual number of shadow samples used is 2 at the power of 10 = 1024.
virtual bool SetShadowSamples ( const TimeValue  t,
int  shadowSamples 
)
pure virtual

Sets the number of shadow samples.

Parameters
[in]t- The time at which the parameter is set
[in]shadowSamples- The new parameter value. 2 raised to the power of this value represents the actual number of shadow samples. Must be a value within [1, 10]. For example, if 10 is set via this method, the actual number of shadow samples will be 1024.
Returns
true if setting the new parameter value was successful, false otherwise
virtual float GetLength ( const TimeValue  t,
Interval valid 
) const
pure virtual

Gets the length of the sky portal.

Parameters
[in]t- The time at which the parameter is retrieved
[in,out]valid- The time interval for which the parameter value is valid
Returns
The length of the sky portal
virtual bool SetLength ( const TimeValue  t,
float  length 
)
pure virtual

Sets the length of the sky portal.

Parameters
[in]t- The time at which the parameter is set
[in]length- The new parameter value. Must be a positive floating point value
Returns
true if setting the new parameter value was successful, false otherwise
virtual float GetWidth ( const TimeValue  t,
Interval valid 
) const
pure virtual

Gets the width of the sky portal.

Parameters
[in]t- The time at which the parameter is retrieved
[in,out]valid- The time interval for which the parameter value is valid
Returns
The width of the sky portal
virtual bool SetWidth ( const TimeValue  t,
float  width 
)
pure virtual

Sets the width of the sky portal.

Parameters
[in]t- The time at which the parameter is set
[in]width- The new parameter value. Must be a positive floating point value
Returns
true if setting the new parameter value was successful, false otherwise
virtual LightFluxDirection GetLightFluxDirection ( ) const
pure virtual

Gets the light flux direction through the sky portal.

Returns
The light flux direction through the sky portal
virtual bool SetLightFluxDirection ( LightFluxDirection  dir)
pure virtual

Sets the light flux direction through the sky portal.

Parameters
[in]dir- The new direction value
Returns
true if setting the new parameter value was successful, false otherwise
virtual bool GetVisibleInRendering ( const TimeValue  t,
Interval valid 
) const
pure virtual

Allows for specifying whether the sky portal is visible in renderings or not.

When the sky portal appears in renderings, objects that are on the "indoors" side of the sky portal do not appear in the rendering.

Gets whether the sky portal appears in rendering

Parameters
[in]t- The time at which the parameter is retrieved
[in,out]valid- The time interval for which the parameter value is valid
Returns
true if the sky portal appears in rendering, false otherwise
virtual bool SetVisibleInRenderin ( const TimeValue  t,
bool  visible 
)
pure virtual

Sets whether the sky portal appears in rendering.

Parameters
[in]t- The time at which the parameter is set
[in]visible- The new parameter value.
Returns
true if setting the new parameter value was successful, false otherwise
virtual AColor GetTransparencyColor ( const TimeValue  t,
Interval valid 
) const
pure virtual

Transparency Filters the view outside the window Changing this color does not change the light coming in, but has the effect of darkening outside objects, which can help if they are overexposed.

To avoid recoloring the outside view, use a shade of gray, such as R=G=B=0.5.

Gets the transparency color of the sky portal

Parameters
[in]t- The time at which the parameter is retrieved
[in,out]valid- The time interval for which the parameter is valid
Returns
The value of the transparency color
virtual bool SetTransparencyColor ( const TimeValue  t,
const AColor color 
)
pure virtual

Sets the transparency color of the sky portal.

Parameters
[in]t- The time at which the parameter is set
[in]color- The new parameter value
Returns
true if setting the new color was successful, false otherwise
virtual IlluminationColorSource GetIllumColorSource ( ) const
pure virtual

Gets the illumination color source used by the sky portal.

Returns
The illumination color source used by the sky portal
virtual bool SetIllumColorSource ( IlluminationColorSource  source)
pure virtual

Sets the illumination color source used by the sky portal.

Parameters
[in]source- The new parameter value
Returns
true if setting the new parameter value was successful, false otherwise
virtual Texmap* GetIlluminationMap ( ) const
pure virtual

Gets the current map used to supply the illumination color.

Returns
A pointer to a texture map that supplies the illumination color
virtual bool SetIlluminationMap ( Texmap illumColorMap)
pure virtual

Sets the map used for supplying the illumination color.

Parameters
[in]illumColorMap- A pointer to a texture map that supplies the illumination color. To set no map, set this parameter to NULL.
Returns
true if the setting was successful