Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #pragma once
00017
00018 #include "notify.h"
00019 #include "iImageViewer.h"
00020 #include "render.h"
00021
00022
00023
00024
00034 class IRenderProgressCallback : public RendProgressCallback
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 {
00052 public:
00053
00054
00055
00056
00057 enum LineOrientation { LO_Horizontal = 0, LO_Vertical };
00058
00059
00066 virtual void SetProgressLineOrientation(LineOrientation orientation) = 0;
00071 virtual LineOrientation GetProgressLineOrientation() const = 0;
00072
00073
00079 virtual void SetProgressLineColor(const Color& color) = 0;
00082 virtual const Color& GetProgressLineColor() const = 0;
00083
00084
00085
00092 virtual void SetIRenderTitle(const MCHAR *pProgressTitle) = 0;
00094 virtual const MCHAR *GetIRenderTitle() const = 0;
00095 };
00096
00097
00098
00099
00100
00107 class IIRenderMgrSelector : public InterfaceServer
00108 {
00109 public:
00110
00118 virtual BOOL IsSelected(INode* pINode) { UNUSED_PARAM(pINode); return TRUE; }
00119 };
00120
00121
00122
00123
00124
00125 #define ID_IRENDER_PRESHADE 40601
00126 #define ID_IRENDER_RESHADE 40602
00127 #define ID_IRENDER_AUTOMATIC_PRESHADE 40603
00128 #define ID_IRENDER_AUTOMATIC_RESHADE 40604
00129 #define ID_IRESHADE_TOGGLE_TOOLBAR_DOCKED 40710
00130 #define ID_IRESHADE_ACT_ONLY_MOUSE_UP 40714
00131
00132
00133
00134
00135
00141 class IIRenderMgr : public InterfaceServer
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152 {
00153 public:
00154 enum CommandMode
00155 {
00156 CMD_MODE_NULL = 0,
00157 CMD_MODE_DRAW_REGION,
00158 CMD_MODE_SELECT_OBJECT,
00159 };
00160
00163 virtual bool CanExecute() = 0;
00169 virtual void SetActive(bool active) = 0;
00171 virtual MCHAR* GetName() = 0;
00174 virtual bool IsActive() = 0;
00177 virtual HWND GetHWnd() const = 0;
00180 virtual ViewExp *GetViewExp() = 0;
00188 virtual void SetPos(int X, int Y, int W, int H) = 0;
00191 virtual void Show() = 0;
00194 virtual void Hide() = 0;
00196 virtual void UpdateDisplay() = 0;
00198 virtual void Render() = 0;
00201 virtual void SetDelayTime(int msecDelay) = 0;
00203 virtual int GetDelayTime() = 0;
00206 virtual void Close() = 0;
00208 virtual void Delete() = 0;
00209
00210
00216 virtual void SetCommandMode(CommandMode commandMode) = 0;
00220 virtual CommandMode GetCommandMode() const = 0;
00221
00222
00230 virtual void SetActOnlyOnMouseUp(bool actOnlyOnMouseUp) = 0;
00234 virtual bool GetActOnlyOnMouseUp() const = 0;
00235
00236
00239 virtual void ToggleToolbar() const = 0;
00240
00241
00245 virtual IImageViewer::DisplayStyle GetDisplayStyle() const = 0;
00246
00247
00250 virtual BOOL IsRendering() = 0;
00251
00252
00255 virtual BOOL AreAnyNodesSelected() const = 0;
00256
00257
00260 virtual IIRenderMgrSelector* GetNodeSelector() = 0;
00261
00262
00263
00264
00266 static IIRenderMgr* GetActiveIIRenderMgr();
00268 static unsigned int GetNumIIRenderMgrs();
00270 static IIRenderMgr* GetIIRenderMgr(unsigned int i);
00271 };
00272
00273
00274 class IQuadMenuContext;
00275
00276
00277
00278
00279
00280
00281 enum { I_RENDER_ID = 0x12345678 };
00282
00283
00284
00285
00286
00314 class IInteractiveRender : public InterfaceServer
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325 {
00326 public:
00327
00355 virtual void BeginSession() = 0;
00358 virtual void EndSession() = 0;
00359
00360
00368 virtual void SetOwnerWnd(HWND hOwnerWnd) = 0;
00370 virtual HWND GetOwnerWnd() const = 0;
00371
00372
00378 virtual void SetIIRenderMgr(IIRenderMgr *pIIRenderMgr) = 0;
00385 virtual IIRenderMgr *GetIIRenderMgr(IIRenderMgr *pIIRenderMgr) const = 0;
00386
00387
00396 virtual void SetBitmap(Bitmap *pDestBitmap) = 0;
00403 virtual Bitmap *GetBitmap(Bitmap *pDestBitmap) const = 0;
00404
00405
00414 virtual void SetSceneINode(INode *pSceneINode) = 0;
00416 virtual INode *GetSceneINode() const = 0;
00417
00418
00426 virtual void SetUseViewINode(bool bUseViewINode) = 0;
00429 virtual bool GetUseViewINode() const = 0;
00430
00431
00437 virtual void SetViewINode(INode *pViewINode) = 0;
00440 virtual INode *GetViewINode() const = 0;
00441
00442
00449 virtual void SetViewExp(ViewExp *pViewExp) = 0;
00452 virtual ViewExp *GetViewExp() const = 0;
00453
00454
00466 virtual void SetRegion(const Box2 ®ion) = 0;
00470 virtual const Box2 &GetRegion() const = 0;
00471
00472
00483 virtual void SetDefaultLights(DefaultLight *pDefLights, int numDefLights) = 0;
00489 virtual const DefaultLight *GetDefaultLights(int &numDefLights) const = 0;
00490
00491
00500 virtual void SetProgressCallback(IRenderProgressCallback *pProgCB) = 0;
00503 virtual const IRenderProgressCallback *GetProgressCallback() const = 0;
00504
00505
00512 virtual void Render(Bitmap *pDestBitmap) = 0;
00513
00514
00515
00524 virtual ULONG GetNodeHandle(int x, int y) = 0;
00525
00526
00535 virtual bool GetScreenBBox(Box2& sBBox, INode *pINode) = 0;
00536
00537
00542 virtual ActionTableId GetActionTableId() = 0;
00543
00544
00548 virtual ActionCallback *GetActionCallback() = 0;
00549
00550
00555 virtual void *GetInterface() { return NULL; }
00556
00557
00569 virtual BOOL IsRendering() = 0;
00570
00571 };