3ds Max C++ API Reference
IDxMaterial2 Class Referenceabstract

#include <IDxMaterial.h>

+ Inheritance diagram for IDxMaterial2:

Public Types

enum  BitmapTypes {
  UNKNOWN_MAP , DIFFUSE_MAP , BUMP_MAP , SPECULAR_MAP ,
  OPACITY_MAP , DISPLACEMENT_MAP , LIGHTMAP_MAP , NORMAL_MAP ,
  REFLECTION_MAP
}
 
- Public Types inherited from IDxMaterial
enum  LightSemantics {
  LIGHT_COLOR , LIGHT_DIRECTION , LIGHT_POSITION , LIGHT_FALLOFF ,
  LIGHT_HOTSPOT , LIGHT_ATTENUATION
}
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

virtual int GetBitmapMappingChannel (int index)=0
 Get the Mapping channel defined for the texture. More...
 
virtual BitmapTypes GetBitmapUsage (int index)=0
 Get the usage of the bitmap. More...
 
virtual void SetMappingChannel (int bitmapIndex, int mapChannel)=0
 Set the mapping channel for the bitmap. More...
 
- Public Member Functions inherited from IDxMaterial
virtual void ReloadDXEffect ()=0
 Reloads the current active effect. More...
 
virtual int GetNumberOfEffectBitmaps ()=0
 Returns the number of bitmaps used by the currently loaded effect. More...
 
virtual PBBitmapGetEffectBitmap (int index)=0
 Gets the bitmap used by the effect. More...
 
virtual void SetEffectBitmap (int index, PBBitmap *bmap)=0
 Set the bitmap used by the effect. More...
 
virtual const MaxSDK::AssetManagement::AssetUserGetEffectFile ()=0
 Get the Dx Effect file AssetUser. More...
 
virtual void SetEffectFile (const MaxSDK::AssetManagement::AssetUser &file)=0
 Set the Dx Effect file AssetUser. More...
 
virtual PBBitmapGetSoftwareRenderBitmap ()=0
 Get the bitmap used for the software rendering overrride. More...
 
virtual void SetSoftwareRenderBitmap (PBBitmap *bmap)=0
 Set the bitmap to be used by the Renderer. More...
 
virtual int GetNumberOfLightParams ()=0
 Get the number of light based parameters. More...
 
virtual INodeGetLightNode (int index)=0
 The actual node used by the parameter. More...
 
virtual const MCHARGetLightParameterName (int index)=0
 The name of the parameter in the Effect file. More...
 
virtual LightSemantics GetLightSemantic (int index)=0
 The light semantic as defined in the effect file. More...
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from FPInterface
virtual FPInterfaceDescGetDesc ()=0
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
virtual ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Detailed Description

Description
This includes a new interface to help extract mapping and texture usage. With the new UI and general updates to the DirectX 9 Shader, the developer can access the mapping data directly from the paramblock hosting the effect parameters

Member Enumeration Documentation

◆ BitmapTypes

Enumerator
UNKNOWN_MAP 
DIFFUSE_MAP 
BUMP_MAP 
SPECULAR_MAP 
OPACITY_MAP 
DISPLACEMENT_MAP 
LIGHTMAP_MAP 
NORMAL_MAP 
REFLECTION_MAP 
155  {
156  UNKNOWN_MAP,
157  DIFFUSE_MAP,
158  BUMP_MAP,
159  SPECULAR_MAP,
160  OPACITY_MAP,
162  LIGHTMAP_MAP,
163  NORMAL_MAP,
165  };
@ BUMP_MAP
Definition: IDxMaterial.h:158
@ NORMAL_MAP
Definition: IDxMaterial.h:163
@ OPACITY_MAP
Definition: IDxMaterial.h:160
@ SPECULAR_MAP
Definition: IDxMaterial.h:159
@ DISPLACEMENT_MAP
Definition: IDxMaterial.h:161
@ REFLECTION_MAP
Definition: IDxMaterial.h:164
@ LIGHTMAP_MAP
Definition: IDxMaterial.h:162
@ DIFFUSE_MAP
Definition: IDxMaterial.h:157
@ UNKNOWN_MAP
Definition: IDxMaterial.h:156

Member Function Documentation

◆ GetBitmapMappingChannel()

virtual int GetBitmapMappingChannel ( int  index)
pure virtual

Get the Mapping channel defined for the texture.

The mapping channel as specified in the Effect file. If no mapping is defined then this will be mapping channel 0

Parameters
indexThe index of the bitmap to access
Returns
The mapping channel for the texture

◆ GetBitmapUsage()

virtual BitmapTypes GetBitmapUsage ( int  index)
pure virtual

Get the usage of the bitmap.

This is typically the usuage as seen from 3dsmax. The usage is based on the Semantic used in the effect file This would be used in conjunction with GetNumberOfEffectBitmaps

Parameters
indexThe index of the bitmap to query
Returns
The usage of the bitmap

◆ SetMappingChannel()

virtual void SetMappingChannel ( int  bitmapIndex,
int  mapChannel 
)
pure virtual

Set the mapping channel for the bitmap.

This would be used in conjunction with GetNumberOfEffectBitmaps

Parameters
bitmapIndexThe index of the bitmap
mapChannelThe mapping channel value