Class IChkMtlAPI
See Also: Class Mtl, Class RenderInstance.
class IChkMtlAPI
Description:
This class is available in release 4.0 and later only.
This class provides interface methods used to support indirect material referencing and enhanced face / material associations. Generally, these methods will need to be implemented by the plug-in using them and cannot be called from a standard library, since the information required is intimately associated with the geometry of the object.
All methods of this class are implemented by the Plug-In.
Methods:
public:
Prototype:
virtual BOOL SupportsParticleIDbyFace();
Remarks:
Returns TRUE if the object can associate a particle number with a face number, and FALSE if not.
Default Implementation:
{ return FALSE; }
Prototype:
virtual int GetParticleFromFace(int faceID);
Remarks:
Returns the particle to which the face identified by faceID belongs.
Parameters:
int faceID
The ID of the face.
Default Implementation:
{ return 0; }
Prototype:
virtual BOOL SupportsIndirMtlRefs();
Remarks:
Returns TRUE if the object can return a material pointer given a face being rendered, and FALSE if the object will be associated for that render pass with only the material applied to the node.
Default Implementation:
{ return FALSE; }
Prototype:
virtual int NumberOfMtlsUsed();
Remarks:
Returns the number of different materials used on the object. This number is used in enumerating the different materials via the methods GetNthMtl() and GetNthMaxMtlID() below.
Default Implementation:
{ return 0; }
the following methods are meaningful.
Prototype:
virtual Mtl *GetNthMtl(int n);
Remarks:
If the method SupportsIndirMtlRefs() above returns TRUE then this method returns the different materials used on the object.
Parameters:
int n
The zero based index of the material used on the object.
Return Value:
Default Implementation:
{ return NULL; }
Prototype:
virtual int GetNthMaxMtlID(int n);
Remarks:
If the method SupportsIndirMtlRefs() above returns TRUE then this method returns the maximum material ID number used with the specified material on the object
Parameters:
int n
The zero based index of the material.
Default Implementation:
{ return 0; }
Prototype:
virtual Mtl *GetMaterialFromFace(int faceID);
Remarks:
If the method SupportsIndirMtlRefs() above returns TRUE then this method returns a pointer to the material associated with the face identified by faceID.
Parameters:
int faceID
The ID of the face to check.
Default Implementation:
{ return NULL; }