3ds Max C++ API Reference
IRadiosityEffectExtension Class Referenceabstract

#include <radiosity.h>

+ Inheritance diagram for IRadiosityEffectExtension:

Public Member Functions

virtual bool UseDefaultLight (const DefaultLight &defLight, bool recalcSolution=false) const =0
 Returns whether the specified default light should be used by the scanline renderer. More...
 
virtual bool IsInterestedInChannels (PartID part) const
 Returns whether the the radiosity plugin is interested in any of the channels in the part id. More...
 
virtual Interface_ID GetID ()
 This returns the ID of the interface. More...
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
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=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

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...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

See also
: Class RadiosityEffect

Description:
This class is only available in release 5 or later.

This class provides additional functionality for class RadiosityEffect. To use this functionality with a RadiosityEffect class, derive the class from both RadiosityEffect and IRadiosityEffectExtension, and implement RadiosityEffect::GetInterface() to return a pointer to this interface on request.

Given an instance of RadiosityEffect, you may retrieve the extension interface as follows:

IRadiosityEffectExtension* r = static_cast<IRadiosityEffectExtension*>(radiosityInstance->GetInterface(IRADIOSITYEFFECT_EXTENSION_INTERFACE));

If the result is NULL, the RadiosityEffect does not support this interface.

All methods of this class are virtual.


Member Function Documentation

◆ UseDefaultLight()

virtual bool UseDefaultLight ( const DefaultLight defLight,
bool  recalcSolution = false 
) const
pure virtual

Returns whether the specified default light should be used by the scanline renderer.

The scanline renderer normally creates default lights when there are no lights in the scene. A radiosity plug-in could override this if it uses objects other than lights as light sources (e.g. self-emitting surfaces)

Parameters
defLight- A default light created by the scanline renderer when it begins rendering.
recalcSolution- Indicates whether the solution will be re-calculated (ie, there is a glowing object that will create the solution).
Returns
Returns whether or not the scanline renderer should use the light for the current rendering.

◆ IsInterestedInChannels()

virtual bool IsInterestedInChannels ( PartID  part) const
inlinevirtual

Returns whether the the radiosity plugin is interested in any of the channels in the part id.

This is used to control reference messages sent to the RadiosityEffect plug-in. It allows the RadiosityEffect to tell the system which messages will not invalidate the lighting solution.

If the RadiosityEffect decides that all messages of a given PartID are irrelevant to the lighting solution, it can return false when that PartID flag is present in the input parameter (and no other, more relevant, PartID flags are present). Otherwise it should return true, indicating it needs those messages.

If the return value is false, the system will add the PartID flag PART_EXCLUDE_RADIOSITY to all appropriate reference messages; this flag generically indicates an event which should not invalidate a radiosity solution. The RadiosityEffect will still receive the message but can ignore it. Other modules which need to discriminate messages pertinent radiosity, can also check this flag.

As an example of when this is important, an edit mesh modifier may send change messages which are meant to flush internal caches but not relevant to radiosity. As the message propagates, some PartID flags are added in order to force modifiers to re-evaluate downstream in the stack. This may confuse the radiosity engine into invalidating its lighting solution. But the edit mesh ensures the original message bears the PART_EXCLUDE_RADIOSITY flag, and as subsequent messages inherit the flag, the RadiosityEffect can correctly ignore the message.

Parameters
part- One or more PartID flags defining the category of messages to be filtered.
Returns
Whether or not to filter the given messages, by setting their PART_EXCLUDE_RADIOSITY PartID flag.
391 { return true; }

◆ GetID()

virtual Interface_ID GetID ( )
inlinevirtual

This returns the ID of the interface.

this should not be overridden by an implementation class.

Returns
The IRadiosityEffectExtension interface ID, IRADIOSITYEFFECT_EXTENSION_INTERFACE.

Reimplemented from BaseInterface.

#define IRADIOSITYEFFECT_EXTENSION_INTERFACE
Definition: radiosity.h:333