MDL SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
imdl_impexp_api.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2022 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IMDL_IMPEXP_API_H
8 #define MI_NEURAYLIB_IMDL_IMPEXP_API_H
9 
11 #include <mi/neuraylib/version.h>
12 
13 namespace mi {
14 
15 class IString;
16 
17 namespace neuraylib {
18 
19 class IBuffer;
20 class IBsdf_isotropic_data;
21 class ICanvas;
22 class IDeserialized_function_name;
23 class IDeserialized_module_name;
24 class ILightprofile;
25 class IMdl_execution_context;
26 class IMdle_deserialization_callback;
27 class IMdle_serialization_callback;
28 class IReader;
29 class ISerialized_function_name;
30 class ITransaction;
31 class IType;
32 class IType_list;
33 class IWriter;
34 
39 class IMdl_impexp_api : public
41  mi::base::Interface_declare<0xd8584ade,0xa400,0x486b,0xab,0x29,0x39,0xcd,0x87,0x55,0x14,0x5d>
42 {
43 public:
44 
46 
47 
83  virtual Sint32 load_module(
84  ITransaction* transaction, const char* argument, IMdl_execution_context* context = 0) = 0;
85 
123  ITransaction* transaction,
124  const char* module_name,
125  const char* module_source,
126  IMdl_execution_context* context = 0) = 0;
127 
129 
131 
160  virtual Sint32 export_module(
161  ITransaction* transaction,
162  const char* module_name,
163  const char* filename,
164  IMdl_execution_context* context = 0) = 0;
165 
197  ITransaction* transaction,
198  const char* module_name,
199  IString* exported_module,
200  IMdl_execution_context* context = 0) = 0;
201 
237  virtual Sint32 export_canvas(
238  const char* filename,
239  const ICanvas* canvas,
240  Uint32 quality = 100,
241  bool force_default_gamma = false) const = 0;
242 
252  virtual Sint32 export_lightprofile(
253  const char* filename, const ILightprofile* lightprofile) const = 0;
254 
264  virtual Sint32 export_bsdf_data(
265  const char* filename,
266  const IBsdf_isotropic_data* reflection,
267  const IBsdf_isotropic_data* transmission) const = 0;
268 
270 
272 
275  {
282  // Undocumented, for alignment only.
283  SEARCH_OPTION_FORCE_32_BIT = 0xffffffffU
284  };
285 
300  virtual const IString* get_mdl_module_name(
301  const char* filename, Search_option option = SEARCH_OPTION_USE_FIRST) const = 0;
302 
311  virtual const IString* frame_uvtile_marker_to_string(
312  const char* marker, Size f, Sint32 u, Sint32 v) const = 0;
313 
314 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
315  inline const IString* uvtile_marker_to_string( const char* marker, Sint32 u, Sint32 v)
316  { return frame_uvtile_marker_to_string( marker, 0, u, v); }
317 #endif
318 
320 
322 
341  virtual const ISerialized_function_name* serialize_function_name(
342  const char* definition_name,
343  const IType_list* argument_types,
344  const IType* return_type,
345  IMdle_serialization_callback* mdle_callback,
346  IMdl_execution_context* context) const = 0;
347 
361  virtual const IDeserialized_function_name* deserialize_function_name(
362  ITransaction* transaction,
363  const char* function_name,
364  IMdle_deserialization_callback* mdle_callback,
365  IMdl_execution_context* context) const = 0;
366 
389  virtual const IDeserialized_function_name* deserialize_function_name(
390  ITransaction* transaction,
391  const char* module_name,
392  const char* function_name_without_module_name,
393  IMdle_deserialization_callback* mdle_callback,
394  IMdl_execution_context* context) const = 0;
395 
413  virtual const IDeserialized_module_name* deserialize_module_name(
414  const char* module_name,
415  IMdle_deserialization_callback* mdle_callback,
416  IMdl_execution_context* context) const = 0;
417 
419 
421 
423  virtual IReader* create_reader( const IBuffer* buffer) const = 0;
424 
430  virtual IReader* create_reader( const char* filename) const = 0;
431 
437  virtual IWriter* create_writer( const char* filename) const = 0;
438 
440 
441  virtual const IString* MI_NEURAYLIB_DEPRECATED_METHOD_12_1(uvtile_string_to_marker)(
442  const char* str, const char* marker) const = 0;
443 
444  virtual const IString* MI_NEURAYLIB_DEPRECATED_METHOD_12_1(frame_string_to_marker)(
445  const char* str, Size digits) const = 0;
446 };
447 
449 
454  mi::base::Interface_declare<0x1b22f27d,0xf815,0x495f,0x96,0x71,0x64,0x08,0x5a,0xcc,0x8c,0x0d>
455 {
456 public:
463  virtual const char* get_function_name() const = 0;
464 
471  virtual const char* get_module_name() const = 0;
472 
479  virtual const char* get_function_name_without_module_name() const = 0;
480 };
481 
486  mi::base::Interface_declare<0x2bb03f26,0x3a73,0x499d,0x90,0x64,0x19,0x79,0xea,0x40,0xc1,0x49>
487 {
488 public:
490  virtual const char* get_db_name() const = 0;
491 
498  virtual const IType_list* get_argument_types() const = 0;
499 };
500 
505  mi::base::Interface_declare<0xe2136899,0x0011,0x45d1,0xb0,0x45,0xa7,0xbb,0x03,0xa7,0xf4,0x0c>
506 {
507 public:
509  virtual const char* get_db_name() const = 0;
510 
512  virtual const char* get_load_module_argument() const = 0;
513 };
514 
528  mi::base::Interface_declare<0x5888652a,0x79d6,0x49ba,0x87,0x90,0x0c,0x1b,0x32,0x83,0xf8,0x63>
529 {
530 public:
543  virtual const IString* get_serialized_filename( const char* filename) const = 0;
544 };
545 
560  mi::base::Interface_declare<0xe7f636eb,0x8d04,0x4e3b,0x97,0x67,0x3a,0x93,0x1c,0x90,0xc9,0x7e>
561 {
562 public:
572  virtual const IString* get_deserialized_filename( const char* serialized_filename) const = 0;
573 };
574  // end group mi_neuray_mdl_misc
576 
577 } // namespace neuraylib
578 
579 } // namespace mi
580 
581 #endif // MI_NEURAYLIB_IMDL_IMPEXP_API_H