xsi_shader.h Source File
 
 
 
xsi_shader.h
Go to the documentation of this file.
00001 //*****************************************************************************
00011 //*****************************************************************************
00012 
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016 
00017 #ifndef __XSISHADER_H__
00018 #define __XSISHADER_H__
00019 
00020 #include <xsi_projectitem.h>
00021 #include <xsi_texturelayer.h>
00022 
00023 namespace XSI {
00024 
00025 class Property ;
00026 
00027 //*****************************************************************************
00153 //*****************************************************************************
00154 
00155 class SICPPSDKDECL Shader : public ProjectItem
00156 {
00157 public:
00159         Shader();
00160 
00162         ~Shader();
00163 
00167         Shader(const CRef& in_ref);
00168 
00172         Shader(const Shader& in_obj);
00173 
00179         bool IsA( siClassID in_ClassID) const;
00180 
00184         siClassID GetClassID() const;
00185 
00190         Shader& operator=(const Shader& in_obj);
00191 
00192 
00198         Shader& operator=(const CRef& in_ref);
00199 
00203         CRefArray       GetShaders() const;
00204 
00209         CRefArray       GetImageClips() const;
00210 
00219         CString         GetProgID() const;
00220 
00224         siShaderParameterType GetOutputType2() const;
00225 
00229         siShaderOutputType GetOutputType() const;
00230 
00231 
00246         CStatus GetColorParameterValue(
00247                                 const CString& in_name,
00248                                 float& out_red,
00249                                 float& out_green,
00250                                 float& out_blue,
00251                                 float& out_alpha,
00252                                 double in_time = DBL_MAX ) ;
00253 
00268         CStatus PutColorParameterValue(
00269                                 const CString& in_name,
00270                                 float in_red,
00271                                 float in_green,
00272                                 float in_blue,
00273                                 float in_alpha = 1.0f,
00274                                 double in_time = DBL_MAX ) ;
00275 
00276         //
00277         // Texture layering methods -- same as in Material.
00278         //
00279 
00289         TextureLayer    CreateTextureLayer( const CString& in_strName = CString(), bool in_bAfter = true, const TextureLayer& in_refLayer = TextureLayer() );
00290 
00302         CStatus                 AddSharedTextureLayer( const TextureLayer& in_layer, bool in_bAfter = true, const TextureLayer& in_refLayer = TextureLayer() );
00303 
00308         CRefArray               GetTextureLayers() const;
00309 
00317         CStatus                 RemoveTextureLayer( const TextureLayer& in_layer );
00318 
00319 
00325         bool HasRenderer( const CString &in_strRenderer ) const;
00326 
00334         CValue GetRendererOption(
00335                 const CString   &in_strRenderer,
00336                 const CString   &in_strOption
00337                 ) const;
00338 
00345         CString GetSymbolName(
00346                 const CString   &in_strRenderer
00347                 ) const;
00348 
00355         CString GetCodePath(
00356                 const CString   &in_strRenderer
00357                 ) const;
00358 
00364         CString GetCodeText(
00365                 const CString   &in_strRenderer
00366                 ) const;
00367 
00377         Property        AddProperty
00378         (
00379                 const CString&  in_preset,
00380                 bool                    in_bBranch = false ,
00381                 const CString&  in_name = CString()
00382         );
00383 
00389         CRefArray GetProperties() const ;
00390 
00399         siShaderParameterType GetShaderInputType(const CString& in_scriptname) const;
00400 
00406         CString GetPortDisplayName( const CString &in_portScriptName ) const;
00407 
00414         CStatus PutPortDisplayName( const CString &in_portScriptName, const CString &in_displayName );
00415 
00420         CRef GetRoot(void) const;
00421 
00426         siShaderType GetShaderType() const;
00427 
00439         siShaderParameterType GetShaderParameterType( const CString& in_paramscriptname, bool& out_input ) const;
00440 
00447         CRefArray       GetAllShaders() const;
00448 
00455         CRef            GetShaderContainer() const;
00456 
00463         CRefArray GetShaderParameterTargets( const CString& in_paramscriptname ) const;
00464 
00472         CRefArray       GetAllImageClips() const;
00473 
00478         CRef    GetShaderDef() const;
00479 
00480         private:
00481         Shader * operator&() const;
00482         Shader * operator&();
00483 };
00484 
00485 };
00486 
00487 #endif // __XSISHADER_H__