00001 /********************************************************************** 00002 00003 FILE: INodeBakeProperties.h 00004 00005 DESCRIPTION: Public interface for setting and getting a node's 00006 texture baking properties. 00007 00008 CREATED BY: Kells Elmquist 00009 00010 HISTORY: created 15 december 2001 00011 00012 *> Copyright (c) 2001, All Rights Reserved. 00013 **********************************************************************/ 00014 00015 00016 #pragma once 00017 00018 #include "ifnpub.h" 00019 #include "ipoint2.h" 00020 #include "box2.h" 00021 // forward declarations 00022 class MaxBakeElement; 00023 00024 // The interface ID for class INodeBakeProperties 00025 #define NODE_BAKE_PROPERTIES_INTERFACE Interface_ID(0x3e5d0f38, 0x37e500ac) 00026 00027 // by default use this channel for all baking ops 00028 #define DEFAULT_BAKE_CHANNEL 3 00029 #define DEFAULT_N_DILATIONS 2 00030 00031 //============================================================================== 00032 // class INodeBakeProperties 00052 //============================================================================== 00053 class INodeBakeProperties : public FPMixinInterface { 00054 00055 public: 00056 00057 // General properties 00058 virtual BOOL GetBakeEnabled() const = 0; 00059 virtual void SetBakeEnabled( BOOL isExcluded ) = 0; 00060 00061 // mapping channel to use for baking Object level 00062 virtual int GetBakeMapChannel() const = 0; 00063 virtual void SetBakeMapChannel( int mapChannel ) = 0; 00064 00065 // number of dilations after rendering, affects seaming 00066 virtual int GetNDilations() const = 0; 00067 virtual void SetNDilations( int nDilations ) = 0; 00068 00069 virtual int GetBakeFlags() const = 0; 00070 virtual void SetBakeFlags( int flags ) = 0; 00071 00072 virtual float GetSurfaceArea() const = 0; 00073 virtual void SetSurfaceArea( float area ) = 0; 00074 00075 virtual float GetAreaScale() const = 0; 00076 virtual void SetAreaScale( float scale ) = 0; 00077 00078 // bake render elements 00079 virtual int GetNBakeElements() const = 0; 00080 virtual MaxBakeElement* GetBakeElement( int nElement ) = 0; 00081 00083 00086 virtual Tab<MaxBakeElement*> GetBakeElementArray() = 0; 00087 00088 virtual BOOL AddBakeElement( MaxBakeElement* pEle ) = 0; 00089 virtual BOOL RemoveBakeElement( MaxBakeElement* pEle ) = 0; 00090 virtual BOOL RemoveBakeElementByName( char * name ) = 0; 00091 virtual BOOL RemoveBakeElementByIndex( int index ) = 0; 00092 virtual void RemoveAllBakeElements() = 0; 00093 00094 // reset params to default, toss render elements 00095 virtual void ResetBakeProps() = 0; 00096 00097 // enabled & has some elements & sz not 0 00098 virtual BOOL GetEffectiveEnable() = 0; 00099 00100 // largest size of enabled baking elements 00101 virtual IPoint2 GetRenderSize() = 0; 00102 00103 virtual FBox2 GetActiveRegion() =0; 00104 virtual void SetActiveRegion(FBox2 region) = 0; 00105 }; 00106 00107 00108 //============================================================================== 00109 // class INodeBakeProjProperties 00110 // 00111 // Properties related to projection mapping with texture baking 00112 // 00113 //============================================================================== 00114 00115 #define NODE_BAKE_PROJ_PROPERTIES_INTERFACE Interface_ID(0x59d919a5, 0x6fb90a85) 00116 00117 class INodeBakeProjProperties : public FPMixinInterface { 00118 public: 00119 //Enabled 00120 virtual BOOL GetEnabled() = 0; 00121 virtual void SetEnabled( BOOL b ) = 0; 00122 00123 //ProjMod - Projection Modifier 00124 virtual ReferenceTarget* GetProjMod() = 0; 00125 virtual void SetProjMod( ReferenceTarget* refTarg ) = 0; 00126 00127 //ProjModTarg - Projection Modifier Target 00128 virtual MCHAR* GetProjModTarg() = 0; 00129 virtual void SetProjModTarg( MCHAR* s ) = 0; 00130 00131 //CropAlpha 00132 virtual BOOL GetCropAlpha() = 0; 00133 virtual void SetCropAlpha( BOOL b ) = 0; 00134 00135 //ProjSpace: XYZ object space, or UVW texture space 00136 enum { enumIdProjSpaceXYZ=0, enumIdProjSpaceUVW }; 00137 virtual int GetProjSpace() = 0; 00138 virtual void SetProjSpace( int enum_val ) = 0; 00139 00140 //NormalSpace: World Space, Screen Space, Local Space, or Tangent Space 00141 enum { enumIdNormalSpaceWorld=0, enumIdNormalSpaceScreen, enumIdNormalSpaceLocal, enumIdNormalSpaceTangent }; 00142 virtual int GetNormalSpace() = 0; 00143 virtual void SetNormalSpace( int enum_val ) = 0; 00144 00145 //TangentYDir: Y-Up or Y-Down 00146 enum { enumIdTangentDirYUp=0, enumIdTangentDirYDown}; 00147 virtual int GetTangentYDir() = 0; 00148 virtual void SetTangentYDir( int enum_val ) = 0; 00149 00150 //TangentXDir: X-Right or X_Left 00151 enum {enumIdTangentDirXRight=0, enumIdTangentDirXLeft }; 00152 virtual int GetTangentXDir() = 0; 00153 virtual void SetTangentXDir( int enum_val ) = 0; 00154 00155 //UseCage 00156 virtual BOOL GetUseCage() = 0; 00157 virtual void SetUseCage( BOOL b ) = 0; 00158 00159 //RayOffset 00160 virtual float GetRayOffset() = 0; 00161 virtual void SetRayOffset( float f ) = 0; 00162 00163 //HitResolveMode 00164 enum { enumIdHitResolveClosest=0, enumIdHitResolveFurthest }; 00165 virtual int GetHitResolveMode() = 0; 00166 virtual void SetHitResolveMode( int enum_val ) = 0; 00167 00168 //HitMatchMtlID 00169 virtual BOOL GetHitMatchMtlID() = 0; 00170 virtual void SetHitMatchMtlID( BOOL b ) = 0; 00171 00172 //HitWorkingModel 00173 virtual BOOL GetHitWorkingModel() = 0; 00174 virtual void SetHitWorkingModel( BOOL b ) = 0; 00175 00176 //WarnRayMiss 00177 virtual BOOL GetWarnRayMiss() = 0; 00178 virtual void SetWarnRayMiss( BOOL b ) = 0; 00179 00180 //RayMissColor 00181 virtual Color* GetRayMissColor() = 0; 00182 virtual void SetRayMissColor( Color* c ) = 0; 00183 00184 //HeightMapMin - rays of less than this length are output as black pixels by the Height Map 00185 virtual float GetHeightMapMin() = 0; 00186 virtual void SetHeightMapMin( float f ) = 0; 00187 00188 //HeightMapMax - rays of more than this length are output as white pixels by the Height Map 00189 virtual float GetHeightMapMax() = 0; 00190 virtual void SetHeightMapMax( float f ) = 0; 00191 00192 //HeightBufMin - the minimum height value encountered during the last rendering 00193 virtual float GetHeightBufMin() = 0; 00194 virtual void SetHeightBufMin( float f ) = 0; 00195 00196 //HeightBufMax - the maximum height value encountered during the last rendering 00197 virtual float GetHeightBufMax() = 0; 00198 virtual void SetHeightBufMax( float f ) = 0; 00199 00200 //ProportionalOutput 00201 virtual BOOL GetProportionalOutput() = 0; 00202 virtual void SetProportionalOutput( BOOL b ) = 0; 00203 00204 // mapping channel to use for baking SubObject level 00205 virtual int GetBakeMapChannel_SO() const = 0; 00206 virtual void SetBakeMapChannel_SO( int mapChannel ) = 0; 00207 00208 //BakeObjectLevel 00209 virtual BOOL GetBakeObjLevel() = 0; 00210 virtual void SetBakeObjLevel( BOOL b ) = 0; 00211 00212 //BakeSubObjLevels 00213 virtual BOOL GetBakeSubObjLevels() = 0; 00214 virtual void SetBakeSubObjLevels( BOOL b ) = 0; 00215 00216 //useObjectBakeForMtl 00217 virtual BOOL GetObjBakeToMtl() = 0; 00218 virtual void SetObjBakeToMtl( BOOL b ) = 0; 00219 00220 }; 00221