Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #pragma once
00018
00019 #include "render.h"
00020
00021 typedef SFXParamDlg RadiosityParamDlg;
00022
00023 #pragma warning(push)
00024 #pragma warning(disable:4100)
00025
00026
00027
00028
00029
00061 class RadiosityEffect : public SpecialFX {
00062 public:
00063 enum CompletionCode {
00064 PROCESS_COMPLETED,
00065 PROCESS_TIMED_OUT,
00066 PROCESS_CANCELED,
00067 PROCESS_ABORTED
00068 };
00069
00070 RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget,
00071 PartID& partID, RefMessage message) {return REF_SUCCEED;}
00072 SClass_ID SuperClassID() {return RADIOSITY_CLASS_ID;}
00073
00076 IOResult Save(ISave *isave) { return SpecialFX::Save(isave); }
00079 IOResult Load(ILoad *iload) { return SpecialFX::Load(iload); }
00080
00082
00090 virtual void SetActive(
00091 bool active,
00092 TimeValue t)
00093 {
00094 if (active ^ (TestAFlag(A_ATMOS_DISABLED) == 0)) {
00095 if (active) {
00096 ClearAFlag(A_ATMOS_DISABLED);
00097 }
00098 else {
00099 SetAFlag(A_ATMOS_DISABLED);
00100 }
00101 NotifyDependents(FOREVER, (PartID)PART_ALL, REFMSG_CHANGE);
00102 }
00103 }
00104
00106
00113 virtual IOResult Merge(ILoad* iload, const Class_ID& id) { return IO_OK; }
00114
00116
00123 virtual RadiosityParamDlg *CreateParamDialog(IRendParams *ip) { return NULL; }
00124
00125
00126
00127
00128
00130
00140 virtual BOOL SetDlgThing(RadiosityParamDlg* dlg) { return FALSE; }
00141
00142
00143
00145
00153 virtual bool UseLight(INode* node, bool recalcSolution = false) { return true; }
00154
00157
00164 virtual int NumLightDesc( ) const = 0;
00165
00168
00177 virtual void CreateLightDesc(ObjLightDesc** buffer) = 0;
00178
00180
00193 virtual void RunProcess(
00194 TimeValue t,
00195 RenderGlobalContext* rgc,
00196 bool interactiveRender
00197 ) = 0;
00198
00200
00208 virtual void StopProcess(bool allowAbort = true) = 0;
00209
00210
00211
00212
00214
00216 virtual void AbortProcess() = 0;
00217
00218
00219
00220
00221
00222
00223
00224
00225
00227
00238 virtual CompletionCode WaitForCompletion(
00239 RendContext* rc = NULL,
00240 DWORD timeout = INFINITE
00241 ) = 0;
00242
00243
00245
00262 virtual bool NeedsCamVerts(
00263 TimeValue t,
00264 RenderGlobalContext* rgc,
00265 bool interactiveRender,
00266 bool saveMem
00267 ) { return false; }
00268 };
00269
00270
00271
00272
00273
00274
00275
00276
00277 #define RADIOSITY_INTERFACE Interface_ID(0x6711e7a, 0x5b504baa)
00278
00291 class RadiosityInterface : public FPStaticInterface {
00292 public:
00294 virtual void OpenRadiosityPanel()=0;
00296 virtual void CloseRadiosityPanel()=0;
00298 virtual void MinimizeRadiosityPanel()=0;
00299
00301
00305 virtual RadiosityEffect* GetRadiosity() const = 0;
00306
00308
00317 virtual void SetRadiosity(RadiosityEffect* op) = 0;
00318 };
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331 #define IRADIOSITYEFFECT_EXTENSION_INTERFACE Interface_ID(0x703149db, 0x43ed63b8)
00332
00347 class IRadiosityEffectExtension : public BaseInterface {
00348 public:
00350
00356 virtual bool UseDefaultLight(const DefaultLight& defLight, bool recalcSolution = false) const = 0;
00357
00360
00387 virtual bool IsInterestedInChannels(PartID part) const { return true; }
00388
00389
00391
00394 virtual Interface_ID GetID() { return IRADIOSITYEFFECT_EXTENSION_INTERFACE; }
00395 };
00396
00397 #pragma warning(pop)
00398
00399
00400
00401
00405
00406 #define IRADIOSITY_RENDER_PARAMETERS_INTERFACE Interface_ID(0x39981beb, 0x38df21ad)
00407
00408 class IRadiosityRenderParameters : public BaseInterface {
00409
00410 public:
00411
00412 virtual bool GetReuseDirectIllumination(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00413 virtual void SetReuseDirectIllumination(bool in_reuse, TimeValue in_time = 0) = 0;
00414
00415 virtual bool GetRegather(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00416 virtual void SetRegather(bool in_gather, TimeValue in_time = 0) = 0;
00417
00418 virtual int GetRaysPerSample(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00419 virtual void SetRaysPerSample(int in_raysPerSample, TimeValue in_time = 0) = 0;
00420
00421 virtual float GetFilterRadius(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00422 virtual void SetFilterRadius(float in_radius, TimeValue in_time = 0) = 0;
00423
00424 virtual bool GetClampEnabled(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00425 virtual void SetClampEnabled(bool in_clamp, TimeValue in_time = 0) = 0;
00426
00427 virtual float GetClampValue(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00428 virtual void SetClampValue(float in_clampValue, TimeValue in_time = 0) = 0;
00429
00430 virtual bool GetAdaptiveEnabled(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00431 virtual void SetAdaptiveEnabled(bool in_adaptive, TimeValue in_time = 0) = 0;
00432
00433 virtual int GetSampleSpacing(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00434 virtual void SetSampleSpacing(int in_sampleSpacing, TimeValue in_time = 0) = 0;
00435
00436 virtual float GetSubdivionContrast(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00437 virtual void SetSubdivionContrast(float in_contrast, TimeValue in_time = 0) = 0;
00438
00439 virtual int GetMinSampleSpacing(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00440 virtual void SetMinSampleSpacing(int in_minSpacing, TimeValue in_time = 0) = 0;
00441
00442 virtual bool GetShowSamples(TimeValue in_time = 0, Interval *valid = NULL) const = 0;
00443 virtual void SetShowSamples(bool in_show, TimeValue in_time = 0) = 0;
00444
00445
00446 virtual Interface_ID GetID() { return IRADIOSITY_RENDER_PARAMETERS_INTERFACE; }
00447 };
00448