# CSLShaderInstanceData Class Reference

`#include <ShaderInstanceData.h>`

Inheritance diagram for CSLShaderInstanceData:

List of all members.

## Public Member Functions
| CSLShaderInstanceData (CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate)
| ~CSLShaderInstanceData ()
ETemplateType | Type ()
| Returns the type of this template.
SI_Error | Synchronize ()
CSLModel * | GetReference ()
| Get the referenced Model.
SI_Void | SetReference (CSLModel *in_pReferedModel)
| Set the referenced Model.
CSLVariantParameter * | AddParameter ()
SI_Error | RemoveParameter (SI_Int in_nIndex)
SI_Error | RemoveParameter (CSLVariantParameter *in_pToRemove)
SI_Error | ClearParameters ()
CSLVariantParameter * | ConnectParameter (CSLVariantParameter *in_pToConnect)
CSLVariantParameter ** | GetParameterList ()
SI_Int | GetParameterCount ()
virtual CSLAnimatableType * | ParameterFromName (SI_Char *in_szName)
CSLAnimatableType * | ParameterFromType (EFCurveType in_Type, SI_Char *in_szParameterName)

## Detailed Description

Defines how a shader is shared beetween models (see the XSI_ShaderInstanceData template reference)

## Constructor & Destructor Documentation

CSLShaderInstanceData | ( | CSLScene * | in_pScene,
|  | CSLModel * | in_pModel,
|  | CdotXSITemplate * | in_pTemplate |
| ) |  |  |

Constructor

Parameters:

  | in_pScene | Parent scene
  | in_pModel | Parent model
  | in_pTemplate | Refered template

Returns:
  an instance of CSLShaderInstanceData

~CSLShaderInstanceData | ( |  | ) |

Destructor

## Member Function Documentation

ETemplateType Type | ( |  | ) | `[inline, virtual]`

Returns the type of this template.

Returns:
  ETemplateType The type of this template (XSI_SHADER_INSTANCE_DATA)

Implements CSLTemplate.

SI_Error Synchronize | ( |  | ) | `[virtual]`

Commits semantic layer data to the dotXSI template

Returns:
  SI_Error Whether or not data was commited correctly

Reimplemented from CSLTemplate.

CSLModel* GetReference | ( |  | ) |

Get the referenced Model.

Returns:
  CSLModel Pointer to referenced Model or null if there's none

SI_Void SetReference | ( | CSLModel * | in_pReferedModel | ) |

Set the referenced Model.

Parameters:

  | in_pReferedModel | Pointer to refered Model.

CSLVariantParameter* AddParameter | ( |  | ) |

Add a parameter to the parameter list

Returns:
  CSLParameter Pointer to the newly added parameter

SI_Error RemoveParameter | ( | SI_Int | in_nIndex | ) |

Removes a parameter from the parameter list

Parameters:

  | in_nIndex | Index of the parameter to remove

Returns:
  SI_Error Whether or not the parameter could be removed

SI_Error RemoveParameter | ( | CSLVariantParameter * | in_pToRemove | ) |

Removes a parameter from the parameter list

Parameters:

  | in_pToRemove | Pointer to the parameter to remove

Returns:
  SI_Error Whether or not the parameter could be removed

SI_Error ClearParameters | ( |  | ) |

Removes all parameters from the parameter list

Returns:
  SI_Error Whether or not the list could be cleared

CSLVariantParameter* ConnectParameter | ( | CSLVariantParameter * | in_pToConnect | ) |

Adds an exisiting parameter to the parameter list

Parameters:

  | in_pToConnect | Pointer to the parameter to add

Returns:
  The added parameter or null if it already exists in the list

CSLVariantParameter** GetParameterList | ( |  | ) |

Gets a pointer to the internally-stored parameter pointer list

Returns:
  CSLParameter Pointer to the list

SI_Int GetParameterCount | ( |  | ) |

Gets the total number of parameters

Returns:
  SI_Int Number of parameters

virtual CSLAnimatableType* ParameterFromName | ( | SI_Char * | in_szName | ) | `[virtual]`

Searches for a parameter by name

Parameters:

  | in_szName | Name of the parameter to look for

Returns:
  CSLAnimatableType* Pointer to the found parameter or null if not found

Reimplemented from CSLTemplate.

CSLAnimatableType* ParameterFromType | ( | EFCurveType | in_Type,
|  | SI_Char * | in_szParameterName |
| ) |  |  | `[virtual]`

Searches for a parameter by name and type

Parameters:

  | in_Type | Type of the parameter to look for
  | in_szParameterName | Name of the parameter to look for

Returns:
  CSLAnimatableType* Pointer to the found parameter or null if not found

Reimplemented from CSLTemplate.

The documentation for this class was generated from the following file:

- ShaderInstanceData.h