Fog.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 _FOG_H
00013 #define _FOG_H
00014 
00015 #include "Template.h"
00016 
00020 class XSIEXPORT CSLFog
00021     : public CSLTemplate
00022 {
00023 public:
00027     enum EFogType
00028     {
00029         SI_VERTEX,  
00030         SI_PIXEL,   
00031     };
00032 
00036     enum EFogInterpolationType
00037     {
00038         SI_LINEAR,              
00039         SI_EXPONENTIAL,         
00040     };
00041 
00048     CSLFog(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00049 
00052     virtual ~CSLFog();
00053 
00057     EFogType                GetFogType() { return m_Type; }
00058 
00063     SI_Void                 SetFogType(EFogType in_Type) { m_Type = in_Type; }
00064 
00068     EFogInterpolationType   GetFogInterpolationType() { return m_InterpolationType; }
00069 
00074     SI_Void                 SetFogInterpolationType(EFogInterpolationType in_Type) { m_InterpolationType = in_Type; }
00075 
00079     CSIBCColorf             GetColor() { return m_Color; }
00080 
00085     SI_Void                 SetColor(CSIBCColorf& in_rColor) { m_Color = in_rColor; }
00086 
00090     SI_Float                GetNear() { return m_Near; }
00091 
00096     SI_Void                 SetNear(SI_Float in_fValue) { m_Near = in_fValue; }
00097 
00101     SI_Float                GetFar() { return m_Far; }
00102 
00107     SI_Void                 SetFar(SI_Float in_fValue) { m_Far = in_fValue; }
00108 
00113     virtual CSLAnimatableType*  ParameterFromName(SI_Char *in_szName);
00114 
00120     virtual CSLAnimatableType*  ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName);
00121 
00125     virtual ETemplateType       Type() { return SI_FOG; }
00126 
00127     CSLColorRGBProxy*   GetColorProxy(){ return &m_Color; };
00128     CSLFloatProxy*      GetNearProxy(){ return &m_Near; };
00129     CSLFloatProxy*      GetFarProxy(){ return &m_Far; };
00130 
00131 private:
00132     CSLEnumProxy<EFogType, SI_FOG>                      m_Type;
00133     CSLEnumProxy<EFogInterpolationType, SI_EXPONENTIAL> m_InterpolationType;
00134 
00135     CSLColorRGBProxy    m_Color;
00136     CSLFloatProxy       m_Near;
00137     CSLFloatProxy       m_Far;
00138 };
00139 
00140 #endif