XSITextureLayer.h

00001 /****************************************************************************************
00002 THIS CODE IS PUBLISHED AS A SAMPLE ONLY AND IS PROVIDED "AS IS".
00003 IN NO EVENT SHALL SOFTIMAGE, AVID TECHNOLOGY, INC. AND/OR THEIR RESPECTIVE 
00004 SUPPLIERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
00005 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00006 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
00007 CONNECTION WITH THE USE OR PERFORMANCE OF THIS CODE . 
00008  
00009 COPYRIGHT NOTICE. Copyright © 1999-2002 Avid Technology Inc. . All rights reserved. 
00010 
00011 SOFTIMAGE is a registered trademark of Avid Technology Inc. or its subsidiaries 
00012 or divisions. Windows NT is a registered trademark of Microsoft Corp. All other
00013 trademarks contained herein are the property of their respective owners. 
00014 ****************************************************************************************/
00015 #ifndef _XSITEXTURELAYER_H
00016 #define _XSITEXTURELAYER_H
00017 
00018 #include "Template.h"
00019 
00020 class CSLXSITextureLayerPort;
00021 class CSLXSIShaderMultiPortConnection;
00022 
00030 class XSIEXPORT CSLXSITextureLayer
00031     : public CSLTemplate
00032 {
00033 public:
00039     CSLXSITextureLayer(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00040 
00042     virtual ~CSLXSITextureLayer();
00043 
00047     SI_Error Synchronize();
00048 
00052     ETemplateType Type(){ return XSI_TEXTURE_LAYER; }
00053 
00054     virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
00055 
00056     virtual CSLAnimatableType* ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName);
00057 
00061     SI_Int GetOrder();
00062 
00066     SI_Void SetOrder( SI_Int in_nValue );
00067 
00071     SI_Bool GetMute();
00072 
00076     SI_Void SetMute( SI_Bool in_bValue );
00077 
00081     SI_Bool GetSolo();
00082 
00086     SI_Void SetSolo( SI_Bool in_bValue );
00087 
00091     SI_Char* GetColorConnection();
00092 
00096     SI_Void SetColorConnection( SI_Char* in_pValue );
00097 
00101     SI_Float GetRed();
00102 
00106     SI_Void SetRed( SI_Float in_fValue );
00107 
00111     SI_Float GetGreen();
00112 
00116     SI_Void SetGreen( SI_Float in_fValue );
00117 
00121     SI_Float GetBlue();
00122 
00126     SI_Void SetBlue( SI_Float in_fValue );
00127 
00131     SI_Float GetAlpha();
00132 
00136     SI_Void SetAlpha( SI_Float in_fValue );
00137 
00141     SI_Bool GetColorPremultiplied();
00142 
00146     SI_Void SetColorPremultiplied( SI_Bool in_bValue );
00147 
00151     SI_Bool GetIgnoreColorAlpha();
00152 
00156     SI_Void SetIgnoreColorAlpha( SI_Bool in_bValue );
00157 
00161     SI_Bool GetInvertColorAlpha();
00162 
00166     SI_Void SetInvertColorAlpha( SI_Bool in_bValue );
00167 
00171     SI_Bool GetAlphaColor();
00172 
00176     SI_Void SetAlphaColor( SI_Bool in_bValue );
00177 
00181     SI_Char* GetMaskConnection();
00182 
00186     SI_Void SetMaskConnection( SI_Char* in_pValue );
00187 
00191     SI_Float GetMask();
00192 
00196     SI_Void SetMask( SI_Float in_fValue );
00197 
00201     SI_Bool GetInvertMask();
00202 
00206     SI_Void SetInvertMask( SI_Bool in_bValue );
00207 
00211     SI_Int GetMaskMode();
00212 
00216     SI_Void SetMaskMode( SI_Int in_nValue );
00217 
00221     SI_Float GetMaskThreshold();
00222 
00226     SI_Void SetMaskThreshold( SI_Float in_fValue );
00227 
00231     SI_Float GetWeight();
00232 
00236     SI_Void SetWeight( SI_Float in_fValue );
00237 
00241     SI_Int GetMode();
00242 
00246     SI_Void SetMode( SI_Int in_nValue );
00247 
00248     CSLIntProxy*    GetOrderProxy() { return &m_Order; };
00249     CSLBoolProxy*   GetMuteProxy() { return &m_Mute; };
00250     CSLBoolProxy*   GetSoloProxy() { return &m_Solo; };
00251     CSLStringProxy* GetColorConnectionProxy() { return &m_ColorConnection; };
00252     CSLFloatProxy*  GetRedProxy() { return &m_Red; };
00253     CSLFloatProxy*  GetGreenProxy() { return &m_Green; };
00254     CSLFloatProxy*  GetBlueProxy() { return &m_Blue; };
00255     CSLFloatProxy*  GetAlphaProxy() { return &m_Alpha; };
00256     CSLBoolProxy*   GetColorPremultipliedProxy() { return &m_ColorPremultiplied; };
00257     CSLBoolProxy*   GetIgnoreColorAlphaProxy() { return &m_IgnoreColorAlpha; };
00258     CSLBoolProxy*   GetInvertColorAlphaProxy() { return &m_InvertColorAlpha; };
00259     CSLBoolProxy*   GetAlphaColorProxy() { return &m_AlphaColor; };
00260     CSLStringProxy* GetMaskConnectionProxy() { return &m_MaskConnection; };
00261     CSLFloatProxy*  GetMaskProxy() { return &m_Mask; };
00262     CSLBoolProxy*   GetInvertMaskProxy() { return &m_InvertMask; };
00263     CSLIntProxy*    GetMaskModeProxy() { return &m_MaskMode; };
00264     CSLFloatProxy*  GetMaskThresholdProxy() { return &m_MaskThreshold; };
00265     CSLFloatProxy*  GetWeightProxy() { return &m_Weight; };
00266     CSLIntProxy*    GetModeProxy() { return &m_Mode; };
00267 
00269     // Texture Layer port functionality ////////////////////////////////////////
00271     
00275     CSLXSITextureLayerPort* AddTextureLayerPort();
00276 
00280     SI_Error RemoveTextureLayerPort(SI_Int in_nIndex);
00281 
00285     SI_Error RemoveTextureLayerPort(CSLXSITextureLayerPort* in_pToRemove);
00286 
00291     CSLXSITextureLayerPort* GetTextureLayerPort(SI_Int in_nIndex);
00292 
00296     SI_Int GetTextureLayerPortCount();
00297 
00300     SI_Error ClearTextureLayerPorts();
00301 
00305     CSLXSITextureLayerPort** GetTextureLayerPortList();
00306 
00311     CSLXSITextureLayerPort* ConnectTextureLayerPort( CSLXSITextureLayerPort* in_pToConnect );
00312 
00314     // Multi Port Connection functionality ////////////////////////////////
00316     
00322     CSLXSIShaderMultiPortConnection* AddMultiPortConnection();
00323 
00327     SI_Error RemoveMultiPortConnection(SI_Int in_nIndex);
00328 
00332     SI_Error RemoveMultiPortConnection(CSLXSIShaderMultiPortConnection* in_pToRemove);
00333 
00338     CSLXSIShaderMultiPortConnection* GetMultiPortConnection(SI_Int in_nIndex);
00339 
00345     CSLXSIShaderMultiPortConnection* GetMultiPortConnectionByParameter(SI_Char* in_pParameter);
00346 
00350     SI_Int GetMultiPortConnectionCount();
00351 
00354     SI_Error ClearMultiPortConnections();
00355 
00359     CSLXSIShaderMultiPortConnection** GetMultiPortConnectionList();
00360 
00365     CSLXSIShaderMultiPortConnection* ConnectMultiPortConnection( CSLXSIShaderMultiPortConnection* in_pToConnect );
00366 
00371     CSLXSIShaderMultiPortConnection* FindMultiPortConnectionByParameterName(SI_Char *in_pName);
00372 
00373 private:
00374     CSLIntProxy     m_Order;
00375     CSLBoolProxy    m_Mute;
00376     CSLBoolProxy    m_Solo;
00377     CSLStringProxy  m_ColorConnection;
00378     CSLFloatProxy   m_Red;
00379     CSLFloatProxy   m_Green;
00380     CSLFloatProxy   m_Blue;
00381     CSLFloatProxy   m_Alpha;
00382     CSLBoolProxy    m_ColorPremultiplied;
00383     CSLBoolProxy    m_IgnoreColorAlpha;
00384     CSLBoolProxy    m_InvertColorAlpha;
00385     CSLBoolProxy    m_AlphaColor;
00386     CSLStringProxy  m_MaskConnection;
00387     CSLFloatProxy   m_Mask;
00388     CSLBoolProxy    m_InvertMask;
00389     CSLIntProxy     m_MaskMode;
00390     CSLFloatProxy   m_MaskThreshold;
00391     CSLFloatProxy   m_Weight;
00392     CSLIntProxy     m_Mode;
00393 
00394     CSIBCArray<CSLXSITextureLayerPort*> m_TextureLayerPorts;
00395 
00396     CSIBCArray<CSLXSIShaderMultiPortConnection *> m_MultiPortConnections;
00397 
00398     SI_Void *m_pReserved;
00399 };
00400 
00401 #endif