IViewportShadingMgr.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 *<
00003 FILE:           IViewportShadingMgr.h
00004 
00005 DESCRIPTION:    Core interface to control siewport shading, including shadows
00006 
00007 CREATED BY:     Neil Hazzard
00008 
00009 HISTORY:        created March 8th, 2007
00010 
00011 *>  Copyright (c) 2007, All Rights Reserved.
00012 **********************************************************************/
00013 
00014 #pragma once
00015 
00016 #include "iFnPub.h"
00017 #include "GetCOREInterface.h"
00018 // forward declarations
00019 class ViewExp;
00020 
00021 #define IVIEWPORTSHADINGMGR_INTERFACE Interface_ID(0x7eba45d1, 0x2b3d454b)
00022 #define IVIEWPORTSHADINGMGR2_INTERFACE Interface_ID(0x245b423f, 0x9df3b47)
00023 
00025 
00035 class IViewportShadingMgr : public FPStaticInterface
00036 {
00037 
00038 public:
00039     enum EViewportDisplayQuality
00040     {
00041         kNone,  
00042         kGood,  
00043         kBest,  
00044     };
00045 
00047     enum EViewportLightFlags{
00048         kShadowCasting, 
00049         kIlluminating,  
00050         kLocked,        
00051     };
00052     
00054 
00060     virtual void SetViewportShadingLimits(int limit, bool bQuiet = true)=0;
00061 
00063 
00066     virtual int GetViewportShadingLimits()=0;
00067 
00069 
00075     virtual bool GetAutoDisplayOfSelLights()=0;
00076 
00078 
00084     virtual void SetAutoDisplayOfSelLights(bool bSet)=0;
00085 
00087 
00090     virtual void SetCastShadowDefaultLights(bool bSet)=0;
00091 
00093 
00096     virtual bool GetCastShadowDefaultLights()=0;
00097 
00099 
00102     virtual void DisplayOnlySelectedLights()=0;
00103 
00105 
00110     virtual void LockSelectedLights(bool bSet)=0;
00111 
00113 
00118     virtual void GetViewportShadingLights(Tab<INode*> &lightList, int type) = 0;
00119 
00121 
00126     virtual void SetGlobalShadowIntensity(float intensity) = 0;
00127 
00129 
00132     virtual float GetGlobalShadowIntensity()=0;
00133 
00135 
00139     virtual void SetUseTransparencyInShadows(bool bSet) = 0;
00140 
00142 
00145     virtual bool GetUseTransparencyInShadows() = 0;
00146 
00148 
00152     virtual void SetUpdateShadowInActiveViewOnly(bool bSet) =0;
00153 
00155 
00158     virtual bool GetUpdateShadowInActiveViewOnly()=0;
00159 
00161 
00168     virtual bool IsShadingLimitValid(int limit)=0;
00169 
00171 
00179     virtual Color GetLightIconColor(INode &lightNode)=0;
00180 
00182     virtual void SetUseTransparencyInGI(bool bSet) =0;
00183 
00185     virtual bool GetUseTransparencyInGI() = 0;
00186 
00188 
00193     virtual void SetShadowFilterSize(float filterSize)=0;
00194 
00196 
00199     virtual float GetShadowFilterSize()=0;
00200 
00201 };
00202 
00206 class IViewportShadingMgr2  : public IViewportShadingMgr
00207 {
00208 public:
00209     //* Get the active viewport's hardware enabled flag.  
00218     virtual bool IsHWShadingEnabled(bool bCurrentlyTraversed = false)const=0;
00219 
00221 
00225     virtual bool IsHWShadingEnabled(const ViewExp &view)const=0;
00226 };
00227 
00228 
00229 inline IViewportShadingMgr* GetIViewportShadingMgr() {
00230 
00231     return dynamic_cast<IViewportShadingMgr*>(GetCOREInterface(IVIEWPORTSHADINGMGR_INTERFACE));
00232 };
00233 
00234 inline IViewportShadingMgr2* GetIViewportShadingMgr2() 
00235 {
00236     IViewportShadingMgr * lpVpMgr = GetIViewportShadingMgr();
00237     return dynamic_cast<IViewportShadingMgr2*>(lpVpMgr->GetInterface(IVIEWPORTSHADINGMGR2_INTERFACE));
00238 };
00239 
00240