ColorOperationShader< ColorOperationShaderParameters,
ColorOperationResultType, ColorOperationComputation, VERSION >
Class Template Reference
#include <adskColorOperationShader.h>
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] |