SpecularShaderHelper< ShaderParameters > Class Template Reference

#include <adskShader.h>

Inheritance diagram for SpecularShaderHelper< ShaderParameters >:

Inheritance graph
[legend]
Collaboration diagram for SpecularShaderHelper< ShaderParameters >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename ShaderParameters>
class SpecularShaderHelper< ShaderParameters >

Specular shader helper class.

This class extends LambertianShaderHelper to provide additional functionality for specular materials.

Template Parameters:
ShaderParameters The shader parameter structure.

Public Member Functions

 SpecularShaderHelper (miState *pState, ShaderParameters *pParameters)
 Constructor for lambertian shader helper.
 ~SpecularShaderHelper ()
 Deconstructor for lambertian shader helper.
void evaluateParameters ()
 Evaluates shader parameters necessary for later computations.
void setASQWeight (MayabaseState *&MBS, BRDFComponent &bc, const miColor &pColor, const miColor &pTransparency, miScalar &pGlowIntensity) const
 Set the ASQ weight for this shader call.
float computeSpecularAreaLightFactor (miVector &pBumpNormal, void *pLightBlindData)
 Computes the specular factor for area lights.
miColor getReflectedColor () const
 Return the reflected color for this shader.

Public Attributes

miColor specularColor
miColor reflectedColor

Constructor & Destructor Documentation

template<typename ShaderParameters>
SpecularShaderHelper< ShaderParameters >::SpecularShaderHelper ( miState *  pState,
ShaderParameters *  pParameters 
) [inline]

Constructor for lambertian shader helper.

This will be called once per evaluation of the main shading function for the shader. This stores the state and the parameters for use in various functions.

Parameters:
[in,out] pState A pointer to the mental ray state structure.
[in] pParameters A pointer to the shader parameters.

template<typename ShaderParameters>
SpecularShaderHelper< ShaderParameters >::~SpecularShaderHelper (  )  [inline]

Deconstructor for lambertian shader helper.

This will be called once per evaluation of the main shading function for the shader.


Member Function Documentation

template<typename ShaderParameters>
void SpecularShaderHelper< ShaderParameters >::evaluateParameters (  )  [inline]

Evaluates shader parameters necessary for later computations.

This function is called after other initialization to give the helper a chance to evaluate any parameters necessary for later computations.

Reimplemented from LambertianShaderHelper< ShaderParameters >.

template<typename ShaderParameters>
void SpecularShaderHelper< ShaderParameters >::setASQWeight ( MayabaseState *&  MBS,
BRDFComponent &  bc,
const miColor &  pColor,
const miColor &  pTransparency,
miScalar &  pGlowIntensity 
) const [inline]

Set the ASQ weight for this shader call.

This function adjusts the ASQ weight according to the light loop's impact on the final shader result.

Parameters:
[in,out] MBS The current Maya state.
[in] bc BRDF component information.
[in] pColor The diffuse color for the shader.
[in] pTransparency The transparency for the shader.
[in] pGlowIntensity The glow intensity for the shader.

Reimplemented from LambertianShaderHelper< ShaderParameters >.

template<typename ShaderParameters>
float SpecularShaderHelper< ShaderParameters >::computeSpecularAreaLightFactor ( miVector &  pBumpNormal,
void *  pLightBlindData 
) [inline]

Computes the specular factor for area lights.

This function computes the specular factor for area lights.

Parameters:
[in] pBumpNormal The normal after bump adjustments.
[in] pLightBlindData Custom light shader data.
Returns:
The specular factor for area lights.

template<typename ShaderParameters>
miColor SpecularShaderHelper< ShaderParameters >::getReflectedColor (  )  const [inline]

Return the reflected color for this shader.

Return the reflected color for this shader.

Returns:
The reflected color for this shader.

Reimplemented from LambertianShaderHelper< ShaderParameters >.


Member Data Documentation

template<typename ShaderParameters>
miColor SpecularShaderHelper< ShaderParameters >::specularColor

The specular color for the material.

template<typename ShaderParameters>
miColor SpecularShaderHelper< ShaderParameters >::reflectedColor

The reflected color for the material.


Autodesk® Maya® 2012 © 2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6