Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
imaterial_instance.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2020 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IMATERIAL_INSTANCE_H
8 #define MI_NEURAYLIB_IMATERIAL_INSTANCE_H
9 
13 
14 namespace mi {
15 
16 namespace neuraylib {
17 
22 class ICompiled_material;
23 class IMdl_execution_context;
24 
33 class IMaterial_instance : public
34  mi::base::Interface_declare<0x037ec156,0x281d,0x466a,0xa1,0x56,0x3e,0xd6,0x83,0xe9,0x5a,0x00,
35  neuraylib::IScene_element>
36 {
37 public:
44  virtual const char* get_material_definition() const = 0;
45 
50  virtual const char* get_mdl_material_definition() const = 0;
51 
53  virtual Size get_parameter_count() const = 0;
54 
59  virtual const char* get_parameter_name( Size index) const = 0;
60 
65  virtual Size get_parameter_index( const char* name) const = 0;
66 
68  virtual const IType_list* get_parameter_types() const = 0;
69 
71  virtual const IExpression_list* get_arguments() const = 0;
72 
96  virtual Sint32 set_arguments( const IExpression_list* arguments) = 0;
97 
119  virtual Sint32 set_argument( Size index, const IExpression* argument) = 0;
120 
142  virtual Sint32 set_argument( const char* name, const IExpression* argument) = 0;
143 
150  COMPILATION_OPTIONS_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only
151  };
152 
153  mi_static_assert( sizeof( Compilation_options) == sizeof( mi::Uint32));
154 
187  Uint32 flags,
188  IMdl_execution_context* context = 0) const = 0;
189 
197  virtual bool is_default() const = 0;
198 
210  virtual bool is_valid(IMdl_execution_context* context) const = 0;
211 
220  virtual Sint32 repair(
221  Uint32 flags,
222  IMdl_execution_context* context) = 0;
223 };
224  // end group mi_neuray_mdl_elements
226 
227 } // namespace neuraylib
228 
229 } // namespace mi
230 
231 #endif // MI_NEURAYLIB_IMATERIAL_INSTANCE_H