00001 //*************************************************************************************** 00002 // File supervisor: Crosswalk team 00012 //*************************************************************************************** 00013 00014 #ifndef _XSISHADERCOMPOUND_H 00015 #define _XSISHADERCOMPOUND_H 00016 00017 #include "Template.h" 00018 00019 class CSLXSIShaderCompoundPort; 00020 class CSLXSIShader; 00021 00028 class XSIEXPORT CSLXSIShaderCompound 00029 : public CSLTemplate 00030 { 00031 public: 00038 CSLXSIShaderCompound(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate, CSLXSIShader* in_pParentShader); 00039 00041 virtual ~CSLXSIShaderCompound(); 00042 00046 ETemplateType Type(){ return XSI_SHADER_COMPOUND; } 00047 00051 SI_Error Synchronize(); 00052 00056 SI_Char* GetCategory(); 00057 00061 SI_Void SetCategory( SI_Char* in_pValue ); 00062 00066 SI_Char* GetDescription(); 00067 00071 SI_Void SetDescription( SI_Char* in_pValue ); 00072 00076 SI_Char* GetAuthor(); 00077 00081 SI_Void SetAuthor( SI_Char* in_pValue ); 00082 00086 SI_Char* GetDate(); 00087 00091 SI_Void SetDate( SI_Char* in_pValue ); 00092 00096 SI_Char* GetVersionTag(); 00097 00101 SI_Void SetVersionTag( SI_Char* in_pValue ); 00102 00106 SI_Int GetVersionMajor(); 00107 00111 SI_Void SetVersionMajor( SI_Int in_nValue ); 00112 00116 SI_Int GetVersionMinor(); 00117 00121 SI_Void SetVersionMinor( SI_Int in_nValue ); 00122 00126 SI_Char* GetPPGLogic(); 00127 00131 SI_Void SetPPGLogic( SI_Char* in_pValue ); 00132 00136 SI_Char* GetPPGLogicLanguage(); 00137 00141 SI_Void SetPPGLogicLanguage( SI_Char* in_pValue ); 00142 00146 SI_Int GetBackgroundColor(); 00147 00151 SI_Void SetBackgroundColor( SI_Int in_nValue ); 00152 00156 void SetParentShader(CSLXSIShader* in_pParentShader); 00157 00161 CSLXSIShader* ParentShader(); 00162 00163 00164 CSLStringProxy* GetCategoryProxy() { return &m_Category; }; 00165 CSLStringProxy* GetDescriptionProxy() { return &m_Description; }; 00166 CSLStringProxy* GetAuthorProxy() { return &m_Author; }; 00167 CSLStringProxy* GetDateProxy() { return &m_Date; }; 00168 CSLStringProxy* GetVersionTagProxy() { return &m_VersionTag; }; 00169 CSLIntProxy* GetVersionMajorProxy() { return &m_VersionMajor; }; 00170 CSLIntProxy* GetVersionMinorProxy() { return &m_VersionMinor; }; 00171 CSLStringProxy* GetPPGLogicProxy() { return &m_PPGLogic; }; 00172 CSLStringProxy* GetPPGLogicLanguageProxy() { return &m_PPGLogicLanguage; }; 00173 CSLIntProxy* GetBackgroundColorProxy() { return &m_BackgroundColor; }; 00174 00176 // Shader Compound Port functionality //////////////////////////////// 00178 00182 CSLXSIShaderCompoundPort* AddShaderCompoundPort(); 00183 00187 SI_Error RemoveShaderCompoundPort(SI_Int in_nIndex); 00188 00192 SI_Error RemoveShaderCompoundPort(CSLXSIShaderCompoundPort* in_pToRemove); 00193 00198 CSLXSIShaderCompoundPort* GetShaderCompoundPort(SI_Int in_nIndex); 00199 00203 SI_Int GetShaderCompoundPortCount(); 00204 00207 SI_Error ClearShaderCompoundPorts(); 00208 00212 CSLXSIShaderCompoundPort** GetShaderCompoundPortList(); 00213 00218 CSLXSIShaderCompoundPort* ConnectShaderCompoundPort( CSLXSIShaderCompoundPort* in_pToConnect ); 00219 00224 CSLXSIShaderCompoundPort* FindShaderCompoundPort( SI_Char* in_szPortName ); 00225 00227 // Shaders functionality ////////////////////////////////////////////////// 00229 00233 CSLXSIShader* AddShader(); 00234 00239 SI_Error RemoveShader( SI_Int in_nIndex ); 00240 00245 SI_Error RemoveShader( CSLXSIShader* in_pToRemove ); 00246 00250 SI_Error ClearShaders(); 00251 00256 CSLXSIShader* ConnectShader( CSLXSIShader* in_pToConnect ); 00257 00261 CSLXSIShader** GetShaderList(); 00262 00266 SI_Int GetShaderCount(); 00267 00272 CSLXSIShader* FindShader( SI_Char* in_szShaderName ); 00273 00274 private: 00275 CSLStringProxy m_Category; 00276 CSLStringProxy m_Description; 00277 CSLStringProxy m_Author; 00278 CSLStringProxy m_Date; 00279 CSLStringProxy m_VersionTag; 00280 CSLIntProxy m_VersionMajor; 00281 CSLIntProxy m_VersionMinor; 00282 CSLStringProxy m_PPGLogic; 00283 CSLStringProxy m_PPGLogicLanguage; 00284 CSLIntProxy m_BackgroundColor; 00285 00286 CSIBCArray<CSLXSIShaderCompoundPort *> m_ShaderCompoundPorts; 00287 CSIBCArray<CSLXSIShader*> m_Shaders; 00288 00289 CSLXSIShader* m_pParentShader; 00290 00291 SI_Void *m_pReserved; 00292 }; 00293 00294 #endif