xsi_material.h Source File
 
 
 
xsi_material.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 __XSIMATERIAL_H__
00018 #define __XSIMATERIAL_H__
00019 
00020 #include <xsi_property.h>
00021 #include <xsi_texturelayer.h>
00022 
00023 namespace XSI {
00024 
00025 class OGLMaterial;
00026 class OGLTutorial;
00027 class OGLTexture;
00028 class ClusterProperty;
00029 class ImageClip;
00030 class ImageClip2;
00031 class Texture;
00032 class Library;
00033 class CParameterRefArray;
00034 class CLongArray;
00035 
00036 //*****************************************************************************
00062 //*****************************************************************************
00063 
00064 class SICPPSDKDECL Material : public Property
00065 {
00066 public:
00068         Material();
00069 
00071         ~Material();
00072 
00076         Material(const CRef& in_ref);
00077 
00081         Material(const Material& in_obj);
00082 
00088         bool IsA( siClassID in_ClassID) const;
00089 
00093         siClassID GetClassID() const;
00094 
00099         Material& operator=(const Material& in_obj);
00100 
00106         Material& operator=(const CRef& in_ref);
00107 
00111         CRefArray       GetShaders() const;
00112 
00117         CRefArray       GetImageClips() const;
00118 
00122         OGLMaterial     GetOGLMaterial() const;
00123 
00127         OGLTexture      GetOGLTexture() const;
00128 
00131         ClusterProperty GetCurrentUV() const;
00132 
00135         ImageClip       GetCurrentImageClip() const;
00136 
00140         ImageClip2      GetCurrentImageClip2() const;
00141 
00144         Texture GetCurrentTexture() const;
00145 
00146         //
00147         // Texture layering methods -- same as in Shader.
00148         //
00149 
00150 
00162         TextureLayer    CreateTextureLayer( const CString& in_strName = CString(), bool in_bAfter = true, const TextureLayer& in_refLayer = TextureLayer() );
00163 
00177         CStatus                 AddSharedTextureLayer( const TextureLayer& in_layer, bool in_bAfter = true, const TextureLayer& in_refLayer = TextureLayer() );
00178 
00183         CRefArray               GetTextureLayers() const;
00184 
00192         CStatus                 RemoveTextureLayer( const TextureLayer& in_layer );
00193 
00194 
00199         CRefArray GetUsedBy() const;
00204         bool    IsResolved();
00210         CStatus Resolve();
00215         CString GetUnresolvedFullname() const;
00216 
00220         Library GetLibrary() const;
00221 
00232         Property        AddProperty
00233         (
00234                 const CString&  in_preset,
00235                 bool                    in_bBranch = false ,
00236                 const CString&  in_name = CString()
00237         );
00238 
00244         CRefArray GetProperties() const ;
00245 
00364         CRefArray GetConnectedClusterProperties( CParameterRefArray& out_refArray ) const ;
00365 
00373         siShaderParameterType GetShaderInputType(const CString& in_paramscriptname) const;
00374 
00381         CRefArray FindShaders(const CString& in_filtername) const;
00382 
00387         CRefArray       GetAllShaders() const;
00388 
00395         CRefArray       GetAllImageClips() const;
00396 
00397         private:
00398         Material * operator&() const;
00399         Material * operator&();
00400 };
00401 
00402 };
00403 
00404 #endif // __XSIMATERIAL_H__