ISubMap Class Reference

ISubMap Class Referenceabstract

#include <ISubMap.h>

Class Description

See also
Class MtlBase, Class Texmap, Class ParamDlg, Class ReferenceTarget.

Description:
The methods of this class provide access to the sub-textures of a MtlBase. These properties include the number of sub-maps, the slot type, on / off state, etc.

The MtlBase class sub-classes from this class. If a developer is creating a plug-in derived from MtlBase (for instance a Material or Texture) then implementations of these methods are required. Developers may call these methods on an existing MtlBase sub-class.
+ Inheritance diagram for ISubMap:

Public Member Functions

virtual ~ISubMap ()
 
virtual int NumSubTexmaps ()
 
virtual TexmapGetSubTexmap (int i)
 
virtual int MapSlotType (int i)=0
 
virtual void SetSubTexmap (int i, Texmap *m)
 
virtual int SubTexmapOn (int i)
 
virtual CoreExport MSTR GetSubTexmapSlotName (int i)
 
CoreExport MSTR GetSubTexmapTVName (int i)
 
virtual BOOL SetDlgThing (ParamDlg *dlg)
 
CoreExport void CopySubTexmap (HWND hwnd, int ifrom, int ito)
 
virtual ReferenceTargetGetRefTarget ()=0
 

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

Constructor & Destructor Documentation

virtual ~ISubMap ( )
inlinevirtual
Remarks
Destructor.
46 {;}

Member Function Documentation

virtual int NumSubTexmaps ( )
inlinevirtual
Remarks
Returns the number of sub-textures managed by this material or texture.
Default Implementation:
{ return 0; }

Reimplemented in MSCustAttrib.

51 { return 0; }
virtual Texmap* GetSubTexmap ( int  i)
inlinevirtual
Remarks
Returns a pointer to the 'i-th' sub-texmap managed by the material or texture.

Note: For the 3ds Max Standard material, the sub-texmap indexes used with this method are listed in Texture Map Indices.
Parameters:
int i

Specifies the texmap to return.
Default Implementation:
{ return NULL; }

Reimplemented in MSCustAttrib.

61 { return NULL; }
#define NULL
Definition: autoptr.h:18
virtual int MapSlotType ( int  i)
pure virtual
Remarks
In the Coordinates rollup in the user interface for a texture map are two options. These options are Texture or Environment. The slot type is one of these two options, texture coordinates or environment coordinates. There are a variety of texture coordinate types. There are the type assigned to the object and the environment type (Spherical, Cylindrical, Shrink-wrap, Screen). This method is used to determine the type required by the particular sub-texture. This is either texture coordinates (MAPSLOT_TEXTURE) or environment coordinates (MAPSLOT_ENVIRON).
Parameters:
int i

The index of the sub-texture whose slot type to return.
Returns
See Map Slot Types.
Default Implementation:
{ return MAPSLOT_TEXTURE; }

Implemented in MtlBase, Texmap, and MSCustAttrib.

virtual void SetSubTexmap ( int  i,
Texmap m 
)
inlinevirtual
Remarks
Stores the 'i-th' sub-texmap managed by the material or texture.

Note: For the 3ds Max Standard material, the sub-texmap indexes used with this method are listed in Texture Map Indices.
Parameters:
int i

The index of the storage for the texmap.

Texmap *m

The texmap to store.
Default Implementation:
{}

Reimplemented in MSCustAttrib.

88 { }
virtual int SubTexmapOn ( int  i)
inlinevirtual
Remarks
Returns nonzero if the specified sub-texmap is on; otherwise zero. Some materials may have user interface controls to toggle the sub-maps on and off. The Standard material has such controls for example.
Parameters:
int i

The index of the sub-texmap to check.
Default Implementation:
{ return 1; }
99 { return 1; }
virtual CoreExport MSTR GetSubTexmapSlotName ( int  i)
virtual
Remarks
This method returns the slot name of the 'i-th' sub-texmap. This name appears in the materials editor dialog. For instance, if you are in a material and then you go down into a map, this is the name that appears just below the 'Get Material' icon. For example, in the Standard material when you choose one of the maps, the map name appears to let you know which slot you are working on. For the Standard material, this may be "Ambient", "Diffuse", "Specular", etc.
Parameters:
int i

Specifies the slot whose name is returned.
Default Implementation:
The default implementation returns an empty ("") string.

Reimplemented in MSCustAttrib.

CoreExport MSTR GetSubTexmapTVName ( int  i)
Remarks
Returns the name to appear in Track View of the 'i-th' sub-texmap.
Parameters:
int i

Specifies the sub-texmap whose name is returned.
virtual BOOL SetDlgThing ( ParamDlg dlg)
inlinevirtual
Remarks
This method is called by the ParamMap2 AUTO_UI system if the material/texmap is letting the system build an AutoMParamDlg for it. This method is called on a material/texmap coming into an existing set of ParamDlgs, once for each secondary ParamDlg and it should set the appropriate 'thing' into the given dlg (the 'thing' being, for example, a Texout* or UVGen*). Return FALSE if dlg is unrecognized.

Note: See the discussion above in CreateParamDlg() for additional details on this method.
Parameters:
ParamDlg* dlg

Points to the ParamDlg to check. See Class ParamDlg.
Returns
TRUE if the dlg passed is recognized; FALSE if unrecognized.
Default Implementation:
{ return FALSE; }
Sample Code:
BOOL Gradient::SetDlgThing(ParamDlg* dlg)
{
if (dlg == uvGenDlg)
uvGenDlg->SetThing(uvGen);
else if (dlg == texoutDlg)
texoutDlg->SetThing(texout);
else
return FALSE;
return TRUE;
}
154 { return FALSE; }
CoreExport void CopySubTexmap ( HWND  hwnd,
int  ifrom,
int  ito 
)
Remarks
Implemented by the System.

This method is used to handle the drag-and-drop of texmaps. A developer implements the logic to handle the drag and drop. Once they have the information about what slot was dropped on what other slot, this method may be called to handle the copying. This is used by the 3ds Max Standard material.
Parameters:
HWND hwnd

The rollup page window handle.

int ifrom

The source texmap.

int ito

The destination texmap.
virtual ReferenceTarget* GetRefTarget ( )
pure virtual
Remarks
Implemented by the System.

The implementation of this method is provided by MtlBase. It returns its this pointer.

Implemented in MtlBase, and MSCustAttrib.