IBatchRenderManager.h

Go to the documentation of this file.
00001  /**********************************************************************
00002  
00003     FILE:           IBatchRenderManager.h
00004 
00005     DESCRIPTION:    Public interface to the batch renderer
00006 
00007     CREATED BY:     Christer Janson, Autodesk, Inc.
00008 
00009     HISTORY:        Created November 2004
00010 
00011  *> Copyright (c) 2004, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 #include "Noncopyable.h"
00016 #include "iFnPub.h"
00017 #include "assetmanagement\AssetUser.h"
00018 #include "GetCOREInterface.h"
00019 #include "FileEnumConstants.h"
00020 
00021 // forward declarations
00022 class BitmapInfo;
00023 class AssetEnumCallback;
00024 
00026 
00027 class IBatchRenderView : public FPMixinInterface , public MaxSDK::Util::Noncopyable
00028 {
00029 public:
00031 
00033     virtual INode*          GetCamera() = 0;
00035 
00037     virtual bool            SetCamera(INode* node) = 0;
00039 
00042     virtual int             GetWidth() = 0;
00044 
00048     virtual bool            SetWidth(int width) = 0;
00050 
00053     virtual int             GetHeight() = 0;
00055 
00059     virtual bool            SetHeight(int height) = 0;
00061 
00064     virtual TimeValue       GetStart() = 0;
00066 
00069     virtual void            SetStart(TimeValue start) = 0;
00071 
00074     virtual TimeValue       GetEnd() = 0;
00076 
00079     virtual void            SetEnd(TimeValue end) = 0;
00081 
00082     virtual const MCHAR*    GetName() = 0;
00084 
00087     virtual bool            SetName(const MCHAR* name) = 0;
00089 
00090     virtual const MaxSDK::AssetManagement::AssetUser& GetPresetFile() = 0;
00092 
00093     virtual void            SetPresetFile(const MaxSDK::AssetManagement::AssetUser& preset) = 0;
00095 
00097     virtual bool            GetFullPresetPath(MSTR& path) = 0;
00099 
00100     virtual const MCHAR*    GetSceneState() = 0;
00102 
00103     virtual void            SetSceneState(const MCHAR* sceneState) = 0;
00105 
00106     virtual bool            GetEnabled() = 0;
00108 
00109     virtual void            SetEnabled(bool enabled) = 0;
00111 
00112     virtual BitmapInfo*     GetFileOutputInfo() = 0;
00114 
00115     virtual void            SetFileOutputInfo(BitmapInfo* bi) = 0;
00117 
00120     virtual float           GetAspect() = 0;
00122 
00125     virtual void            SetAspect(float pixelAspect) = 0;
00127 
00131     virtual bool            GetOverridePreset() = 0;
00133 
00137     virtual void            SetOverridePreset(bool override) = 0;
00138 
00139     enum 
00140     { 
00141         E_GET_CAMERA,
00142         E_SET_CAMERA,
00143         E_GET_WIDTH,
00144         E_SET_WIDTH,
00145         E_GET_HEIGHT,
00146         E_SET_HEIGHT,
00147         E_GET_START,
00148         E_SET_START,
00149         E_GET_END,
00150         E_SET_END,
00151         E_GET_NAME,
00152         E_SET_NAME,
00153         E_GET_PRESET,
00154         E_SET_PRESET,
00155         E_GET_FULL_PRESETPATH,
00156         E_GET_SCENESTATE,
00157         E_SET_SCENESTATE,
00158         E_GET_ENABLED,
00159         E_SET_ENABLED,
00160 
00161         E_GET_FILENAME,
00162         E_SET_FILENAME,
00163 
00164         E_GET_ASPECT,
00165         E_SET_ASPECT,
00166         E_GET_OVERRIDE_PRESET,
00167         E_SET_OVERRIDE_PRESET,
00168     }; 
00169 };
00170 
00172 
00173 class IBatchRenderManager : public FPStaticInterface 
00174 {
00175 public:
00177 
00178     virtual int GetViewCount() = 0;
00180 
00182     virtual IBatchRenderView* GetView(int i) = 0;
00184 
00186     virtual int FindView(const MCHAR* name) = 0;
00188     virtual void Render() = 0;
00190 
00194     virtual IBatchRenderView* CreateView(INode* camera) = 0;
00196 
00198     virtual bool DeleteView(int i) = 0;
00200 
00203     IBatchRenderView*   DuplicateView(int i);
00205 
00206     virtual bool GetNetRender() = 0;
00208 
00209     virtual void SetNetRender(bool b) = 0;
00211 
00213     virtual bool GetKeepVFB() = 0;
00215 
00217     virtual void SetKeepVFB(bool b) = 0;
00219 
00222     virtual bool PrepareScene(IBatchRenderView* batchView) = 0;
00224     virtual void DoManageDialog() = 0;
00226 
00228     virtual void EnumAuxFiles(AssetEnumCallback& nameEnum, DWORD flags = FILE_ENUM_ALL) = 0;
00229 
00230     // Function IDs for function publishing
00231     enum 
00232     { 
00233         E_GET_COUNT,
00234         E_GET_VIEW,
00235         E_FIND_VIEW,
00236         E_CREATE_VIEW,
00237         E_DELETE_VIEW,
00238         E_DUPLICATE_VIEW,
00239         E_RENDER,
00240         E_GET_KEEP_VFB,
00241         E_SET_KEEP_VFB,
00242         E_GET_NETRENDER,
00243         E_SET_NETRENDER
00244     }; 
00245 };
00246 
00248 #define IID_IBatchRenderManager Interface_ID(0x873B70BE, 0x4BEF3BB8)
00249 
00250 inline IBatchRenderManager* GetBatchRenderManager() { return static_cast<IBatchRenderManager*>(GetCOREInterface(IID_IBatchRenderManager)); }
00251 
00253 #define IID_IBatchRenderView Interface_ID(0xB35ED920, 0xC5270C0B)
00254