00001 /********************************************************************** 00002 00003 FILE: INodeGIProperties.h 00004 00005 DESCRIPTION: Public interface for setting and getting a node's 00006 global illumination (radiosity) properties. 00007 00008 CREATED BY: Daniel Levesque, Discreet 00009 00010 HISTORY: created 1 June 2001 00011 00012 *> Copyright (c) 2001, All Rights Reserved. 00013 **********************************************************************/ 00014 00015 00016 #pragma once 00017 00018 #include "ifnpub.h" 00019 00020 // The interface ID for class INodeGIProperties 00021 #define NODEGIPROPERTIES_INTERFACE Interface_ID(0x3e5d0f37, 0x37e5009c) 00022 00023 //============================================================================== 00024 // class INodeGIProperties 00025 // 00026 // 00027 // This class defines an interface for accessing a node's global illumination 00028 // properties. 00029 // 00030 // An instance of this interface can be retrieved using the following line of 00031 // code (assuming 'node' is of type INode*): 00032 // 00033 // static_cast<INodeGIProperties*>(node->GetInterface(NODEGIPROPERTIES_INTERFACE)) 00034 // 00035 // 00036 // Geometric and object objects have different properties. Accessing/setting 00037 // geometric properties of non-geometric objects is safe, 00038 // but will have no effect in the global illumination solution. 00039 // 00040 // 00041 // Here is a description of the global illumination properties: 00042 // 00043 // 00044 // GENERAL PROPERTIES (all types of objects) 00045 // 00046 // Excluded: 00047 // Excluded objects should be ignored by the radiosity engine. The 00048 // should act as if these objects do not exist. 00049 // 00050 // ByLayer: 00051 // Specifies whether the GI properties of this node's layer should be 00052 // used instead of the local settings. 00053 // 00054 // 00055 // GEOMETRIC OBJECTS (affects only geometric objects): 00056 // 00057 // Occluder: 00058 // Occluding objects will block rays of light that hit their surface. 00059 // Non-occluding objects will not block those rays, but will still receive 00060 // illumination if the Receiver property is set. 00061 // 00062 // Receiver: 00063 // Receiver objects will receive and store illumination from rays of light 00064 // that hit their surface. 00065 // Non-receiver objects will not store illumination. 00066 // 00067 // Diffuse: 00068 // Diffuse surfaces will reflect and trasmit light based on their diffuse 00069 // color and transparency value. 00070 // 00071 // Specular: 00072 // Specular surfaces will generate specular reflections and transparency. 00073 // ex.: glass is specular transparent and a mirror is specular reflective. 00074 // 00075 // UseGlobalMeshSettings: 00076 // When subdividing the geometry for a more accurate GI solution, 00077 // this flag specifies whether some 'global' settings, or the node's local 00078 // settings should be used. 00079 // 00080 // MeshingEnabled: 00081 // When using local settings, this specifies whether geometry subdivision 00082 // should occur on this node. 00083 // 00084 // MeshSize: 00085 // The maximum size, in MAX universe units, that a face should have after 00086 // being subdivided. 00087 // 00088 // NbRefineSteps: 00089 // This is the saved number of refining steps to be performed on this node 00090 // by the global illumination engine. 00091 // 00092 // ExcludedFromRegather: 00093 // Set to 'true' to excluded an object from the 'regathering' process. 00094 // 00095 // RayMult: 00096 // Specifies a multiplier that will increase or decrease the number of rays 00097 // cast for this object when regathering. 00098 // 00099 // LIGHT OBJECTS (affects only light sources): 00100 // 00101 // StoreIllumToMesh: 00102 // Specifies whether the light emitted from this object should be stored 00103 // in the GI solution's mesh, and not be re-cast at render-time. 00104 // 00105 // 00106 //============================================================================== 00148 class INodeGIProperties : public FPMixinInterface { 00149 00150 public: 00151 00152 // Copy properties from another interface 00155 virtual void CopyGIPropertiesFrom(const INodeGIProperties& source) = 0; 00156 00157 00158 // General properties 00161 virtual BOOL GIGetIsExcluded() const = 0; 00165 virtual void GISetIsExcluded(BOOL isExcluded) = 0; 00166 00167 00168 // Geometry object properties 00169 virtual BOOL GIGetIsOccluder() const = 0; 00170 virtual BOOL GIGetIsReceiver() const = 0; 00171 virtual BOOL GIGetIsDiffuse() const = 0; 00172 virtual BOOL GIGetIsSpecular() const = 0; 00173 virtual BOOL GIGetUseGlobalMeshSettings() const = 0; 00174 virtual BOOL GIGetMeshingEnabled() const = 0; 00175 virtual unsigned short GIGetNbRefineSteps() const = 0; 00176 virtual unsigned short GIGetNbRefineStepsDone() const = 0; 00179 virtual float GIGetMeshSize() const = 0; 00180 00184 virtual void GISetIsOccluder(BOOL isOccluder) = 0; 00188 virtual void GISetIsReceiver(BOOL isReceiver) = 0; 00192 virtual void GISetIsDiffuse(BOOL isDiffuseReflective) = 0; 00196 virtual void GISetIsSpecular(BOOL isSpecular) = 0; 00200 virtual void GISetUseGlobalMeshSettings(BOOL globalMeshing) = 0; 00204 virtual void GISetMeshingEnabled(BOOL meshingEnabled) = 0; 00208 virtual void GISetNbRefineSteps(unsigned short nbRefineSteps) = 0; 00212 virtual void GISetNbRefineStepsDone(unsigned short nbRefineStepsDone) = 0; 00216 virtual void GISetMeshSize(float size) = 0; 00217 //JH 9.06.01 00221 virtual BOOL GIGetIsExcludedFromRegather() const = 0; 00225 virtual void GISetIsExcludedFromRegather(BOOL isExcluded) = 0; 00226 00227 //JH 9.06.01 00228 // Light object property 00231 virtual BOOL GIGetStoreIllumToMesh() const = 0; 00234 virtual void GISetStoreIllumToMesh(BOOL storeIllum) = 0; 00235 00236 // [dl | 12Nov2001] Get and Set the 'by layer' flag for radiosity properties. 00239 virtual BOOL GIGetByLayer() const = 0; 00242 virtual void GISetByLayer(BOOL byLayer) = 0; 00243 00244 // > 3/9/02 - 2:36pm --MQM-- regathering ray multiplier node property 00247 virtual float GIGetRayMult() const = 0; 00250 virtual void GISetRayMult(float rayMult) = 0; 00251 }; 00252 00253 00255 #define NODEGIPROPERTIES2_INTERFACE Interface_ID(0x7fd53834, 0x3b8525b5) 00256 00257 //============================================================================== 00258 // class INodeGIProperties2 00259 // 00260 // 00262 // 00299 // 00300 // 00301 //============================================================================== 00302 class INodeGIProperties2 : public INodeGIProperties { 00303 00304 public: 00305 00306 using INodeGIProperties::CopyGIPropertiesFrom; 00307 00309 00310 virtual void CopyGIPropertiesFrom(const INodeGIProperties2& source) = 0; 00311 00312 00314 00317 virtual BOOL GIUseAdaptiveSubdivision() const = 0; 00318 00320 00324 virtual float GIGetMinMeshSize() const = 0; 00325 00327 00332 virtual float GIGetInitialMeshSize() const = 0; 00333 00335 00344 virtual float GIGetContrastThreshold() const = 0; 00345 00347 00351 virtual void GISetUseAdaptiveSubdivision(BOOL useAdaptiveSubdivision) = 0; 00352 00354 00358 virtual void GISetMinMeshSize(float minMeshSize) = 0; 00359 00361 00366 virtual void GISetInitialMeshSize(float initialMeshSize) = 0; 00367 00369 00379 virtual void GISetContrastThreshold(float contrastThreshold) = 0; 00380 }; 00381