3ds Max C++ API Reference
Loading...
Searching...
No Matches
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.
 
#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

◆ X_AXIS

#define X_AXIS   0

◆ Y_AXIS

#define Y_AXIS   1

◆ Z_AXIS

#define Z_AXIS   2

◆ PS_SMALL

#define PS_SMALL   0

◆ PS_LARGE

#define PS_LARGE   1

◆ PS_TINY

#define PS_TINY   2

◆ PS_TINY_SIZE

#define PS_TINY_SIZE   24

◆ PS_SMALL_SIZE

#define PS_SMALL_SIZE   32

◆ PS_LARGE_SIZE

#define PS_LARGE_SIZE   88

◆ PSDIM

#define PSDIM (   isz)    ((isz==0)?PS_SMALL_SIZE:(isz==1)?PS_LARGE_SIZE:PS_TINY_SIZE)

◆ ByteWidth

#define ByteWidth (   w)    (((w*3+3)/4)*4)

◆ WM_SUB_MTL_BUTTON

#define WM_SUB_MTL_BUTTON   WM_USER + 0x04001

◆ WM_TEXMAP_BUTTON

#define WM_TEXMAP_BUTTON   WM_USER + 0x04002

◆ IID_RAYTRACE_MAP

#define IID_RAYTRACE_MAP   0xff8d87a5

◆ GNORMAL_CLASS_ID

#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.

◆ VDM_CLASS_ID

#define VDM_CLASS_ID   Class_ID(0x152c55c7, 0x26160e93)

◆ IID_INewSubMapNotification

#define IID_INewSubMapNotification   Interface_ID(0x3fe013b2, 0x31815874)

◆ DEFAULT_TEXTURE_MAP_SIZE_INCHES

#define DEFAULT_TEXTURE_MAP_SIZE_INCHES   48.0f

◆ DEFAULT_TEXTURE_MAP_SIZE_METERS

#define DEFAULT_TEXTURE_MAP_SIZE_METERS   1.0f

Enumeration Type Documentation

◆ Normal_Block_IDs

Used for normal and vector displacement map generation.

Note
Moved to SDK since FBX also depends on this
Enumerator
gnormal_params 
228{
230};
@ gnormal_params
Definition: imtl.h:229

◆ Normal_Param_IDs

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{
237 gn_map1on,
238 gn_map2on,
239 gn_method,
243};
@ gn_bmult_spin
Definition: imtl.h:234
@ gn_method
Definition: imtl.h:239
@ gn_map2on
Definition: imtl.h:238
@ gn_flip_green
Definition: imtl.h:241
@ gn_map_bump
Definition: imtl.h:236
@ gn_mult_spin
Definition: imtl.h:233
@ gn_flip_red
Definition: imtl.h:240
@ gn_swap_rg
Definition: imtl.h:242
@ gn_map1on
Definition: imtl.h:237
@ gn_map_normal
Definition: imtl.h:235

◆ VDM_Block_IDs

Enumerator
vdm_params 
246{
248};
@ vdm_params
Definition: imtl.h:247

◆ VDM_Param_IDs

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};
@ vdm_map_vector_enabled
Definition: imtl.h:253
@ vdm_method
Definition: imtl.h:256
@ vdm_map_vector
Definition: imtl.h:254
@ vdm_mult_spin
Definition: imtl.h:252
@ vdm_is_hdr
Definition: imtl.h:255

Function Documentation

◆ SetLoadingMtlLib()

CoreExport void SetLoadingMtlLib ( MtlLib ml)

◆ SetLoadingMtlBaseLib()

CoreExport void SetLoadingMtlBaseLib ( MtlBaseLib ml)

◆ IsMtl()

int IsMtl ( Animatable m)
inline
262{ return m && m->SuperClassID()==MATERIAL_CLASS_ID; }
virtual CoreExport SClass_ID SuperClassID()=0
Retrieves a constant representing the type of the plugin.
#define MATERIAL_CLASS_ID
Materials super-class ID.
Definition: plugapi.h:463

◆ IsTex()

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:464

◆ IsMtlBase()

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

◆ CombineMaterials()

CoreExport Mtl * CombineMaterials ( Mtl mat1,
Mtl mat2,
int mat2Offset 
)

◆ FitMaterialToMeshIDs()

CoreExport Mtl * FitMaterialToMeshIDs ( Mesh mesh,
Mtl mat 
)

◆ FitMaterialToShapeIDs()

CoreExport Mtl * FitMaterialToShapeIDs ( BezierShape shape,
Mtl mat 
)

◆ FitMaterialToPatchIDs()

CoreExport Mtl * FitMaterialToPatchIDs ( PatchMesh patch,
Mtl mat 
)

◆ FitMaterialToPolyMeshIDs()

CoreExport Mtl * FitMaterialToPolyMeshIDs ( MNMesh mesh,
Mtl mat 
)

◆ FitMeshIDsToMaterial()

CoreExport void FitMeshIDsToMaterial ( Mesh mesh,
Mtl mat 
)

◆ FitShapeIDsToMaterial()

CoreExport void FitShapeIDsToMaterial ( BezierShape shape,
Mtl mat 
)

◆ FitPatchIDsToMaterial()

CoreExport void FitPatchIDsToMaterial ( PatchMesh patch,
Mtl mat 
)

◆ FitPolyMeshIDsToMaterial()

CoreExport void FitPolyMeshIDsToMaterial ( MNMesh mesh,
Mtl mat 
)

◆ CondenseMatAssignments() [1/4]

CoreExport Mtl * CondenseMatAssignments ( Mesh mesh,
Mtl mat 
)

◆ CondenseMatAssignments() [2/4]

CoreExport Mtl * CondenseMatAssignments ( BezierShape shape,
Mtl mat 
)

◆ CondenseMatAssignments() [3/4]

CoreExport Mtl * CondenseMatAssignments ( PatchMesh patch,
Mtl mat 
)

◆ CondenseMatAssignments() [4/4]

CoreExport Mtl * CondenseMatAssignments ( MNMesh mesh,
Mtl mat 
)

Variable Documentation

◆ TEXMAP_CAT_2D

CoreExport MCHAR TEXMAP_CAT_2D[]
extern

◆ TEXMAP_CAT_3D

CoreExport MCHAR TEXMAP_CAT_3D[]
extern

◆ TEXMAP_CAT_COMP

CoreExport MCHAR TEXMAP_CAT_COMP[]
extern

◆ TEXMAP_CAT_COLMOD

CoreExport MCHAR TEXMAP_CAT_COLMOD[]
extern

◆ TEXMAP_CAT_ENV

CoreExport MCHAR TEXMAP_CAT_ENV[]
extern