Main Page | Class Hierarchy | Alphabetical List | Compound List | Compound Members

# IRdLWShaderBrick Struct Reference

RdLWShaderBrick interface an interface for common shader brick///////////////////////////////////////////////////////////////////////. More...

Inherits IDispatch.

Inherited by IRdLWShaderBrickStatic.

List of all members.

## Public Member Functions
HRESULT | Clear (void)
HRESULT | GetBrickDefinition ([out, retval] BSTR *pValue)
HRESULT | GetBrickExecution ([out, retval] BSTR *pValue)
HRESULT | GetBrickResult ([out, retval] BSTR *pValue)
HRESULT | GetType ([out, retval] BSTR *pValue)

## Detailed Description

RdLWShaderBrick interface an interface for common shader brick///////////////////////////////////////////////////////////////////////.

This interface represents one input/output connector of the shader brick. Since we do not want to add extra connector for common brick code (i.e mostly definition and execution part of the brick is the same for each brick) this info is copied in each brick dataobject. The "GetUniqueName" can be used by shader / material completition code to resolve duplicities. So if you are writing a brick for shader method (which generaly is the same for each output connector) set the brick so GetUniqueName returns the same value for each output connector dataobject.

Implementation is responsible for preventing of naming conflicts

## Member Function Documentation

HRESULT IRdLWShaderBrick::Clear | ( | void |  | ) |

| Clear all data in the brick

HRESULT IRdLWShaderBrick::GetBrickDefinition | ( | [out, retval] BSTR * | pValue | ) |

  | This method should return Brick's definition part. This part is then appended to the generated code The definition part means for example function definition (incl. code) parameter definition. Example: "void b21_brick_MyAdd(in RtFloat x, in RtFloat y, out RtFloat xy) { xy = x+y; }" Parameters:
  pValue | is filled with the part of the brick.

HRESULT IRdLWShaderBrick::GetBrickExecution | ( | [out, retval] BSTR * | pValue | ) |

  | This method should return Brick's execution part. This part is then appended to the generated code The execution part means for example function call (including input parameters with necessary typecasts). Example: "RtFloat b21_x = b20_out; RtFloat b21_y = b20_out2; RtFloat b21_z = 0; b21_brick_MyAdd(b21_x, b21_y, b21_z);" Parameters:
  pValue | is filled with the part of the brick.

HRESULT IRdLWShaderBrick::GetBrickResult | ( | [out, retval] BSTR * | pValue | ) |

  | This method should return respective Brick's result (output parameter) for current connector. This method is called by other GetBrickExecution parts to get inputs for execution. Result part means for example part of the input structure ("input.Color"), function output parameter ("b21_z") or other. The format has to be suitable for direct assigment (myinput = GetBrickResult_output) but this depends on the type of the result. Parameters:
  pValue | is filled with the part of the brick.

HRESULT IRdLWShaderBrick::GetType | ( | [out, retval] BSTR * | pValue | ) |

  | This method should return Brick's result type. This method is called by other Bricks during code generation to convert types. See allowed types for the brick in the SDK (i.e. RtFloat, RtBool and other). Parameters:
  pValue | is filled with the type of the brick.