# XSITextureLayer.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 #ifndef _XSITEXTURELAYER_H
    00012 #define _XSITEXTURELAYER_H
    00013
    00014 #include "Template.h"
    00015
    00016 class CSLXSITextureLayerPort;
    00017 class CSLXSIShaderMultiPortConnection;
    00018
    00019
    00023 class XSIEXPORT CSLXSITextureLayer
    00024     : public CSLTemplate
    00025 {
    00026 public:
    00032     CSLXSITextureLayer(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
    00033
    00035     virtual ~CSLXSITextureLayer();
    00036
    00040     SI_Error Synchronize();
    00041
    00045     ETemplateType Type(){ return XSI_TEXTURE_LAYER; }
    00046
    00047     virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
    00048
    00049     virtual CSLAnimatableType* ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName);
    00050
    00054     SI_Int GetOrder();
    00055
    00059     SI_Void SetOrder( SI_Int in_nValue );
    00060
    00064     SI_Bool GetMute();
    00065
    00069     SI_Void SetMute( SI_Bool in_bValue );
    00070
    00074     SI_Bool GetSolo();
    00075
    00079     SI_Void SetSolo( SI_Bool in_bValue );
    00080
    00084     SI_Char* GetColorConnection();
    00085
    00089     SI_Void SetColorConnection( SI_Char* in_pValue );
    00090
    00094     SI_Float GetRed();
    00095
    00099     SI_Void SetRed( SI_Float in_fValue );
    00100
    00104     SI_Float GetGreen();
    00105
    00109     SI_Void SetGreen( SI_Float in_fValue );
    00110
    00114     SI_Float GetBlue();
    00115
    00119     SI_Void SetBlue( SI_Float in_fValue );
    00120
    00124     SI_Float GetAlpha();
    00125
    00129     SI_Void SetAlpha( SI_Float in_fValue );
    00130
    00134     SI_Bool GetColorPremultiplied();
    00135
    00139     SI_Void SetColorPremultiplied( SI_Bool in_bValue );
    00140
    00144     SI_Bool GetIgnoreColorAlpha();
    00145
    00149     SI_Void SetIgnoreColorAlpha( SI_Bool in_bValue );
    00150
    00154     SI_Bool GetInvertColorAlpha();
    00155
    00159     SI_Void SetInvertColorAlpha( SI_Bool in_bValue );
    00160
    00164     SI_Bool GetAlphaColor();
    00165
    00169     SI_Void SetAlphaColor( SI_Bool in_bValue );
    00170
    00174     SI_Char* GetMaskConnection();
    00175
    00179     SI_Void SetMaskConnection( SI_Char* in_pValue );
    00180
    00184     SI_Float GetMask();
    00185
    00189     SI_Void SetMask( SI_Float in_fValue );
    00190
    00194     SI_Bool GetInvertMask();
    00195
    00199     SI_Void SetInvertMask( SI_Bool in_bValue );
    00200
    00204     SI_Int GetMaskMode();
    00205
    00209     SI_Void SetMaskMode( SI_Int in_nValue );
    00210
    00214     SI_Float GetMaskThreshold();
    00215
    00219     SI_Void SetMaskThreshold( SI_Float in_fValue );
    00220
    00224     SI_Float GetWeight();
    00225
    00229     SI_Void SetWeight( SI_Float in_fValue );
    00230
    00234     SI_Int GetMode();
    00235
    00239     SI_Void SetMode( SI_Int in_nValue );
    00240
    00241     CSLIntProxy*    GetOrderProxy() { return &m_Order; };
    00242     CSLBoolProxy*   GetMuteProxy() { return &m_Mute; };
    00243     CSLBoolProxy*   GetSoloProxy() { return &m_Solo; };
    00244     CSLStringProxy* GetColorConnectionProxy() { return &m_ColorConnection; };
    00245     CSLFloatProxy*  GetRedProxy() { return &m_Red; };
    00246     CSLFloatProxy*  GetGreenProxy() { return &m_Green; };
    00247     CSLFloatProxy*  GetBlueProxy() { return &m_Blue; };
    00248     CSLFloatProxy*  GetAlphaProxy() { return &m_Alpha; };
    00249     CSLBoolProxy*   GetColorPremultipliedProxy() { return &m_ColorPremultiplied; };
    00250     CSLBoolProxy*   GetIgnoreColorAlphaProxy() { return &m_IgnoreColorAlpha; };
    00251     CSLBoolProxy*   GetInvertColorAlphaProxy() { return &m_InvertColorAlpha; };
    00252     CSLBoolProxy*   GetAlphaColorProxy() { return &m_AlphaColor; };
    00253     CSLStringProxy* GetMaskConnectionProxy() { return &m_MaskConnection; };
    00254     CSLFloatProxy*  GetMaskProxy() { return &m_Mask; };
    00255     CSLBoolProxy*   GetInvertMaskProxy() { return &m_InvertMask; };
    00256     CSLIntProxy*    GetMaskModeProxy() { return &m_MaskMode; };
    00257     CSLFloatProxy*  GetMaskThresholdProxy() { return &m_MaskThreshold; };
    00258     CSLFloatProxy*  GetWeightProxy() { return &m_Weight; };
    00259     CSLIntProxy*    GetModeProxy() { return &m_Mode; };
    00260
    00262     // Texture Layer port functionality ////////////////////////////////////////
    00264
    00268     CSLXSITextureLayerPort* AddTextureLayerPort();
    00269
    00273     SI_Error RemoveTextureLayerPort(SI_Int in_nIndex);
    00274
    00278     SI_Error RemoveTextureLayerPort(CSLXSITextureLayerPort* in_pToRemove);
    00279
    00284     CSLXSITextureLayerPort* GetTextureLayerPort(SI_Int in_nIndex);
    00285
    00289     SI_Int GetTextureLayerPortCount();
    00290
    00293     SI_Error ClearTextureLayerPorts();
    00294
    00298     CSLXSITextureLayerPort** GetTextureLayerPortList();
    00299
    00304     CSLXSITextureLayerPort* ConnectTextureLayerPort( CSLXSITextureLayerPort* in_pToConnect );
    00305
    00307     // Multi Port Connection functionality ////////////////////////////////
    00309
    00315     CSLXSIShaderMultiPortConnection* AddMultiPortConnection();
    00316
    00320     SI_Error RemoveMultiPortConnection(SI_Int in_nIndex);
    00321
    00325     SI_Error RemoveMultiPortConnection(CSLXSIShaderMultiPortConnection* in_pToRemove);
    00326
    00331     CSLXSIShaderMultiPortConnection* GetMultiPortConnection(SI_Int in_nIndex);
    00332
    00336     SI_Int GetMultiPortConnectionCount();
    00337
    00340     SI_Error ClearMultiPortConnections();
    00341
    00345     CSLXSIShaderMultiPortConnection** GetMultiPortConnectionList();
    00346
    00351     CSLXSIShaderMultiPortConnection* ConnectMultiPortConnection( CSLXSIShaderMultiPortConnection* in_pToConnect );
    00352
    00357     CSLXSIShaderMultiPortConnection* FindMultiPortConnectionByParameterName(SI_Char *in_pName);
    00358
    00359 private:
    00360     CSLIntProxy     m_Order;
    00361     CSLBoolProxy    m_Mute;
    00362     CSLBoolProxy    m_Solo;
    00363     CSLStringProxy  m_ColorConnection;
    00364     CSLFloatProxy   m_Red;
    00365     CSLFloatProxy   m_Green;
    00366     CSLFloatProxy   m_Blue;
    00367     CSLFloatProxy   m_Alpha;
    00368     CSLBoolProxy    m_ColorPremultiplied;
    00369     CSLBoolProxy    m_IgnoreColorAlpha;
    00370     CSLBoolProxy    m_InvertColorAlpha;
    00371     CSLBoolProxy    m_AlphaColor;
    00372     CSLStringProxy  m_MaskConnection;
    00373     CSLFloatProxy   m_Mask;
    00374     CSLBoolProxy    m_InvertMask;
    00375     CSLIntProxy     m_MaskMode;
    00376     CSLFloatProxy   m_MaskThreshold;
    00377     CSLFloatProxy   m_Weight;
    00378     CSLIntProxy     m_Mode;
    00379
    00380     CSIBCArray<CSLXSITextureLayerPort*> m_TextureLayerPorts;
    00381
    00382     CSIBCArray<CSLXSIShaderMultiPortConnection *> m_MultiPortConnections;
    00383
    00384     SI_Void *m_pReserved;
    00385 };
    00386
    00387 #endif