00001 /********************************************************************** 00002 *< 00003 FILE: ChkMtlAPI.h 00004 00005 DESCRIPTION: Enhances material handling for particles API 00006 00007 CREATED BY: Eric Peterson 00008 00009 HISTORY: 3-8-99 00010 00011 *> Copyright (c) 2000 Discreet, All Rights Reserved. 00012 *********************************************************************/ 00013 00014 // This header defines interface methods used to support indirect material 00015 // referencing and enhanced face/material associations. Generally, these 00016 // methods will need to be implemented by the plugin using them and cannot 00017 // be called from a standard library, since the information required is 00018 // intimately associated with the geometry of the 00019 00020 #pragma once 00021 #include "maxheap.h" 00022 #include <WTypes.h> 00023 // forward declarations 00024 class Mtl; 00025 00026 00036 #pragma warning(push) 00037 #pragma warning(disable:4100) 00038 class IChkMtlAPI : public MaxHeapOperators 00039 { 00040 public: 00041 // SupportsParticleIDbyFace returns TRUE if the object can associate 00042 // a particle number with a face number, and FALSE by default. 00047 virtual BOOL SupportsParticleIDbyFace() { return FALSE; } 00048 00049 // GetParticleFromFace returns the particle to which the face identified 00050 // by faceID belongs. 00058 virtual int GetParticleFromFace(int faceID) { return 0; } 00059 00060 // SupportsIndirMtlRefs returns TRUE if the object can return a material 00061 // pointer given a face being rendered, and FALSE if the object will be 00062 // associated for that render pass with only the object applied to the 00063 // node, 00069 virtual BOOL SupportsIndirMtlRefs() { return FALSE; } 00070 00071 // If SupportsIndirMtlRefs returns TRUE, then the following methods are meaningful. 00072 00073 // NumberOfMtlsUsed returns the number of different materials used on the object 00074 // This number is used in enumerating the different materials via GetNthMtl and getNthMaxMtlID. 00081 virtual int NumberOfMtlsUsed() { return 0; } 00082 00083 // Returns the different materials used on the object. 00093 virtual Mtl* GetNthMtl(int n) { return NULL; } 00094 00095 // Returns the maximum material ID number used with each of the materials on the object 00104 virtual int GetNthMaxMtlID(int n) { return 0; } 00105 00106 // Get MaterialFromFace returns a pointer to the material associated 00107 // with the face identified by faceID. 00116 virtual Mtl* GetMaterialFromFace(int faceID) { return NULL; } 00117 }; 00118 #pragma warning(pop) 00119 00120