imtl.h File Reference

Classes

class  RenderData
 
class  LightDesc
 
class  IRayTexmap
 
class  TexmapContainer
 
class  INewSubTexmapNotification
 

Macros

#define X_AXIS   0
 
#define Y_AXIS   1
 
#define Z_AXIS   2
 
#define PS_SMALL   0
 
#define PS_LARGE   1
 
#define PS_TINY   2
 
#define PS_TINY_SIZE   24
 
#define PS_SMALL_SIZE   32
 
#define PS_LARGE_SIZE   88
 
#define PSDIM(isz)   ((isz==0)?PS_SMALL_SIZE:(isz==1)?PS_LARGE_SIZE:PS_TINY_SIZE)
 
#define ByteWidth(w)   (((w*3+3)/4)*4)
 
#define WM_SUB_MTL_BUTTON   WM_USER + 0x04001
 
#define WM_TEXMAP_BUTTON   WM_USER + 0x04002
 
#define IID_RAYTRACE_MAP   0xff8d87a5
 
#define GNORMAL_CLASS_ID   Class_ID(0x243e22c6, 0x63f6a014)
 Class ID used for the Gnormal and VDM classes found in maxsdk\samples\materials\NormalBump\normalrender.h & vdm.h. More...
 
#define VDM_CLASS_ID   Class_ID(0x152c55c7, 0x26160e93)
 
#define IID_INewSubMapNotification   Interface_ID(0x3fe013b2, 0x31815874)
 
#define DEFAULT_TEXTURE_MAP_SIZE_INCHES   48.0f
 
#define DEFAULT_TEXTURE_MAP_SIZE_METERS   1.0f
 

Enumerations

enum  Normal_Block_IDs { gnormal_params }
 Used for normal and vector displacement map generation. More...
 
enum  Normal_Param_IDs {
  gn_mult_spin, gn_bmult_spin, gn_map_normal, gn_map_bump,
  gn_map1on, gn_map2on, gn_method, gn_flip_red,
  gn_flip_green, gn_swap_rg
}
 
enum  VDM_Block_IDs { vdm_params }
 
enum  VDM_Param_IDs {
  vdm_mult_spin, vdm_map_vector_enabled, vdm_map_vector, vdm_is_hdr,
  vdm_method
}
 

Functions

CoreExport void SetLoadingMtlLib (MtlLib *ml)
 
CoreExport void SetLoadingMtlBaseLib (MtlBaseLib *ml)
 
int IsMtl (Animatable *m)
 
int IsTex (Animatable *m)
 
int IsMtlBase (Animatable *m)
 
CoreExport MtlCombineMaterials (Mtl *mat1, Mtl *mat2, int &mat2Offset)
 
CoreExport MtlFitMaterialToMeshIDs (Mesh &mesh, Mtl *mat)
 
CoreExport MtlFitMaterialToShapeIDs (BezierShape &shape, Mtl *mat)
 
CoreExport MtlFitMaterialToPatchIDs (PatchMesh &patch, Mtl *mat)
 
CoreExport MtlFitMaterialToPolyMeshIDs (MNMesh &mesh, Mtl *mat)
 
CoreExport void FitMeshIDsToMaterial (Mesh &mesh, Mtl *mat)
 
CoreExport void FitShapeIDsToMaterial (BezierShape &shape, Mtl *mat)
 
CoreExport void FitPatchIDsToMaterial (PatchMesh &patch, Mtl *mat)
 
CoreExport void FitPolyMeshIDsToMaterial (MNMesh &mesh, Mtl *mat)
 
CoreExport MtlCondenseMatAssignments (Mesh &mesh, Mtl *mat)
 
CoreExport MtlCondenseMatAssignments (BezierShape &shape, Mtl *mat)
 
CoreExport MtlCondenseMatAssignments (PatchMesh &patch, Mtl *mat)
 
CoreExport MtlCondenseMatAssignments (MNMesh &mesh, Mtl *mat)
 

Variables

CoreExport MCHAR TEXMAP_CAT_2D []
 
CoreExport MCHAR TEXMAP_CAT_3D []
 
CoreExport MCHAR TEXMAP_CAT_COMP []
 
CoreExport MCHAR TEXMAP_CAT_COLMOD []
 
CoreExport MCHAR TEXMAP_CAT_ENV []
 

Macro Definition Documentation

#define X_AXIS   0
#define Y_AXIS   1
#define Z_AXIS   2
#define PS_SMALL   0
#define PS_LARGE   1
#define PS_TINY   2
#define PS_TINY_SIZE   24
#define PS_SMALL_SIZE   32
#define PS_LARGE_SIZE   88
#define PSDIM (   isz)    ((isz==0)?PS_SMALL_SIZE:(isz==1)?PS_LARGE_SIZE:PS_TINY_SIZE)
#define ByteWidth (   w)    (((w*3+3)/4)*4)
#define WM_SUB_MTL_BUTTON   WM_USER + 0x04001
#define WM_TEXMAP_BUTTON   WM_USER + 0x04002
#define IID_RAYTRACE_MAP   0xff8d87a5
#define GNORMAL_CLASS_ID   Class_ID(0x243e22c6, 0x63f6a014)

Class ID used for the Gnormal and VDM classes found in maxsdk\samples\materials\NormalBump\normalrender.h & vdm.h.

#define VDM_CLASS_ID   Class_ID(0x152c55c7, 0x26160e93)
#define IID_INewSubMapNotification   Interface_ID(0x3fe013b2, 0x31815874)
#define DEFAULT_TEXTURE_MAP_SIZE_INCHES   48.0f
#define DEFAULT_TEXTURE_MAP_SIZE_METERS   1.0f

Enumeration Type Documentation

Used for normal and vector displacement map generation.

Note
Moved to SDK since FBX also depends on this
Enumerator
gnormal_params 
228 {
230 };
Definition: imtl.h:229
Enumerator
gn_mult_spin 
gn_bmult_spin 
gn_map_normal 
gn_map_bump 
gn_map1on 
gn_map2on 
gn_method 
gn_flip_red 
gn_flip_green 
gn_swap_rg 
232 {
233  gn_mult_spin,
236  gn_map_bump,
237  gn_map1on,
238  gn_map2on,
239  gn_method,
240  gn_flip_red,
242  gn_swap_rg
243 };
Definition: imtl.h:234
Definition: imtl.h:240
Definition: imtl.h:233
Definition: imtl.h:238
Definition: imtl.h:242
Definition: imtl.h:235
Definition: imtl.h:236
Definition: imtl.h:239
Definition: imtl.h:237
Definition: imtl.h:241
Enumerator
vdm_params 
246 {
247  vdm_params
248 };
Definition: imtl.h:247
Enumerator
vdm_mult_spin 
vdm_map_vector_enabled 
vdm_map_vector 
vdm_is_hdr 
vdm_method 
251 {
252  vdm_mult_spin, // Scaling value (float)
253  vdm_map_vector_enabled, // Whether the map is enabled or not (bool)
254  vdm_map_vector, // A sub-map defining the actual vector data as a Texmap
255  vdm_is_hdr, // Whether the sub-map is high-dynamic range and doesn't need re-scaling (i.e. value = pixel * 2.0 - 1.0). (bool)
256  vdm_method // Space the vector map is defined in [0==World, 1==Object, 2==Tangent] (int)
257 };
Definition: imtl.h:256
Definition: imtl.h:254
Definition: imtl.h:255
Definition: imtl.h:252
Definition: imtl.h:253

Function Documentation

CoreExport void SetLoadingMtlLib ( MtlLib ml)
CoreExport void SetLoadingMtlBaseLib ( MtlBaseLib ml)
int IsMtl ( Animatable m)
inline
262 { return m && m->SuperClassID()==MATERIAL_CLASS_ID; }
#define MATERIAL_CLASS_ID
Materials super-class ID.
Definition: plugapi.h:379
virtual CoreExport SClass_ID SuperClassID()=0
Retrieves a constant representing the type of the plugin.
int IsTex ( Animatable m)
inline
263 { return m && m->SuperClassID()==TEXMAP_CLASS_ID; }
#define TEXMAP_CLASS_ID
Texture maps super-class ID.
Definition: plugapi.h:380
virtual CoreExport SClass_ID SuperClassID()=0
Retrieves a constant representing the type of the plugin.
int IsMtlBase ( Animatable m)
inline
264 { return IsMtl(m)||IsTex(m); }
int IsMtl(Animatable *m)
Definition: imtl.h:262
int IsTex(Animatable *m)
Definition: imtl.h:263
CoreExport Mtl* CombineMaterials ( Mtl mat1,
Mtl mat2,
int mat2Offset 
)
CoreExport Mtl* FitMaterialToMeshIDs ( Mesh mesh,
Mtl mat 
)
CoreExport Mtl* FitMaterialToShapeIDs ( BezierShape shape,
Mtl mat 
)
CoreExport Mtl* FitMaterialToPatchIDs ( PatchMesh patch,
Mtl mat 
)
CoreExport Mtl* FitMaterialToPolyMeshIDs ( MNMesh mesh,
Mtl mat 
)
CoreExport void FitMeshIDsToMaterial ( Mesh mesh,
Mtl mat 
)
CoreExport void FitShapeIDsToMaterial ( BezierShape shape,
Mtl mat 
)
CoreExport void FitPatchIDsToMaterial ( PatchMesh patch,
Mtl mat 
)
CoreExport void FitPolyMeshIDsToMaterial ( MNMesh mesh,
Mtl mat 
)
CoreExport Mtl* CondenseMatAssignments ( Mesh mesh,
Mtl mat 
)
CoreExport Mtl* CondenseMatAssignments ( BezierShape shape,
Mtl mat 
)
CoreExport Mtl* CondenseMatAssignments ( PatchMesh patch,
Mtl mat 
)
CoreExport Mtl* CondenseMatAssignments ( MNMesh mesh,
Mtl mat 
)

Variable Documentation

CoreExport MCHAR TEXMAP_CAT_2D[]
CoreExport MCHAR TEXMAP_CAT_3D[]
CoreExport MCHAR TEXMAP_CAT_COMP[]
CoreExport MCHAR TEXMAP_CAT_COLMOD[]
CoreExport MCHAR TEXMAP_CAT_ENV[]