IParameterTranslator.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2010 Autodesk, Inc.  All rights reserved.
00003 //
00004 // Use of this software is subject to the terms of the Autodesk license
00005 // agreement provided at the time of installation or download, or which 
00006 // otherwise accompanies this software in either electronic or hard copy form.   
00007 //
00008 //
00009 
00010 #pragma once
00011 
00012 #include "../baseinterface.h"
00013 #include "../strclass.h"
00014 
00016 #define IPARAMETER_TRANSLATOR_INTERFACE_ID Interface_ID(0x31230111, 0x1c385ce3)
00017 
00018 namespace MaxSDK { namespace Graphics {
00019 
00082     class IParameterTranslator : public BaseInterface
00083     {
00084     public:
00086         enum ShaderParameterType
00087         {
00088             ShaderParameterTypeUnknown = 0,
00089             ShaderParameterTypeFloat,      
00090             ShaderParameterTypeInt,        
00091             ShaderParameterTypeBool,       
00092             ShaderParameterTypeColor,      
00093             ShaderParameterTypePoint2,     
00094             ShaderParameterTypePoint3,     
00095             ShaderParameterTypePoint4,     
00096             ShaderParameterTypeTexture,    
00097         };
00098 
00100         enum SubMtlBaseType
00101         {
00102             SubMaterial, 
00103             SubTexmap,   
00104         };
00105 
00108         virtual Interface_ID GetID() { return IPARAMETER_TRANSLATOR_INTERFACE_ID; }
00109 
00120         virtual bool GetParameterValue(
00121             const TimeValue t, 
00122             const MCHAR* shaderParamName, 
00123             void* value, 
00124             ShaderParameterType type) = 0 ;
00125 
00137         virtual bool GetShaderInputParameterName(SubMtlBaseType type, int subMtlBaseIndex, MSTR& shaderInputParamName) =0 ;
00138 
00144         virtual bool OnPreParameterTranslate() = 0 ;
00145     };
00146 
00147 
00148 } } // end namespace