Surface< SurfaceParameters, SurfaceResult, ShaderHelper, AmbientMaterialColorComponent, AmbientComponent, DiffuseMaterialColorComponent, DiffuseComponent, SpecularComponent, ReflectionComponent, RefractionComponent, ScatterComponent, IndirectComponent, IncandescenceComponent, CustomComponent, VERSION > Class Template Reference

#include <adskShader.h>
Inheritance diagram for Surface< SurfaceParameters, SurfaceResult, ShaderHelper, AmbientMaterialColorComponent, AmbientComponent, DiffuseMaterialColorComponent, DiffuseComponent, SpecularComponent, ReflectionComponent, RefractionComponent, ScatterComponent, IndirectComponent, IncandescenceComponent, CustomComponent, VERSION >:
Inheritance graph
[legend]
Collaboration diagram for Surface< SurfaceParameters, SurfaceResult, ShaderHelper, AmbientMaterialColorComponent, AmbientComponent, DiffuseMaterialColorComponent, DiffuseComponent, SpecularComponent, ReflectionComponent, RefractionComponent, ScatterComponent, IndirectComponent, IncandescenceComponent, CustomComponent, VERSION >:
Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename SurfaceParameters, typename SurfaceResult, typename ShaderHelper, typename AmbientMaterialColorComponent = DefaultAmbientMaterialColorComponent<SurfaceParameters, ShaderHelper>, typename AmbientComponent = DefaultAmbientComponent<SurfaceParameters, ShaderHelper>, typename DiffuseMaterialColorComponent = DefaultDiffuseMaterialColorComponent<SurfaceParameters, ShaderHelper>, typename DiffuseComponent = DefaultDiffuseComponent<SurfaceParameters, ShaderHelper>, typename SpecularComponent = DefaultSpecularComponent<SurfaceParameters, ShaderHelper>, typename ReflectionComponent = DefaultReflectionComponent<SurfaceParameters, ShaderHelper>, typename RefractionComponent = DefaultRefractionComponent<SurfaceParameters, ShaderHelper>, typename ScatterComponent = DefaultScatterComponent<SurfaceParameters, ShaderHelper>, typename IndirectComponent = DefaultIndirectComponent<SurfaceParameters, ShaderHelper>, typename IncandescenceComponent = DefaultIncandescenceComponent<SurfaceParameters, ShaderHelper>, typename CustomComponent = DefaultCustomComponent<SurfaceParameters, SurfaceResult, ShaderHelper>, int VERSION = 1>
class Surface< SurfaceParameters, SurfaceResult, ShaderHelper, AmbientMaterialColorComponent, AmbientComponent, DiffuseMaterialColorComponent, DiffuseComponent, SpecularComponent, ReflectionComponent, RefractionComponent, ScatterComponent, IndirectComponent, IncandescenceComponent, CustomComponent, VERSION >

Surface shader class.

This class holds all data and behaviors which are specific to mental ray surface shaders. It is an extention of the Material class.

Template Parameters:
SurfaceParameters  The surface parameter structure.
SurfaceResult  The surface result structure.
ShaderHelper  The shader helper to use with this shader.
AmbientMaterialColorComponent  The ambient material color component to use with this shader.
AmbientComponent  The ambient component to use with this shader.
DiffuseMaterialColorComponent  The diffuse material color component to use with this shader.
DiffuseComponent  The diffuse component to use with this shader.
SpecularComponent  The specular component to use with this shader.
ReflectionComponent  The reflection component to use with this shader.
RefractionComponent  The refraction component to use with this shader.
ScatterComponent  The scatter component to use with this shader.
IndirectComponent  The indirect component to use with this shader.
IncandescenceComponent  The incandescence component to use with this shader.
CustomComponent  The custom component to use with this shader.
VERSION  The version of this shader. Should match the version of the shader declared in the .mi file.

Public Member Functions

  Surface (miState *pState, SurfaceParameters *pParameters)
  Surface shader constructor.
virtual  ~Surface ()
  Surface shader destructor.
miBoolean  operator() (SurfaceResult *pResult, miState *pState, SurfaceParameters *pParameters)
  Main shading function.

Public Attributes

void *  mScatterData

Constructor & Destructor Documentation

template<typename SurfaceParameters, typename SurfaceResult, typename ShaderHelper, typename AmbientMaterialColorComponent, typename AmbientComponent, typename DiffuseMaterialColorComponent, typename DiffuseComponent, typename SpecularComponent, typename ReflectionComponent, typename RefractionComponent, typename ScatterComponent, typename IndirectComponent, typename IncandescenceComponent, typename CustomComponent, int VERSION>
Surface< SurfaceParameters, SurfaceResult, ShaderHelper, AmbientMaterialColorComponent, AmbientComponent, DiffuseMaterialColorComponent, DiffuseComponent, SpecularComponent, ReflectionComponent, RefractionComponent, ScatterComponent, IndirectComponent, IncandescenceComponent, CustomComponent, VERSION >::Surface ( miState *  pState,
SurfaceParameters *  pParameters  
) [inline]

Surface shader constructor.

This will be called once per shader instance, and is where data for each shader instance should be initialized.

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

template<typename SurfaceParameters, typename SurfaceResult, typename ShaderHelper, typename AmbientMaterialColorComponent, typename AmbientComponent, typename DiffuseMaterialColorComponent, typename DiffuseComponent, typename SpecularComponent, typename ReflectionComponent, typename RefractionComponent, typename ScatterComponent, typename IndirectComponent, typename IncandescenceComponent, typename CustomComponent, int VERSION>
Surface< SurfaceParameters, SurfaceResult, ShaderHelper, AmbientMaterialColorComponent, AmbientComponent, DiffuseMaterialColorComponent, DiffuseComponent, SpecularComponent, ReflectionComponent, RefractionComponent, ScatterComponent, IndirectComponent, IncandescenceComponent, CustomComponent, VERSION >::~Surface (  )  [inline, virtual]

Surface shader destructor.

The member variables mDestructorState and mDestructorParameters will be set correctly when the destructor is called.


Member Function Documentation

template<typename SurfaceParameters, typename SurfaceResult, typename ShaderHelper, typename AmbientMaterialColorComponent, typename AmbientComponent, typename DiffuseMaterialColorComponent, typename DiffuseComponent, typename SpecularComponent, typename ReflectionComponent, typename RefractionComponent, typename ScatterComponent, typename IndirectComponent, typename IncandescenceComponent, typename CustomComponent, int VERSION>
miBoolean Surface< SurfaceParameters, SurfaceResult, ShaderHelper, AmbientMaterialColorComponent, AmbientComponent, DiffuseMaterialColorComponent, DiffuseComponent, SpecularComponent, ReflectionComponent, RefractionComponent, ScatterComponent, IndirectComponent, IncandescenceComponent, CustomComponent, VERSION >::operator() ( SurfaceResult *  pResult,
miState *  pState,
SurfaceParameters *  pParameters  
) [inline]

Main shading function.

This is the function which is called for shader samples.

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

Member Data Documentation

template<typename SurfaceParameters, typename SurfaceResult, typename ShaderHelper, typename AmbientMaterialColorComponent = DefaultAmbientMaterialColorComponent<SurfaceParameters, ShaderHelper>, typename AmbientComponent = DefaultAmbientComponent<SurfaceParameters, ShaderHelper>, typename DiffuseMaterialColorComponent = DefaultDiffuseMaterialColorComponent<SurfaceParameters, ShaderHelper>, typename DiffuseComponent = DefaultDiffuseComponent<SurfaceParameters, ShaderHelper>, typename SpecularComponent = DefaultSpecularComponent<SurfaceParameters, ShaderHelper>, typename ReflectionComponent = DefaultReflectionComponent<SurfaceParameters, ShaderHelper>, typename RefractionComponent = DefaultRefractionComponent<SurfaceParameters, ShaderHelper>, typename ScatterComponent = DefaultScatterComponent<SurfaceParameters, ShaderHelper>, typename IndirectComponent = DefaultIndirectComponent<SurfaceParameters, ShaderHelper>, typename IncandescenceComponent = DefaultIncandescenceComponent<SurfaceParameters, ShaderHelper>, typename CustomComponent = DefaultCustomComponent<SurfaceParameters, SurfaceResult, ShaderHelper>, int VERSION = 1>
void* Surface< SurfaceParameters, SurfaceResult, ShaderHelper, AmbientMaterialColorComponent, AmbientComponent, DiffuseMaterialColorComponent, DiffuseComponent, SpecularComponent, ReflectionComponent, RefractionComponent, ScatterComponent, IndirectComponent, IncandescenceComponent, CustomComponent, VERSION >::mScatterData

Scatter user data pointer


Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6