PassShader< FrameBufferDataType, PassShaderParameters, PassComputation, RayFilter, VERSION > Class Template Reference

#include <adskPassShader.h>
Inheritance diagram for PassShader< FrameBufferDataType, PassShaderParameters, PassComputation, RayFilter, VERSION >:
Inheritance graph
[legend]
Collaboration diagram for PassShader< FrameBufferDataType, PassShaderParameters, PassComputation, RayFilter, VERSION >:
Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename FrameBufferDataType, typename PassShaderParameters, typename PassComputation, typename RayFilter, int VERSION = 1>
class PassShader< FrameBufferDataType, PassShaderParameters, PassComputation, RayFilter, VERSION >

Pass shader base class.
Template Parameters:
PassShaderParameters  The type of the pass shader parameters.
PassComputation  The helper function object which computes a value per sample. This function object will be constucted using using the current state, and the current parameters, and will be called with the state, parameters, and a reference to the current value in the frame buffer for the given sample.
RayFilter  The helper function object which determines whether a ray should be processed or not. See PassShaderEyeRayFilter for an example implementation.
VERSION  The version number of this shader.

Public Member Functions

  PassShader (miState *pState, PassShaderParameters *pParameters)
  PassShader constructor. This will be called once per shader instance, and is where data for each shader instance should be initialized.
virtual  ~PassShader ()
  PassShader destructor. The member variables mDestructorState and mDestructorParameters will be set correctly when the destructor is called.
miBoolean  operator() (miColor *pResult, miState *pState, PassShaderParameters *pParameters)
  Main shading function.

Public Attributes

miUint  mFrameBufferID
miUint  mEncodingIndex
PassComputation  mPassComputation

Constructor & Destructor Documentation

template<typename FrameBufferDataType, typename PassShaderParameters, typename PassComputation, typename RayFilter, int VERSION>
PassShader< FrameBufferDataType, PassShaderParameters, PassComputation, RayFilter, VERSION >::PassShader ( miState *  pState,
PassShaderParameters *  pParameters  
) [inline]

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

Parameters:
pState  A pointer to the mental ray state structure.
pParameters  A pointer to the shader parameters.

Member Function Documentation

template<typename FrameBufferDataType, typename PassShaderParameters, typename PassComputation, typename RayFilter, int VERSION>
miBoolean PassShader< FrameBufferDataType, PassShaderParameters, PassComputation, RayFilter, VERSION >::operator() ( miColor *  pResult,
miState *  pState,
PassShaderParameters *  pParameters  
) [inline]

Main shading function.

This is the function which is called for shader samples.

Parameters:
pResult  A pointer to the mental ray color result.
pState  A pointer to the mental ray state structure.
pParameters  A pointer to the shader parameters.

Reimplemented from Shader< PassShaderParameters, ShaderHelper< PassShaderParameters >, VERSION >.


Member Data Documentation

template<typename FrameBufferDataType, typename PassShaderParameters, typename PassComputation, typename RayFilter, int VERSION = 1>
miUint PassShader< FrameBufferDataType, PassShaderParameters, PassComputation, RayFilter, VERSION >::mFrameBufferID

The frame buffer IDs

template<typename FrameBufferDataType, typename PassShaderParameters, typename PassComputation, typename RayFilter, int VERSION = 1>
miUint PassShader< FrameBufferDataType, PassShaderParameters, PassComputation, RayFilter, VERSION >::mEncodingIndex

Index associated with the render pass. Used for lookups in the pass contribution encoding strings.

template<typename FrameBufferDataType, typename PassShaderParameters, typename PassComputation, typename RayFilter, int VERSION = 1>
PassComputation PassShader< FrameBufferDataType, PassShaderParameters, PassComputation, RayFilter, VERSION >::mPassComputation

Object used for performaing pass-specific computations


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