00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #pragma once
00012
00013
00014 #include "maxheap.h"
00015 #include "sfx.h"
00016 #include "buildver.h"
00017 #include "iTargetedIO.h"
00018 #include "RendType.h"
00019 #include "object.h"
00020
00021 #define FIELD_EVEN 0
00022 #define FIELD_ODD 1
00023
00024 #pragma warning(push)
00025 #pragma warning(disable:4100)
00026
00038 class DefaultLight: public MaxHeapOperators
00039 {
00040 public:
00041 LightState ls;
00042 Matrix3 tm;
00043 };
00044
00112 class ViewParams : public BaseInterfaceServer {
00113 public:
00114 Matrix3 prevAffineTM;
00115 Matrix3 affineTM;
00116 int projType;
00117 float hither,yon;
00118 float distance;
00119
00120 float zoom;
00121
00122 float fov;
00123 float nearRange;
00124 float farRange;
00125
00141 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
00142 };
00143
00144
00145
00146
00147
00148
00149
00150
00151 class RadiosityEffect;
00152 class ToneOperator;
00153
00155
00156
00158 #define RENDER_R25SHADOWS (1L << 2)
00159
00162 #define RENDER_HIDE_FROZEN (1L << 3)
00163
00164
00165
00272 class RendParams: public MaxHeapOperators
00273 {
00274 private:
00275 IRenderElementMgr *mpIRenderElementMgr;
00276
00277 public:
00279 enum RenderMode
00280 {
00281 RM_Default,
00282 RM_IReshade,
00283 };
00284
00286 enum Execute_Commands {
00289 kCommand_IsToneOpPreview = 0x4e80014c
00290 };
00291
00292 RendType rendType;
00293
00294
00295
00296 BOOL isNetRender;
00297 BOOL fieldRender;
00298 int fieldOrder;
00299 TimeValue frameDur;
00300
00301 BOOL colorCheck;
00302 int vidCorrectMethod;
00303 int ntscPAL;
00304 BOOL superBlack;
00305 int sbThresh;
00306 BOOL rendHidden;
00307 BOOL force2Side;
00308 BOOL inMtlEdit;
00309 float mtlEditTile;
00310 BOOL mtlEditAA;
00311 BOOL multiThread;
00312 BOOL useEnvironAlpha;
00313 BOOL dontAntialiasBG;
00314 BOOL useDisplacement;
00315 bool useRadiosity;
00316 bool computeRadiosity;
00317 Texmap *envMap;
00318 Atmospheric *atmos;
00319 Effect *effect;
00320 RadiosityEffect* pRadiosity;
00321 ToneOperator* pToneOp;
00322 TimeValue firstFrame;
00323 int scanBandHeight;
00324 ULONG extraFlags;
00325 int width,height;
00326 BOOL filterBG;
00327 BOOL alphaOutOnAdditive;
00328 #ifdef SIMPLIFY_AREA_LIGHTS
00329 bool simplifyAreaLights;
00330 #endif
00331
00334 RendParams()
00335 {
00336 rendType = RENDTYPE_NORMAL;
00337 isNetRender = FALSE;
00338 fieldRender = FALSE;
00339 fieldOrder = 0;
00340 frameDur = 0;
00341 colorCheck = 0;
00342 vidCorrectMethod = 0;
00343 ntscPAL = 0;
00344 superBlack = 0;
00345 sbThresh = 0;
00346 rendHidden = 0;
00347 force2Side = 0;
00348 inMtlEdit = 0;
00349 mtlEditTile = 0;
00350 mtlEditAA = 0;
00351 multiThread = 0;
00352 useEnvironAlpha = 0;
00353 dontAntialiasBG = 0;
00354 useDisplacement = 0;
00355 useRadiosity = true;
00356 computeRadiosity = true;
00357 envMap = NULL;
00358 atmos = NULL;
00359 mpIRenderElementMgr = NULL;
00360 effect = NULL;
00361 pRadiosity = NULL;
00362 pToneOp = NULL;
00363 firstFrame = 0;
00364 scanBandHeight = 0;
00365 extraFlags = 0;
00366 width=height = 0;
00367 filterBG = 0;
00368 #ifdef SIMPLIFY_AREA_LIGHTS
00369 simplifyAreaLights = false;
00370 #endif
00371 }
00372
00374 virtual ~RendParams() {}
00375
00381 RenderMode GetRenderMode() { return RM_Default; }
00386 void SetRenderElementMgr(IRenderElementMgr *pIRenderElementMgr) { mpIRenderElementMgr = pIRenderElementMgr; }
00387
00388 #define RP_ANTIALIAS_OFF 200 //!< An index to an external command. Can be accepted as the argument to Execute()
00389
00391 IRenderElementMgr *GetRenderElementMgr() {
00392 return( Execute(RP_ANTIALIAS_OFF) ? NULL : mpIRenderElementMgr);
00393 }
00394
00410 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
00411
00412
00413 bool IsToneOperatorPreviewRender();
00414 };
00415
00416 inline bool RendParams::IsToneOperatorPreviewRender() {
00417
00418
00419 INT_PTR result = Execute(kCommand_IsToneOpPreview);
00420 return (result != 0);
00421 }
00422
00423
00467 class FrameRendParams : public BaseInterfaceServer {
00468 public:
00469 Color ambient;
00470 Color background;
00471 Color globalLightLevel;
00472 float frameDuration;
00473 float relSubFrameDuration;
00474
00475
00476 int regxmin,regxmax;
00477 int regymin,regymax;
00478
00479
00480 Point2 blowupCenter;
00481 Point2 blowupFactor;
00482
00485 FrameRendParams() { frameDuration = 1.0f; relSubFrameDuration = 1.0f; }
00501 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
00502 };
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00523 class RendParamDlg: public MaxHeapOperators {
00524 public:
00526 virtual ~RendParamDlg() { }
00530 virtual void AcceptParams()=0;
00536 virtual void RejectParams() {}
00539 virtual void DeleteThis()=0;
00540 };
00541
00542
00546 #define BROWSE_MATSONLY (1<<0) //!< Materials only
00547 #define BROWSE_MAPSONLY (1<<1) //!< Maps only
00548 #define BROWSE_INCNONE (1<<2) //!< Include 'None' as an option
00549 #define BROWSE_INSTANCEONLY (1<<3) //!< Only allow instances, no copy
00550 #define BROWSE_TO_MEDIT_SLOT (1<<4) //!< browsing to medit slot
00551 #define BROWSE_EXISTING_ONLY (1<<5) //!< Browse for existing materials only; no new materials.
00552
00553
00554
00555
00560 class RendPickProc: public MaxHeapOperators
00561 {
00562 public:
00564 virtual ~RendPickProc() { }
00565
00566
00567
00573 virtual BOOL Pick(INode *node)=0;
00574
00575
00580 virtual BOOL Filter(INode *node)=0;
00581
00582
00586 virtual void EnterMode() {}
00590 virtual void ExitMode() {}
00591
00592
00597 virtual HCURSOR GetDefCursor() {return NULL;}
00602 virtual HCURSOR GetHitCursor() {return NULL;}
00603
00604
00605
00612 virtual BOOL AllowMultiSelect() {return FALSE;}
00613 };
00614
00615 class ITabbedDialog;
00616 class ITabPage;
00617
00618
00619
00625 class IRendParams : public InterfaceServer
00626 {
00627 public:
00628
00630 virtual TimeValue GetTime()=0;
00631
00637 virtual void RegisterTimeChangeCallback(TimeChangeCallback *tc)=0;
00643 virtual void UnRegisterTimeChangeCallback(TimeChangeCallback *tc)=0;
00644
00645
00646
00647
00648
00661 virtual MtlBase *DoMaterialBrowseDlg(HWND hParent,DWORD flags,BOOL &newMat,BOOL &cancel)=0;
00662
00663
00664
00700 virtual HWND AddRollupPage(
00701 HINSTANCE hInst,
00702 MCHAR *dlgTemplate,
00703 DLGPROC dlgProc,
00704 MCHAR *title,
00705 LPARAM param=0,
00706 DWORD flags=0,
00707 int category = ROLLUP_CAT_STANDARD)=0;
00708
00744 virtual HWND AddRollupPage(
00745 HINSTANCE hInst,
00746 DLGTEMPLATE *dlgTemplate,
00747 DLGPROC dlgProc,
00748 MCHAR *title,
00749 LPARAM param=0,
00750 DWORD flags=0,
00751 int category = ROLLUP_CAT_STANDARD)=0;
00752
00753
00759 virtual void DeleteRollupPage(HWND hRollup)=0;
00760
00761
00762
00778 virtual void RollupMouseMessage(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)=0;
00779
00780
00781
00782
00789 virtual void SetPickMode(RendPickProc *proc)=0;
00790
00791
00792
00793
00797 virtual void EndPickMode()=0;
00798
00799
00800
00801
00808 virtual void PutMtlToMtlEditor(MtlBase *mb)=0;
00809
00810
00812 virtual float GetMaxPixelSize() = 0;
00813
00829 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
00830
00831
00832 virtual IRollupWindow* GetIRollup()=0;
00833
00834
00835
00836 virtual HWND AddTabRollupPage(const Class_ID& id, HINSTANCE hInst, MCHAR *dlgTemplate,
00837 DLGPROC dlgProc, MCHAR *title, LPARAM param=0, DWORD flags=0, int category = ROLLUP_CAT_STANDARD)
00838 {
00839 return AddRollupPage(hInst, dlgTemplate, dlgProc, title, param, flags, category);
00840 }
00841
00842 virtual HWND AddTabRollupPage(const Class_ID& id, HINSTANCE hInst, DLGTEMPLATE *dlgTemplate,
00843 DLGPROC dlgProc, MCHAR *title, LPARAM param=0, DWORD flags=0, int category = ROLLUP_CAT_STANDARD)
00844 {
00845 return AddRollupPage(hInst, dlgTemplate, dlgProc, title, param, flags, category);
00846 }
00847
00848
00849 virtual void DeleteTabRollupPage(const Class_ID& id, HWND hRollup)
00850 {
00851 DeleteRollupPage(hRollup);
00852 }
00853
00854
00855
00856 virtual void RollupTabMouseMessage(const Class_ID& id, HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
00857 {
00858 RollupMouseMessage(hDlg, message, wParam, lParam);
00859 }
00860
00861
00862 virtual IRollupWindow* GetTabIRollup(const Class_ID& id)
00863 {
00864 return GetIRollup();
00865 }
00866
00867
00868 virtual ITabbedDialog* GetTabDialog()
00869 {
00870 return NULL;
00871 }
00872
00873
00874 virtual ITabPage* GetTabPage(const Class_ID& id)
00875 {
00876 return NULL;
00877 }
00878 };
00879
00880
00882
00883 #define INST_HIDE (1<<0) //!< instance is hidden
00884 #define INST_CLIP (1<<1) //!< clip instance: ray tracers should skip it
00885 #define INST_BLUR (1<<2) //!< secondary motion blur instance
00886 #define INST_RCV_SHADOWS (1<<3) //!< instance receives shadows
00887 #define INST_TM_NEGPARITY (1<<4) //!< mesh is inside-out: need to reverse normals on-the-fly
00888 #define INST_MTL_BYFACE (1<<5) //!<instance's object supports mtl-by-face interface ( chkmtlapi.h)
00889
00890
00891
00950 class RenderInstance: public MaxHeapOperators
00951 {
00952 public:
00953 ULONG flags;
00954 Mtl *mtl;
00955 float wireSize;
00956 Mesh *mesh;
00957 float vis;
00958 int nodeID;
00959 int objMotBlurFrame;
00960 int objBlurID;
00961 Matrix3 objToWorld;
00962 Matrix3 objToCam;
00963 Matrix3 normalObjToCam;
00964 Matrix3 camToObj;
00965 Box3 obBox;
00966 Point3 center;
00967 float radsq;
00968
00970 virtual ~RenderInstance() {}
00971
00978 void SetFlag(ULONG f, BOOL b) { if (b) flags |= f; else flags &= ~f; }
00983 void SetFlag(ULONG f) { flags |= f; }
00988 void ClearFlag(ULONG f) { flags &= ~f; }
00994 BOOL TestFlag(ULONG f) { return flags&f?1:0; }
00995 BOOL Hidden() { return TestFlag(INST_HIDE); }
00996 BOOL IsClip() { return TestFlag(INST_CLIP); }
00997
01001 virtual RenderInstance *Next()=0;
01002
01005 virtual Interval MeshValidity()=0;
01007 virtual int NumLights()=0;
01013 virtual LightDesc *Light(int n)=0;
01014
01021 virtual BOOL CastsShadowsFrom(const ObjLightDesc& lt)=0;
01022
01024 virtual INode *GetINode()=0;
01029 virtual Object *GetEvalObject()=0;
01042 virtual ULONG MtlRequirements(int mtlNum, int faceNum)=0;
01048 virtual Point3 GetFaceNormal(int faceNum)=0;
01056 virtual Point3 GetFaceVertNormal(int faceNum, int vertNum)=0;
01064 virtual void GetFaceVertNormals(int faceNum, Point3 n[3])=0;
01070 virtual Point3 GetCamVert(int vertnum)=0;
01078 virtual void GetObjVerts(int fnum, Point3 obp[3])=0;
01086 virtual void GetCamVerts(int fnum, Point3 cp[3])=0;
01104 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
01105
01106
01107
01108
01109
01119 virtual Mtl *GetMtl(int faceNum)=0;
01120 };
01121
01122
01123
01125
01126 #define RENDPROG_CONTINUE 1 //!< Continue to Process
01127 #define RENDPROG_ABORT 0 //!< Stop Processing
01128
01129
01131
01132 #define FIELD_FIRST 0
01133 #define FIELD_SECOND 1
01134 #define FIELD_NONE -1
01135
01136
01137
01146
01147 class RendProgressCallback: public MaxHeapOperators
01148 {
01149 public:
01151 virtual ~RendProgressCallback() { }
01157 virtual void SetTitle(const MCHAR *title)=0;
01168 virtual int Progress(int done, int total)=0;
01175 virtual void SetCurField(int which) {}
01190 virtual void SetSceneStats(int nlights, int nrayTraced, int nshadowed, int nobj, int nfaces) {}
01191 };
01192
01193
01194
01195
01196
01198
01213 class Renderer : public ReferenceTarget
01214 {
01215 public:
01216
01218 SClass_ID SuperClassID() {return RENDERER_CLASS_ID;}
01219
01222
01238 virtual int Open(
01239 INode *scene,
01240 INode *vnode,
01241 ViewParams *viewPar,
01242 RendParams &rp,
01243 HWND hwnd,
01244 DefaultLight* defaultLights=NULL,
01245 int numDefLights=0,
01246 RendProgressCallback* prog = NULL
01247 ) = 0;
01248
01250
01263 virtual int Render(
01264 TimeValue t,
01265 Bitmap *tobm,
01266 FrameRendParams &frp,
01267 HWND hwnd,
01268 RendProgressCallback *prog=NULL,
01269 ViewParams *viewPar=NULL
01270 )=0;
01271
01274
01281 virtual void Close( HWND hwnd, RendProgressCallback* prog = NULL )=0;
01282
01283
01284
01285
01286
01288
01298 virtual bool ApplyRenderEffects(TimeValue t, Bitmap *pBitmap, bool updateDisplay=true) { return false; }
01299
01300
01301
01302
01305
01313 virtual RendParamDlg *CreateParamDialog(IRendParams *ir,BOOL prog=FALSE)=0;
01314
01316 virtual void ResetParams()=0;
01317 virtual int GetAAFilterSupport(){ return 0; }
01318
01320
01324 virtual bool SupportsTexureBaking() { return false; }
01325
01327
01328 virtual bool SupportsCustomRenderPresets() { return false; }
01329
01331
01333 virtual int RenderPresetsFileVersion() { return -1; }
01334
01336
01338 virtual BOOL RenderPresetsIsCompatible( int version ) { return false; }
01339
01341
01344 virtual MCHAR * RenderPresetsMapIndexToCategory( int catIndex ) { return NULL; }
01345
01347
01349 virtual int RenderPresetsMapCategoryToIndex( const MCHAR* category ) { return 0; }
01350
01351
01352 virtual int RenderPresetsMapCategoryToIndex( MCHAR* category ) { return RenderPresetsMapCategoryToIndex( const_cast<const MCHAR*>(category));}
01353
01355
01375 virtual int RenderPresetsPreSave( ITargetedIO * root, BitArray saveCategories ) { return -1; }
01376
01378
01380 virtual int RenderPresetsPostSave( ITargetedIO * root, BitArray loadCategories ) { return -1; }
01381
01383
01390 virtual int RenderPresetsPreLoad( ITargetedIO * root, BitArray saveCategories ) { return -1; }
01391
01393
01403 virtual int RenderPresetsPostLoad( ITargetedIO * root, BitArray loadCategories ) { return -1; }
01404 };
01405
01406
01407 class ShadowBuffer;
01408 class ShadowQuadTree;
01409
01418 class RendContext: public MaxHeapOperators
01419 {
01420 public:
01422 virtual ~RendContext() {}
01432 virtual int Progress(int done, int total) const { return 1; }
01434
01436 virtual Color GlobalLightLevel() const = 0;
01437 };
01438
01443 struct SubRendParams : public BaseInterfaceServer
01444 {
01446 RendType rendType;
01448 BOOL fieldRender;
01450 BOOL evenLines;
01452 BOOL doingMirror;
01453 BOOL doEnvMap;
01455 int devWidth, devHeight;
01457 float devAspect;
01459 int xorg, yorg;
01461 int xmin,xmax,ymin,ymax;
01462
01463
01466 Point2 blowupCenter;
01469 Point2 blowupFactor;
01470
01487 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
01488 };
01489
01490 #define RENDMAP_SHOW_NODE 1 // DO NOT exclude this node from the render. An argument for RenderMapsContext::Render()
01491
01492
01493
01494
01503 class RenderMapsContext: public MaxHeapOperators
01504 {
01505 public:
01507 virtual ~RenderMapsContext() { }
01511 virtual INode *GetNode()=0;
01518 virtual int NodeRenderID()=0;
01523 virtual void GetCurrentViewParams(ViewParams &vp)=0;
01528 virtual void GetSubRendParams(SubRendParams &srp)=0;
01531 virtual int SubMtlIndex()=0;
01532 virtual void SetSubMtlIndex(int mindex)=0;
01541 virtual void FindMtlPlane(float pl[4])=0;
01553 virtual void FindMtlScreenBox(Rect &sbox, Matrix3* viewTM=NULL, int mtlIndex=-1)=0;
01557 virtual Box3 CameraSpaceBoundingBox()=0;
01561 virtual Box3 ObjectSpaceBoundingBox()=0;
01563 virtual Matrix3 ObjectToWorldTM()=0;
01566 virtual RenderGlobalContext *GetGlobalContext() { return NULL; }
01567
01568
01569
01590 virtual int Render(Bitmap *bm, ViewParams &vp, SubRendParams &srp, Point4 *clipPlanes=NULL, int nClipPlanes=0)=0;
01606 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
01607 };
01608
01609
01610 #define DONT_CLIP 1.0E38f
01611
01612
01614
01615 #define SCANLINE_RENDERER_INTERFACE Interface_ID(0x342323, 0x551665)
01616 #define SCANLINE_RENDERER3_INTERFACE Interface_ID(0x44e40bbc, 0x52bc7cd1)
01617
01618
01619 #define GetScanRendererInterface(obj) ((IScanRenderer2*)obj->GetInterface(SCANLINE_RENDERER_INTERFACE))
01620 #define GetScanRendererInterface3(obj) ((IScanRenderer3*)obj->GetInterface(SCANLINE_RENDERER3_INTERFACE))
01621
01622
01623
01624
01625 class FilterKernel;
01632 class IScanRenderer: public Renderer {
01633 public:
01639 virtual void SetAntialias(BOOL b) = 0;
01641 virtual BOOL GetAntialias() = 0;
01642
01647 virtual void SetFilter(BOOL b) = 0;
01648
01650 virtual BOOL GetFilter() = 0;
01651
01656 virtual void SetShadows(BOOL b) = 0;
01659 virtual BOOL GetShadows() = 0;
01664 virtual void SetMapping(BOOL b) = 0;
01666 virtual BOOL GetMapping() = 0;
01671 virtual void SetForceWire(BOOL b) = 0;
01673 virtual BOOL GetForceWire() = 0;
01679 virtual void SetAutoReflect(BOOL b)=0;
01681 virtual BOOL GetAutoReflect()=0;
01682
01683
01688 virtual void SetObjMotBlur(BOOL b) = 0;
01689
01691 virtual BOOL GetObjMotBlur() = 0;
01692
01693
01698 virtual void SetVelMotBlur(BOOL b) = 0;
01699
01701 virtual BOOL GetVelMotBlur() = 0;
01702
01703
01705 virtual void SetPixelSize(float size) = 0;
01706
01712 virtual void SetAutoReflLevels(int n) = 0;
01717 virtual void SetWireThickness(float t) = 0;
01718
01719 virtual void SetObjBlurDuration(float dur) = 0;
01720 virtual void SetVelBlurDuration(float dur) = 0;
01725 virtual void SetNBlurFrames(int n) = 0;
01731 virtual void SetNBlurSamples(int n) = 0;
01732
01733
01739 virtual void SetMaxRayDepth(int n) = 0;
01741 virtual int GetMaxRayDepth() { return 7; }
01742
01743
01748 virtual void SetAntiAliasFilter( FilterKernel * pKernel ) = 0;
01749
01752 virtual FilterKernel * GetAntiAliasFilter() = 0;
01753
01758 virtual void SetAntiAliasFilterSz(float size) = 0;
01759
01761 virtual float GetAntiAliasFilterSz() = 0;
01762
01763
01768 virtual void SetPixelSamplerEnable( BOOL on ) = 0;
01769
01771 virtual BOOL GetPixelSamplerEnable() = 0;
01772 };
01773
01774
01775
01776
01777 class IScanRenderer2: public IScanRenderer, public FPMixinInterface {
01778 public:
01779
01780 enum { get_mapping, set_mapping,
01781 get_shadows, set_shadows,
01782 get_autoReflect, set_autoReflect,
01783 get_forceWire, set_forceWire,
01784 get_antialias, set_antialias,
01785 get_filter, set_filter,
01786 get_objMotBlur, set_objMotBlur,
01787 get_velMotBlur, set_velMotBlur,
01788 get_applyVelBlurEnv, set_applyVelBlurEnv,
01789 get_velBlurTrans, set_velBlurTrans,
01790 get_memFrugal, set_memFrugal,
01791 get_pixelSamplerEnable, set_pixelSamplerEnable,
01792 get_wireThickness, set_wireThickness,
01793 get_objBlurDuration, set_objBlurDuration,
01794 get_velBlurDuration, set_velBlurDuration,
01795 get_antiAliasFilterSz, set_antiAliasFilterSz,
01796 get_NBlurSamples, set_NBlurSamples,
01797 get_NBlurFrames, set_NBlurFrames,
01798 get_autoReflLevels, set_autoReflLevels,
01799 get_colorClampType, set_colorClampType,
01800 get_antiAliasFilter, set_antiAliasFilter,
01801 get_enableSSE, set_enableSSE,
01802
01803 get_globalSamplerEnabled, set_globalSamplerEnabled,
01804 get_globalSamplerClassByName, set_globalSamplerClassByName,
01805 get_globalSamplerSampleMaps, set_globalSamplerSampleMaps,
01806 get_globalSamplerQuality, set_globalSamplerQuality,
01807 get_globalSamplerAdaptive, set_globalSamplerAdaptive,
01808 get_globalSamplerAdaptiveThresh, set_globalSamplerAdaptiveThresh,
01809 get_globalSamplerParam1, set_globalSamplerParam1,
01810 get_globalSamplerParam2, set_globalSamplerParam2,
01811 };
01812
01813
01814
01815 #pragma warning(push)
01816 #pragma warning(disable:4238)
01817 BEGIN_FUNCTION_MAP
01818 PROP_FNS(get_mapping, GetMapping, set_mapping, SetMapping, TYPE_BOOL);
01819 PROP_FNS(get_shadows, GetShadows, set_shadows, SetShadows, TYPE_BOOL);
01820 PROP_FNS(get_autoReflect, GetAutoReflect, set_autoReflect, SetAutoReflect, TYPE_BOOL);
01821 PROP_FNS(get_forceWire, GetForceWire, set_forceWire, SetForceWire, TYPE_BOOL);
01822 PROP_FNS(get_antialias, GetAntialias, set_antialias, SetAntialias, TYPE_BOOL);
01823 PROP_FNS(get_filter, GetFilter, set_filter, SetFilter, TYPE_BOOL);
01824 PROP_FNS(get_objMotBlur, GetObjMotBlur, set_objMotBlur, SetObjMotBlur, TYPE_BOOL);
01825 PROP_FNS(get_velMotBlur, GetVelMotBlur, set_velMotBlur, SetVelMotBlur, TYPE_BOOL);
01826 PROP_FNS(get_applyVelBlurEnv, GetApplyVelBlurEnv, set_applyVelBlurEnv, SetApplyVelBlurEnv, TYPE_BOOL);
01827 PROP_FNS(get_velBlurTrans, GetVelBlurTrans, set_velBlurTrans, SetVelBlurTrans, TYPE_BOOL);
01828 PROP_FNS(get_memFrugal, GetMemFrugal, set_memFrugal, SetMemFrugal, TYPE_BOOL);
01829 PROP_FNS(get_pixelSamplerEnable, GetPixelSamplerEnable, set_pixelSamplerEnable, SetPixelSamplerEnable, TYPE_BOOL);
01830
01831 PROP_FNS(get_wireThickness, GetWireThickness, set_wireThickness, SetWireThickness, TYPE_FLOAT);
01832 PROP_FNS(get_objBlurDuration, GetObjBlurDuration, set_objBlurDuration, SetObjBlurDuration, TYPE_FLOAT);
01833 PROP_FNS(get_velBlurDuration, GetVelBlurDuration, set_velBlurDuration, SetVelBlurDuration, TYPE_FLOAT);
01834 PROP_FNS(get_antiAliasFilterSz, GetAntiAliasFilterSz, set_antiAliasFilterSz, SetAntiAliasFilterSz, TYPE_FLOAT);
01835
01836 PROP_FNS(get_NBlurSamples, GetNBlurSamples, set_NBlurSamples, SetNBlurSamples, TYPE_INT);
01837 PROP_FNS(get_NBlurFrames, GetNBlurFrames, set_NBlurFrames, SetNBlurFrames, TYPE_INT);
01838 PROP_FNS(get_autoReflLevels, GetAutoReflLevels, set_autoReflLevels, SetAutoReflLevels, TYPE_INT);
01839 PROP_FNS(get_colorClampType, GetColorClampType, set_colorClampType, SetColorClampType, TYPE_INT);
01840
01841 PROP_FNS(get_antiAliasFilter, GetAntiAliasFilter, set_antiAliasFilter, SetAntiAliasFilterRT, TYPE_REFTARG);
01842
01843 PROP_FNS(get_enableSSE, IsSSEEnabled, set_enableSSE, SetEnableSSE, TYPE_BOOL);
01844
01845 PROP_FNS(get_globalSamplerEnabled, GetGlobalSamplerEnabled, set_globalSamplerEnabled, SetGlobalSamplerEnabled, TYPE_BOOL);
01846 PROP_FNS(get_globalSamplerClassByName, GetGlobalSamplerClassByName, set_globalSamplerClassByName, SetGlobalSamplerClassByName, TYPE_TSTR_BV);
01847 PROP_FNS(get_globalSamplerSampleMaps, GetGlobalSamplerSampleMaps, set_globalSamplerSampleMaps, SetGlobalSamplerSampleMaps, TYPE_BOOL);
01848 PROP_FNS(get_globalSamplerQuality, GetGlobalSamplerQuality , set_globalSamplerQuality, SetGlobalSamplerQuality, TYPE_FLOAT);
01849 PROP_FNS(get_globalSamplerAdaptive, GetGlobalSamplerAdaptive, set_globalSamplerAdaptive, SetGlobalSamplerAdaptive, TYPE_BOOL);
01850 PROP_FNS(get_globalSamplerAdaptiveThresh, GetGlobalSamplerAdaptiveThresh, set_globalSamplerAdaptiveThresh, SetGlobalSamplerAdaptiveThresh, TYPE_FLOAT);
01851 PROP_FNS(get_globalSamplerParam1, GetGlobalSamplerParam1, set_globalSamplerParam1, SetGlobalSamplerParam1, TYPE_FLOAT);
01852 PROP_FNS(get_globalSamplerParam2, GetGlobalSamplerParam2, set_globalSamplerParam2, SetGlobalSamplerParam2, TYPE_FLOAT);
01853
01854 END_FUNCTION_MAP
01855 #pragma warning(pop)
01856
01857 FPInterfaceDesc* GetDesc();
01858
01859
01860 void SetAntiAliasFilterRT(ReferenceTarget* op) {
01861 if (op && op->SuperClassID( ) == FILTER_KERNEL_CLASS_ID)
01862 SetAntiAliasFilter(static_cast< FilterKernel* >(op));
01863 }
01864
01865 virtual float GetWireThickness() = 0;
01866 virtual void SetColorClampType (int i) = 0;
01867 virtual int GetColorClampType () = 0;
01868 virtual float GetObjBlurDuration() = 0;
01869 virtual int GetNBlurSamples() = 0;
01870 virtual int GetNBlurFrames() = 0;
01871 virtual float GetVelBlurDuration() = 0;
01872 virtual void SetApplyVelBlurEnv(BOOL b) = 0;
01873 virtual BOOL GetApplyVelBlurEnv() = 0;
01874 virtual void SetVelBlurTrans(BOOL b) = 0;
01875 virtual BOOL GetVelBlurTrans() = 0;
01876 virtual int GetAutoReflLevels() = 0;
01877 virtual void SetMemFrugal(BOOL b) = 0;
01878 virtual BOOL GetMemFrugal() = 0;
01879 virtual void SetEnableSSE(BOOL b) = 0;
01880 virtual BOOL IsSSEEnabled() = 0;
01881
01882
01883 virtual BOOL GetGlobalSamplerEnabled() = 0;
01884 virtual void SetGlobalSamplerEnabled(BOOL enable) = 0;
01885 virtual MSTR GetGlobalSamplerClassByName() = 0;
01886 virtual void SetGlobalSamplerClassByName(const MSTR) = 0;
01887 virtual BOOL GetGlobalSamplerSampleMaps() = 0;
01888 virtual void SetGlobalSamplerSampleMaps(BOOL enable) = 0;
01889 virtual float GetGlobalSamplerQuality() = 0;
01890 virtual void SetGlobalSamplerQuality(float f) = 0;
01891 virtual BOOL GetGlobalSamplerAdaptive() = 0;
01892 virtual void SetGlobalSamplerAdaptive(BOOL enable) = 0;
01893 virtual float GetGlobalSamplerAdaptiveThresh() = 0;
01894 virtual void SetGlobalSamplerAdaptiveThresh(float f) = 0;
01895 virtual float GetGlobalSamplerParam1() = 0;
01896 virtual void SetGlobalSamplerParam1(float f) = 0;
01897 virtual float GetGlobalSamplerParam2() = 0;
01898 virtual void SetGlobalSamplerParam2(float f) = 0;
01899 };
01900
01901 #if defined(SINGLE_SUPERSAMPLE_IN_RENDER)
01902
01903
01904
01905 class IScanRenderer3: public IScanRenderer2 {
01906 public:
01907
01908 virtual float GetSamplerQuality() = 0;
01909 virtual void SetSamplerQuality(float) = 0;
01910
01911 virtual BOOL GetRenderWatermark() = 0;
01912 virtual void SetRenderWatermark(BOOL on) = 0;
01913 virtual Bitmap* GetWatermarkBitmap() = 0;
01914 virtual void SetWatermarkBitmap(Bitmap* bm) = 0;
01915 virtual int GetWatermarkTop() = 0;
01916 virtual void SetWatermarkTop(int top) = 0;
01917 virtual int GetWatermarkLeft() = 0;
01918 virtual void SetWatermarkLeft(int left) = 0;
01919 virtual float GetWatermarkBlend() = 0;
01920 virtual void SetWatermarkBlend(float blend) = 0;
01921 virtual BOOL GetWatermarkUI() = 0;
01922 virtual void SetWatermarkUI(BOOL on) = 0;
01923 };
01924 #endif // defined(SINGLE_SUPERSAMPLE_IN_RENDER)
01925
01926
01927
01928
01929
01930
01931 #define IRENDERERREQUIREMENTS_INTERFACE_ID Interface_ID(0x27c85c29, 0xfab6ee0) //!< Interface ID for the class IRendererRequirements
01932 class IRendererRequirements : public BaseInterface {
01933 public:
01934
01935 enum Requirement {
01938 kRequirement_NoPauseSupport = 0,
01943 kRequirement_NoVFB = 1,
01948 kRequirement_DontSaveRenderOutput = 2,
01955 kRequirement8_Wants32bitFPOutput = 3,
01959 kRequirement11_WantsObjectSelection = 4,
01960 };
01961
01962
01963 virtual bool HasRequirement(Requirement requirement) = 0;
01964
01965
01966 virtual Interface_ID GetID();
01967 };
01968
01969 #pragma warning(pop)
01970
01971 inline Interface_ID IRendererRequirements::GetID() {
01972
01973 return IRENDERERREQUIREMENTS_INTERFACE_ID;
01974 }
01975
01976 inline IRendererRequirements* GetRendererRequirements(Renderer* renderer) {
01977 return (renderer != NULL) ? static_cast<IRendererRequirements*>(renderer->GetInterface(IRENDERERREQUIREMENTS_INTERFACE_ID)) : NULL;
01978 }
01979
01980 inline bool RendererHasRequirement(Renderer* renderer, IRendererRequirements::Requirement requirement) {
01981 IRendererRequirements* iRequirements = GetRendererRequirements(renderer);
01982 return (iRequirements != NULL) ? iRequirements->HasRequirement(requirement) : false;
01983 }
01984
01985