Public Member Functions

IRadiosityEffectExtension Class Reference

Search for all occurrences

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.

#include <radiosity.h>

Inheritance diagram for IRadiosityEffectExtension:
Inheritance graph
[legend]

List of all members.

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.
virtual bool  IsInterestedInChannels (PartID part) const
  Returns whether the the radiosity plugin is interested in any of the channels in the part id.
virtual Interface_ID  GetID ()
  This returns the ID of the interface.

Member Function Documentation

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.
Returns:
Returns whether or not the scanline renderer should use the light for the current rendering.
virtual bool IsInterestedInChannels ( PartID  part ) const [inline, virtual]

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.
{ return true; }
virtual Interface_ID GetID ( ) [inline, virtual]

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.

{ return IRADIOSITYEFFECT_EXTENSION_INTERFACE; }

IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension
IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension IRadiosityEffectExtension