Public Member Functions

MtlList Class Reference

Search for all occurrences

Detailed Description

See also:
Template Class Tab, Class Mtl.

Description:
A simple list of materials. All methods of this class are implemented by the system.

Note the following typedefs:

typedef MtlBase* MtlBaseHandle;

typedef Mtl* MtlHandle;

typedef Texmap* TexmapHandle;

#include <imtl.h>

Inheritance diagram for MtlList:
Inheritance graph
[legend]

List of all members.

Public Member Functions

CoreExport int  AddMtl (Mtl *m, BOOL checkUnique=TRUE)
CoreExport int  FindMtl (Mtl *m)
CoreExport int  FindMtlByName (MSTR &name)
void  RemoveEntry (int n)
void  Empty ()

Member Function Documentation

CoreExport int AddMtl ( Mtl m,
BOOL  checkUnique = TRUE 
)
Remarks:
Adds the specified material to this list of materials.
Parameters:
Mtl *m

The material to add.

BOOL checkUnique=TRUE

If TRUE this method checks to make sure the material is unique, and will only add it if so.
Returns:
Nonzero if the material was added; otherwise zero.
CoreExport int FindMtl ( Mtl m )
Remarks:
Finds the specified material in this material list and returns its index (0 through the number of materials in the library). Returns -1 if not found.
Parameters:
Mtl *m

The material to find.
CoreExport int FindMtlByName ( MSTR name )
Remarks:
Finds the material whose name is passed in this material list and returns its index (0 through the number of materials in the library). Returns -1 if not found.
Parameters:
MSTR& name

The material to find.
void RemoveEntry ( int  n ) [inline]
Remarks:
Removes the material whose index is passed.
Parameters:
int n

The index of the material to remove.
{ Delete(n,1); }
void Empty ( ) [inline]
Remarks:
Empties (clears) the material list.
{ Resize(0); }

MtlList MtlList MtlList MtlList MtlList MtlList MtlList MtlList MtlList MtlList
MtlList MtlList MtlList MtlList MtlList MtlList MtlList MtlList MtlList MtlList