ColorOperationShader< ColorOperationShaderParameters, ColorOperationResultType, ColorOperationComputation, VERSION > Class Template Reference

#include <adskColorOperationShader.h>

Inheritance diagram for ColorOperationShader< ColorOperationShaderParameters, ColorOperationResultType, ColorOperationComputation, VERSION >:

Inheritance graph
[legend]
Collaboration diagram for ColorOperationShader< ColorOperationShaderParameters, ColorOperationResultType, ColorOperationComputation, VERSION >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename ColorOperationShaderParameters, typename ColorOperationResultType, typename ColorOperationComputation, int VERSION = 1>
class ColorOperationShader< ColorOperationShaderParameters, ColorOperationResultType, ColorOperationComputation, VERSION >

Color operation shader base class.

Template Parameters:
ColorOperationShaderParameters The type of the pass shader parameters. The structure is expected to contain COLOR_OPERATION_SHADER_BASE_PARAMETERS
ColorOperationResultType the shader result structure.
ColorOperationComputation The helper class. The type specified here must implement the following methods:
  • void initialize(ColorOperationShaderResult* pResult, miState* state, ColorOperationShaderParameters* pParameters, unsigned int numberOfFrameBuffers, PassTypeInfo* passTypeInfo, FrameBufferInfo* frameBufferInfo) performs initialization tasks that are required once per shader call.
  • unsigned int branchCount() returns the number of color inputs that are operated, and that may produce frame buffer contribution when evaluated.
  • miColor evaluateBranchColor(miState* state, ColorOperationShaderParameters* pParameters, int branch) evaluates the color input indicated by branch and returns the result of the evaluation. Note: for shaders that are known to have only one branch, initialization may be performed in this function.
  • void computeAndCompositeResult(ColorOperationFbResult& compResult, int branch) composits the branch result in compResult color/opacity into compResult compositeColor/compositeOpacity .
VERSION The version number of this shader.

Public Member Functions

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

Constructor & Destructor Documentation

template<typename ColorOperationShaderParameters, typename ColorOperationResultType, typename ColorOperationComputation, int VERSION>
ColorOperationShader< ColorOperationShaderParameters, ColorOperationResultType, ColorOperationComputation, VERSION >::ColorOperationShader ( miState *  pState,
ColorOperationShaderParameters *  pParameters 
) [inline]

ColorOperationShader 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 ColorOperationShaderParameters, typename ColorOperationResultType, typename ColorOperationComputation, int VERSION>
miBoolean ColorOperationShader< ColorOperationShaderParameters, ColorOperationResultType, ColorOperationComputation, VERSION >::operator() ( miColor *  pResult,
miState *  pState,
ColorOperationShaderParameters *  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 Material< ColorOperationShaderParameters, ShaderHelper< ColorOperationShaderParameters >, VERSION >.


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