XSIShaderCompound.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 _XSISHADERCOMPOUND_H
00013 #define _XSISHADERCOMPOUND_H
00014 
00015 #include "Template.h"
00016 
00017 class CSLXSIShaderCompoundPort;
00018 class CSLXSIShader;
00019 
00024 class XSIEXPORT CSLXSIShaderCompound
00025     : public CSLTemplate
00026 {
00027 public:
00034     CSLXSIShaderCompound(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate, CSLXSIShader* in_pParentShader);
00035 
00037     virtual ~CSLXSIShaderCompound();
00038 
00042     ETemplateType Type(){ return XSI_SHADER_COMPOUND; }
00043 
00047     SI_Error Synchronize();
00048 
00052     SI_Char* GetCategory();
00053 
00057     SI_Void SetCategory( SI_Char* in_pValue );
00058 
00062     SI_Char* GetDescription();
00063 
00067     SI_Void SetDescription( SI_Char* in_pValue );
00068 
00072     SI_Char* GetAuthor();
00073 
00077     SI_Void SetAuthor( SI_Char* in_pValue );
00078 
00082     SI_Char* GetDate();
00083 
00087     SI_Void SetDate( SI_Char* in_pValue );
00088 
00092     SI_Char* GetVersionTag();
00093 
00097     SI_Void SetVersionTag( SI_Char* in_pValue );
00098 
00102     SI_Int GetVersionMajor();
00103 
00107     SI_Void SetVersionMajor( SI_Int in_nValue );
00108 
00112     SI_Int GetVersionMinor();
00113 
00117     SI_Void SetVersionMinor( SI_Int in_nValue );
00118 
00122     SI_Char* GetPPGLogic();
00123 
00127     SI_Void SetPPGLogic( SI_Char* in_pValue );
00128 
00132     SI_Char* GetPPGLogicLanguage();
00133 
00137     SI_Void SetPPGLogicLanguage( SI_Char* in_pValue );
00138 
00142     SI_Int GetBackgroundColor();
00143 
00147     SI_Void SetBackgroundColor( SI_Int in_nValue );
00148 
00152     void SetParentShader(CSLXSIShader* in_pParentShader);
00153 
00157     CSLXSIShader* ParentShader();
00158 
00159 
00160     CSLStringProxy*     GetCategoryProxy()          { return &m_Category; };
00161     CSLStringProxy*     GetDescriptionProxy()       { return &m_Description; };
00162     CSLStringProxy*     GetAuthorProxy()            { return &m_Author; };
00163     CSLStringProxy*     GetDateProxy()              { return &m_Date; };
00164     CSLStringProxy*     GetVersionTagProxy()        { return &m_VersionTag; };
00165     CSLIntProxy*        GetVersionMajorProxy()      { return &m_VersionMajor; };
00166     CSLIntProxy*        GetVersionMinorProxy()      { return &m_VersionMinor; };
00167     CSLStringProxy*     GetPPGLogicProxy()          { return &m_PPGLogic; };
00168     CSLStringProxy*     GetPPGLogicLanguageProxy()  { return &m_PPGLogicLanguage; };
00169     CSLIntProxy*        GetBackgroundColorProxy()   { return &m_BackgroundColor; };
00170 
00172     // Shader Compound Port functionality ////////////////////////////////
00174 
00178     CSLXSIShaderCompoundPort* AddShaderCompoundPort();
00179 
00183     SI_Error RemoveShaderCompoundPort(SI_Int in_nIndex);
00184 
00188     SI_Error RemoveShaderCompoundPort(CSLXSIShaderCompoundPort* in_pToRemove);
00189 
00194     CSLXSIShaderCompoundPort* GetShaderCompoundPort(SI_Int in_nIndex);
00195 
00199     SI_Int GetShaderCompoundPortCount();
00200 
00203     SI_Error ClearShaderCompoundPorts();
00204 
00208     CSLXSIShaderCompoundPort** GetShaderCompoundPortList();
00209 
00214     CSLXSIShaderCompoundPort* ConnectShaderCompoundPort( CSLXSIShaderCompoundPort* in_pToConnect );
00215 
00220     CSLXSIShaderCompoundPort* FindShaderCompoundPort( SI_Char* in_szPortName );
00221 
00223     // Shaders functionality //////////////////////////////////////////////////
00225 
00229     CSLXSIShader* AddShader();
00230 
00235     SI_Error RemoveShader( SI_Int in_nIndex );
00236 
00241     SI_Error RemoveShader( CSLXSIShader* in_pToRemove );
00242 
00246     SI_Error ClearShaders();
00247 
00252     CSLXSIShader* ConnectShader( CSLXSIShader* in_pToConnect );
00253 
00257     CSLXSIShader** GetShaderList();
00258 
00262     SI_Int GetShaderCount();
00263 
00268     CSLXSIShader* FindShader( SI_Char* in_szShaderName );
00269 
00270 private:
00271     CSLStringProxy  m_Category;
00272     CSLStringProxy  m_Description;
00273     CSLStringProxy  m_Author;
00274     CSLStringProxy  m_Date;
00275     CSLStringProxy  m_VersionTag;
00276     CSLIntProxy     m_VersionMajor;
00277     CSLIntProxy     m_VersionMinor;
00278     CSLStringProxy  m_PPGLogic;
00279     CSLStringProxy  m_PPGLogicLanguage;
00280     CSLIntProxy     m_BackgroundColor;
00281 
00282     CSIBCArray<CSLXSIShaderCompoundPort *> m_ShaderCompoundPorts;
00283     CSIBCArray<CSLXSIShader*> m_Shaders;
00284 
00285     CSLXSIShader*   m_pParentShader;
00286 
00287     SI_Void *m_pReserved;
00288 };
00289 
00290 #endif