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 2019 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IMATERIAL_INSTANCE_H
8 #define MI_NEURAYLIB_IMATERIAL_INSTANCE_H
9 
12 
13 namespace mi {
14 
15 namespace neuraylib {
16 
21 class ICompiled_material;
22 class IMdl_execution_context;
23 
32 class IMaterial_instance : public
33  mi::base::Interface_declare<0x037ec156,0x281d,0x466a,0xa1,0x56,0x3e,0xd6,0x83,0xe9,0x5a,0x00,
34  neuraylib::IScene_element>
35 {
36 public:
43  virtual const char* get_material_definition() const = 0;
44 
49  virtual const char* get_mdl_material_definition() const = 0;
50 
52  virtual Size get_parameter_count() const = 0;
53 
58  virtual const char* get_parameter_name( Size index) const = 0;
59 
64  virtual Size get_parameter_index( const char* name) const = 0;
65 
67  virtual const IType_list* get_parameter_types() const = 0;
68 
70  virtual const IExpression_list* get_arguments() const = 0;
71 
95  virtual Sint32 set_arguments( const IExpression_list* arguments) = 0;
96 
118  virtual Sint32 set_argument( Size index, const IExpression* argument) = 0;
119 
141  virtual Sint32 set_argument( const char* name, const IExpression* argument) = 0;
142 
149  COMPILATION_OPTIONS_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only
150  };
151 
152  mi_static_assert( sizeof( Compilation_options) == sizeof( mi::Uint32));
153 
175  Uint32 flags,
176  Float32 mdl_meters_per_scene_unit,
177  Float32 mdl_wavelength_min,
178  Float32 mdl_wavelength_max,
179  Sint32* errors = 0) const = 0;
180 
181 #ifdef MI_NEURAYLIB_DEPRECATED_9_1
203  Uint32 flags,
204  Float32 mdl_meters_per_scene_unit,
205  Float32 mdl_wavelength_min,
206  Float32 mdl_wavelength_max,
207  Sint32* errors = 0) const
208  {
210  flags,
211  mdl_meters_per_scene_unit,
212  mdl_wavelength_min,
213  mdl_wavelength_max,
214  errors);
215  }
216 #endif
217 
237  virtual ICompiled_material* create_compiled_material(
238  Uint32 flags,
239  IMdl_execution_context* context = 0) const = 0;
240 
248  virtual bool is_default() const = 0;
249 };
250  // end group mi_neuray_mdl_elements
252 
253 } // namespace neuraylib
254 
255 } // namespace mi
256 
257 #endif // MI_NEURAYLIB_IMATERIAL_INSTANCE_H