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

3136  geometricAtten(0.0f), distanceAtten(0.0f), shadowAtten(0.0f), shapeAtten(0.0f), specularAtten(0.0f),
3137  NL(0.0f), ambientAtten(0.0f) {}
float geometricAtten
The contrast applied to N.L...
Definition: object.h:3052
#define NULL
Definition: autoptr.h:18
float diffuseAtten
light control over diffuse shading components.
Definition: object.h:3073
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3129
float shapeAtten
attenuation fraction due to cone(s) or rect falloff
Definition: object.h:3054
float distanceAtten
Attenuation due to distance falloff.
Definition: object.h:3056
float shadowAtten
The composite attenuation due to all shadowing objects transparent objects may supply some shadowAtte...
Definition: object.h:3064
float NL
N dot L, N and L are normalized.
Definition: object.h:3047
float specularAtten
light control over specular shading components.
Definition: object.h:3076
Color * userIllumOut
The user illumination color array, created and deleted with the class.
Definition: object.h:3133
const MCHAR ** userIllumNames
Pointer to shared name array, never destroyed.
Definition: object.h:3131
float ambientAtten
light control over ambitient shading components.
Definition: object.h:3070

Member Function Documentation

int nUserIllumChannels ( )
inline
Returns
Number of user illumination channels for material
3145 { return nUserIllumOut; }
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3129
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
3151  {
3152  DbgAssert( n < nUserIllumOut );
3153  if( userIllumNames )
3154  return userIllumNames[n];
3155  return NULL;
3156  }
#define NULL
Definition: autoptr.h:18
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3129
#define DbgAssert(expr)
Definition: assert1.h:72
const MCHAR ** userIllumNames
Pointer to shared name array, never destroyed.
Definition: object.h:3131
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
3170  {
3171  DbgAssert( n < nUserIllumOut );
3172  userIllumOut[n] = out;
3173  }
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3129
#define DbgAssert(expr)
Definition: assert1.h:72
Color * userIllumOut
The user illumination color array, created and deleted with the class.
Definition: object.h:3133
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
3179  {
3180  DbgAssert( n < nUserIllumOut );
3181  return userIllumOut[n];
3182  }
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3129
#define DbgAssert(expr)
Definition: assert1.h:72
Color * userIllumOut
The user illumination color array, created and deleted with the class.
Definition: object.h:3133
void Reset ( )
inline

It sets to black all the output colors.

3185  {
3188  rawColor.Black();
3189  filteredColor.Black();
3193  shadowColor.Black();
3194  finalColor.Black();
3195  finalColorNS.Black();
3196  L = Point3( 0,0,0 );
3197  if(nUserIllumOut>0 && userIllumOut){
3198  for(int i=0; i<nUserIllumOut; ++i )
3199  userIllumOut[i].Black();
3200  }
3201  }
Color lightSpecularColor
Specular color due to light, attenuated, without shadow color.
Definition: object.h:3113
float geometricAtten
The contrast applied to N.L...
Definition: object.h:3052
Color lightDiffuseColor
Diffuse color due to light, attenuated, without shadow color.
Definition: object.h:3111
Color filteredColor
Light color modulated by map value, then filtered by a transparent object, raw color * filterAtten...
Definition: object.h:3093
void Black()
Definition: color.h:180
Color lightAmbientColor
Ambient color due to light, attenuated, without shadow color.
Definition: object.h:3109
float diffuseAtten
light control over diffuse shading components.
Definition: object.h:3073
int nUserIllumOut
The number of user illumination channels, returned by nUserIllumChannels()
Definition: object.h:3129
Definition: point3.h:51
Color finalColor
Equivalent to 4.0 final illumination color, with and without shadows.
Definition: object.h:3119
float shapeAtten
attenuation fraction due to cone(s) or rect falloff
Definition: object.h:3054
float distanceAtten
Attenuation due to distance falloff.
Definition: object.h:3056
float shadowAtten
The composite attenuation due to all shadowing objects transparent objects may supply some shadowAtte...
Definition: object.h:3064
Color finalColorNS
Equivalent to finalColor, but with no shadow attenuation applied and no shadow.
Definition: object.h:3125
Point3 L
Light Vector.
Definition: object.h:3045
float NL
N dot L, N and L are normalized.
Definition: object.h:3047
Color shadowColor
Shadow color, attenuated by shape, distance and shadow fraction.
Definition: object.h:3098
float specularAtten
light control over specular shading components.
Definition: object.h:3076
Color * userIllumOut
The user illumination color array, created and deleted with the class.
Definition: object.h:3133
float ambientAtten
light control over ambitient shading components.
Definition: object.h:3070
Color rawColor
Raw light color or mixed with light map value, unattenuated by shape, distance, or shadow...
Definition: object.h:3086

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.