# ShaderInstanceData.h

    00001 //***************************************************************************************
    00002 //
    00003 // File supervisor: Crosswalk team
    00004 //
    00005 // Copyright 2008 Autodesk, Inc.  All rights reserved.
    00006 // Use of this software is subject to the terms of the Autodesk license agreement
    00007 // provided at the time of installation or download, or which otherwise accompanies
    00008 // this software in either electronic or hard copy form.
    00009 //
    00010 //***************************************************************************************
    00011
    00012 #ifndef _SHADER_INSTANCE_DATA_H
    00013 #define _SHADER_INSTANCE_DATA_H
    00014
    00015 #include "Template.h"
    00016
    00017 class CSLVariantParameter;
    00018
    00022 class XSIEXPORT CSLShaderInstanceData
    00023     : public CSLTemplate
    00024 {
    00025 public:
    00026
    00033     CSLShaderInstanceData
    00034     (
    00035         CSLScene* in_pScene,
    00036         CSLModel *in_pModel,
    00037         CdotXSITemplate* in_pTemplate
    00038     );
    00039
    00042     ~CSLShaderInstanceData();
    00043
    00045
    00048     inline ETemplateType Type();
    00049
    00053     SI_Error Synchronize();
    00054
    00055     // Reference Functionality ////////////////////////////////////////////////////
    00056
    00058
    00061     CSLModel* GetReference();
    00062
    00064
    00067     SI_Void SetReference( CSLModel* in_pReferedModel);
    00068
    00069
    00070     // Parameters Functionality ///////////////////////////////////////////////
    00071
    00075     CSLVariantParameter* AddParameter();
    00076
    00081     SI_Error RemoveParameter( SI_Int in_nIndex );
    00082
    00087     SI_Error RemoveParameter( CSLVariantParameter* in_pToRemove );
    00088
    00092     SI_Error ClearParameters();
    00093
    00098     CSLVariantParameter* ConnectParameter( CSLVariantParameter* in_pToConnect );
    00099
    00103     CSLVariantParameter** GetParameterList();
    00104
    00108     SI_Int GetParameterCount();
    00109
    00114     virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
    00115
    00121     CSLAnimatableType* ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName);
    00122
    00123 private:
    00124     CSLModel *m_pReferedModel;
    00125     CSIBCArray<CSLVariantParameter *> m_Parameters;
    00126
    00127     SI_Void *m_pReserved;   // reserved for future extension
    00128 };
    00129
    00130
    00131 #endif // _SHADER_INSTANCE_DATA_H