Public Member Functions | Public Attributes

IlluminateComponents Class Reference

Search for all occurrences

Detailed 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.

#include <object.h>

Inheritance diagram for IlluminateComponents:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  IlluminateComponents ()
CoreExport  ~IlluminateComponents ()
int  nUserIllumChannels ()
MCHAR *  GetUserIllumName (int n)
  Returns the name of the index in channels name array.
CoreExport int  FindUserIllumName (MCHAR *name)
  Returns the index associated with a name.
void  SetUserIllumOutput (int n, Color &out)
  Set the output illumination color to indexed channel.
Color  GetUserIllumOutput (int n)
  Get the output illumination color of indexed channel.
void  Reset ()
  It sets to black all the output colors.

Public Attributes

Point3  L
  Light Vector.
float  NL
  N dot L, N and L are normalized.
float  geometricAtten
  The contrast applied to N.L...
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.
float  ambientAtten
  light control over ambitient shading components.
float  diffuseAtten
  light control over diffuse shading components.
float  specularAtten
  light control over specular shading components.
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()
MCHAR **  userIllumNames
  Pointer to shared name array, never destroyed.
Color userIllumOut
  The user illumination color array, created and deleted with the class.

Constructor & Destructor Documentation

IlluminateComponents ( ) [inline]
CoreExport ~IlluminateComponents ( )

Member Function Documentation

int nUserIllumChannels ( ) [inline]
Returns:
Number of user illumination channels for material
{ return nUserIllumOut; }
MCHAR* GetUserIllumName ( int  n ) [inline]

Returns the name of the index in channels name array.

Parameters:
n The element in the userIllumNames array
Returns:
The name of the user channel, NULL if no name specified
                                     { 
        DbgAssert( n < nUserIllumOut );
        if( userIllumNames )
            return userIllumNames[n];
        return NULL;
    }
CoreExport int FindUserIllumName ( MCHAR *  name )

Returns the index associated with a name.

Parameters:
name The 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:
n The channel index in the userIllumOut array
out The illumination color to set
                                                {
        DbgAssert( n < nUserIllumOut );
        userIllumOut[n] = out;
    }
Color GetUserIllumOutput ( int  n ) [inline]

Get the output illumination color of indexed channel.

Parameters:
n The channel index in the userIllumOut array
Returns:
The illumination color to get
                                     {
        DbgAssert( n < nUserIllumOut );
        return userIllumOut[n];
    }
void Reset ( ) [inline]

Member Data Documentation

float NL

N dot L, N and L are normalized.

The contrast applied to N.L...

this is equivalent to the diffCoef returned by standard illuminate

attenuation fraction due to cone(s) or rect falloff

Attenuation due to distance falloff.

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

light control over ambitient shading components.

0 = no ambient, 1 = all ambient

light control over diffuse shading components.

0 = no diffuse, 1 = all diffuse

light control over specular shading components.

0 = no specular, 1 = all specular

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

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

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

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

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

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

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

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

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

Pointer to shared name array, never destroyed.

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


IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents
IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents IlluminateComponents