IlluminateComponents Class Reference

IlluminateComponents Class Reference

#include <object.h>

Class Description

Provides the components of the Illuminate function to Shaders, Materials and Render Elements.

The interface to lights to return the illumination as a set of components. This interface separates the illumination into various components as well as the final result.

+ Inheritance diagram for IlluminateComponents:

Public Member Functions

 IlluminateComponents ()
 
CoreExport ~IlluminateComponents ()
 
int nUserIllumChannels ()
 
const MCHARGetUserIllumName (int n)
 Returns the name of the index in channels name array. More...
 
CoreExport int FindUserIllumName (const MCHAR *name)
 Returns the index associated with a name. More...
 
void SetUserIllumOutput (int n, Color &out)
 Set the output illumination color to indexed channel. More...
 
Color GetUserIllumOutput (int n)
 Get the output illumination color of indexed channel. More...
 
void Reset ()
 It sets to black all the output colors. More...
 
- Public Member Functions inherited from BaseInterfaceServer
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual UtilExport int NumInterfaces () const
 
virtual UtilExport BaseInterfaceGetInterfaceAt (int i) const
 
virtual UtilExport ~BaseInterfaceServer ()
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Public Attributes

Point3 L
 Light Vector. More...
 
float NL
 N dot L, N and L are normalized. More...
 
float geometricAtten
 The contrast applied to N.L... More...
 
float shapeAtten
 attenuation fraction due to cone(s) or rect falloff More...
 
float distanceAtten
 Attenuation due to distance falloff. More...
 
float shadowAtten
 The composite attenuation due to all shadowing objects transparent objects may supply some shadowAtten as well as filterAtten. More...
 
float ambientAtten
 light control over ambitient shading components. More...
 
float diffuseAtten
 light control over diffuse shading components. More...
 
float specularAtten
 light control over specular shading components. More...
 
Color rawColor
 Raw light color or mixed with light map value, unattenuated by shape, distance, or shadow. More...
 
Color filteredColor
 Light color modulated by map value, then filtered by a transparent object, raw color * filterAtten, otherwise unattenuated. More...
 
Color shadowColor
 Shadow color, attenuated by shape, distance and shadow fraction. More...
 
Color lightAmbientColor
 Ambient color due to light, attenuated, without shadow color. More...
 
Color lightDiffuseColor
 Diffuse color due to light, attenuated, without shadow color. More...
 
Color lightSpecularColor
 Specular color due to light, attenuated, without shadow color. More...
 
Color finalColor
 Equivalent to 4.0 final illumination color, with and without shadows. More...
 
Color finalColorNS
 Equivalent to finalColor, but with no shadow attenuation applied and no shadow. More...
 
int nUserIllumOut
 The number of user illumination channels, returned by nUserIllumChannels() More...
 
const MCHAR ** userIllumNames
 Pointer to shared name array, never destroyed. More...
 
ColoruserIllumOut
 The user illumination color array, created and deleted with the class. More...
 

Additional Inherited Members

- 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...
 
- Protected Attributes inherited from BaseInterfaceServer
Tab< BaseInterface * > interfaces
 

Constructor & Destructor Documentation

#define NULL
Definition: autoptr.h:20
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3093
Color * userIllumOut
The user illumination color array, created and deleted with the class.
Definition: object.h:3097
const MCHAR ** userIllumNames
Pointer to shared name array, never destroyed.
Definition: object.h:3095

Member Function Documentation

int nUserIllumChannels ( )
inline
Returns
Number of user illumination channels for material
3107 { return nUserIllumOut; }
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3093
const MCHAR* GetUserIllumName ( int  n)
inline

Returns the name of the index in channels name array.

Parameters
nThe element in the userIllumNames array
Returns
The name of the user channel, NULL if no name specified
3113  {
3114  DbgAssert( n < nUserIllumOut );
3115  if( userIllumNames )
3116  return userIllumNames[n];
3117  return NULL;
3118  }
#define NULL
Definition: autoptr.h:20
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3093
#define DbgAssert(expr)
Definition: assert1.h:74
const MCHAR ** userIllumNames
Pointer to shared name array, never destroyed.
Definition: object.h:3095
CoreExport int FindUserIllumName ( const MCHAR name)

Returns the index associated with a name.

Parameters
nameThe channel name in the userIllumNames array
Returns
The index of the user channel, -1 if name no found
void SetUserIllumOutput ( int  n,
Color out 
)
inline

Set the output illumination color to indexed channel.

Parameters
nThe channel index in the userIllumOut array
outThe illumination color to set
3132  {
3133  DbgAssert( n < nUserIllumOut );
3134  userIllumOut[n] = out;
3135  }
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3093
#define DbgAssert(expr)
Definition: assert1.h:74
Color * userIllumOut
The user illumination color array, created and deleted with the class.
Definition: object.h:3097
Color GetUserIllumOutput ( int  n)
inline

Get the output illumination color of indexed channel.

Parameters
nThe channel index in the userIllumOut array
Returns
The illumination color to get
3141  {
3142  DbgAssert( n < nUserIllumOut );
3143  return userIllumOut[n];
3144  }
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3093
#define DbgAssert(expr)
Definition: assert1.h:74
Color * userIllumOut
The user illumination color array, created and deleted with the class.
Definition: object.h:3097
void Reset ( )
inline

It sets to black all the output colors.

3147  {
3150  rawColor.Black();
3151  filteredColor.Black();
3155  shadowColor.Black();
3156  finalColor.Black();
3157  finalColorNS.Black();
3158  L = Point3( 0,0,0 );
3159  if(nUserIllumOut>0 && userIllumOut){
3160  for(int i=0; i<nUserIllumOut; ++i )
3161  userIllumOut[i].Black();
3162  }
3163  }
Color lightSpecularColor
Specular color due to light, attenuated, without shadow color.
Definition: object.h:3077
float geometricAtten
The contrast applied to N.L...
Definition: object.h:3016
Color lightDiffuseColor
Diffuse color due to light, attenuated, without shadow color.
Definition: object.h:3075
Color filteredColor
Light color modulated by map value, then filtered by a transparent object, raw color * filterAtten...
Definition: object.h:3057
void Black()
Definition: color.h:180
Color lightAmbientColor
Ambient color due to light, attenuated, without shadow color.
Definition: object.h:3073
float diffuseAtten
light control over diffuse shading components.
Definition: object.h:3037
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3093
Definition: point3.h:50
Color finalColor
Equivalent to 4.0 final illumination color, with and without shadows.
Definition: object.h:3083
float shapeAtten
attenuation fraction due to cone(s) or rect falloff
Definition: object.h:3018
float distanceAtten
Attenuation due to distance falloff.
Definition: object.h:3020
float shadowAtten
The composite attenuation due to all shadowing objects transparent objects may supply some shadowAtte...
Definition: object.h:3028
Color finalColorNS
Equivalent to finalColor, but with no shadow attenuation applied and no shadow.
Definition: object.h:3089
Point3 L
Light Vector.
Definition: object.h:3009
float NL
N dot L, N and L are normalized.
Definition: object.h:3011
Color shadowColor
Shadow color, attenuated by shape, distance and shadow fraction.
Definition: object.h:3062
float specularAtten
light control over specular shading components.
Definition: object.h:3040
Color * userIllumOut
The user illumination color array, created and deleted with the class.
Definition: object.h:3097
float ambientAtten
light control over ambitient shading components.
Definition: object.h:3034
Color rawColor
Raw light color or mixed with light map value, unattenuated by shape, distance, or shadow...
Definition: object.h:3050

Member Data Documentation

Point3 L

Light Vector.

float NL

N dot L, N and L are normalized.

float geometricAtten

The contrast applied to N.L...

this is equivalent to the diffCoef returned by standard illuminate

float shapeAtten

attenuation fraction due to cone(s) or rect falloff

float distanceAtten

Attenuation due to distance falloff.

float shadowAtten

The composite attenuation due to all shadowing objects transparent objects may supply some shadowAtten as well as filterAtten.

0 for all shadow, 1 for all light. light control over basic shading components

float ambientAtten

light control over ambitient shading components.

0 = no ambient, 1 = all ambient

float diffuseAtten

light control over diffuse shading components.

0 = no diffuse, 1 = all diffuse

float specularAtten

light control over specular shading components.

0 = no specular, 1 = all specular

Color rawColor

Raw light color or mixed with light map value, unattenuated by shape, distance, or shadow.

Color filteredColor

Light color modulated by map value, then filtered by a transparent object, raw color * filterAtten, otherwise unattenuated.

Color shadowColor

Shadow color, attenuated by shape, distance and shadow fraction.

Color lightAmbientColor

Ambient color due to light, attenuated, without shadow color.

Color lightDiffuseColor

Diffuse color due to light, attenuated, without shadow color.

Color lightSpecularColor

Specular color due to light, attenuated, without shadow color.

Color finalColor

Equivalent to 4.0 final illumination color, with and without shadows.

Color finalColorNS

Equivalent to finalColor, but with no shadow attenuation applied and no shadow.

int nUserIllumOut

The number of user illumination channels, returned by nUserIllumChannels()

const MCHAR** userIllumNames

Pointer to shared name array, never destroyed.

Color* userIllumOut

The user illumination color array, created and deleted with the class.