MDL SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
imdl_factory.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2022 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IMDL_FACTORY_H
8 #define MI_NEURAYLIB_IMDL_FACTORY_H
9 
12 #include <mi/neuraylib/version.h>
13 
14 namespace mi {
15 
16 class IArray;
17 class IString;
18 
19 namespace neuraylib {
20 
21 class IExpression_factory;
22 class IMdl_execution_context;
23 class IMdl_module_builder;
24 class IMdl_module_transformer;
25 class ITransaction;
26 class IType_factory;
27 class IValue_bsdf_measurement;
28 class IValue_factory;
29 class IValue_light_profile;
30 class IValue_texture;
31 
43 class IMdl_factory : public
48  mi::base::Interface_declare<0xba936279,0x4b71,0x42a4,0x95,0x37,0x98,0x69,0x97,0xb3,0x47,0x72>
49 {
50 public:
52  virtual IType_factory* create_type_factory( ITransaction* transaction) = 0;
53 
55  virtual IValue_factory* create_value_factory( ITransaction* transaction) = 0;
56 
58  virtual IExpression_factory* create_expression_factory( ITransaction* transaction) = 0;
59 
61  virtual IMdl_execution_context* create_execution_context() = 0;
62 
70  virtual IMdl_execution_context* clone( const IMdl_execution_context* context) = 0;
71 
102  virtual IValue_texture* create_texture(
103  ITransaction* transaction,
104  const char* file_path,
105  IType_texture::Shape shape,
106  Float32 gamma,
107  const char* selector,
108  bool shared,
109  Sint32* errors = 0) = 0;
110 
111 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
112  inline IValue_texture* create_texture(
113  ITransaction* transaction,
114  const char* file_path,
115  IType_texture::Shape shape,
116  Float32 gamma,
117  bool shared,
118  Sint32* errors = 0)
119  { return create_texture( transaction, file_path, shape, gamma, 0, shared, errors); }
120 #endif // MI_NEURAYLIB_DEPRECATED_12_1
121 
144  virtual IValue_light_profile* create_light_profile(
145  ITransaction* transaction, const char* file_path, bool shared, Sint32* errors = 0) = 0;
146 
170  virtual IValue_bsdf_measurement* create_bsdf_measurement(
171  ITransaction* transaction, const char* file_path, bool shared, Sint32* errors = 0) = 0;
172 
191  virtual IMdl_module_builder* create_module_builder(
192  ITransaction* transaction,
193  const char* module_name,
194  Mdl_version min_module_version,
195  Mdl_version max_module_version,
196  IMdl_execution_context* context) = 0;
197 
207  virtual IMdl_module_transformer* create_module_transformer(
208  ITransaction* transaction, const char* module_name, IMdl_execution_context* context) = 0;
209 
224  virtual const IString* get_db_module_name( const char* mdl_name) = 0;
225 
240  virtual const IString* get_db_definition_name( const char* mdl_name) = 0;
241 
278  virtual void analyze_uniform(
279  ITransaction* transaction,
280  const char* root_name,
281  bool root_uniform,
282  const IExpression* query_expr,
283  bool& query_result,
284  IString* error_path,
285  IMdl_execution_context* context) const = 0;
286 
302  virtual const IString* decode_name( const char* name) = 0;
303 
315  virtual const IString* encode_module_name( const char* name) = 0;
316 
336  virtual const IString* encode_function_definition_name(
337  const char* name, const IArray* parameter_types) const = 0;
338 
351  virtual const IString* encode_type_name( const char* name) const = 0;
352 
353  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_12_0(create_variants)(
354  ITransaction* transaction, const char* module_name, const IArray* variant_data) = 0;
355 
356  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_12_0(create_materials)(
357  ITransaction* transaction, const char* module_name, const IArray* material_data) = 0;
358 
359  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_12_0(create_materials)(
360  ITransaction* transaction,
361  const char* module_name,
362  const IArray* mdl_data,
363  IMdl_execution_context* context) = 0;
364 };
365  // end group mi_neuray_mdl_misc
367 
368 } // namespace neuraylib
369 
370 } // namespace mi
371 
372 #endif // MI_NEURAYLIB_IMDL_FACTORY_H