Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
imdl_discovery_api.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2020 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IMDL_DISCOVERY_API_H
8 #define MI_NEURAYLIB_IMDL_DISCOVERY_API_H
9 
11 
12 namespace mi {
13 
14 class IString;
15 
16 namespace neuraylib {
17 
18 
21 class IMdl_info : public
22  base::Interface_declare<0xd2f50312,0xe76c,0x4d64,0xa5,0x91,0xcb,0x70,0x38,0x2c,0xa9,0x9f>
23 {
24  public:
25 
27  enum Kind {
28  DK_PACKAGE = 0,
29  DK_MODULE = 1,
30  DK_XLIFF = 2,
31  DK_TEXTURE = 4,
32  DK_LIGHTPROFILE = 8,
33  DK_MEASURED_BSDF = 16,
34  DK_DIRECTORY = 32,
35  // next = 64
36  DK_ALL = 0xffffffffU
37  };
38 
40  virtual Kind get_kind() const = 0;
41 
43  virtual const char* get_qualified_name() const = 0;
44 
46  virtual const char* get_simple_name() const = 0;
47 };
48 mi_static_assert(sizeof(IMdl_info::Kind) == sizeof(Uint32));
49 
51 class IMdl_module_info : public
52  base::Interface_declare<0x22,0x1204,0x46,0xb1,0x5b,0xbf,0xa8,0x11,0xc7,0xe7,0xe1,IMdl_info>
53 
54 {
55  public:
56 
58  virtual Size get_search_path_index() const = 0;
59 
61  virtual const char* get_search_path() const = 0;
62 
64  virtual const IString* get_resolved_path() const = 0;
65 
67  virtual Size get_shadows_count() const = 0;
68 
71  virtual const IMdl_module_info* get_shadow(Size index) const = 0;
72 
74  virtual bool in_archive() const = 0;
75 };
76 
78 class IMdl_xliff_info : public
79  base::Interface_declare<0x3a, 0xdf, 0x8a, 0x42, 0x94, 0x09, 0x59, 0xe6, 0xf9, 0x25, 0x67, IMdl_info>
80 {
81 public:
82 
84  virtual const char* get_resolved_path() const = 0;
85 
87  virtual Size get_search_path_index() const = 0;
88 
90  virtual const char* get_search_path() const = 0;
91 
93  virtual bool in_archive() const = 0;
94 
95 };
96 
98 class IMdl_resource_info : public
99  base::Interface_declare<0x28,0x54,0x6b,0xcd,0x14,0x59,0xfd,0x42,0x9d,0xfa,0xd5, IMdl_info>
100 {
101 public:
102 
104  virtual Size get_search_path_index() const = 0;
105 
107  virtual const char* get_search_path() const = 0;
108 
110  virtual const char* get_extension() const = 0;
111 
113  virtual const char* get_resolved_path() const = 0;
114 
116  virtual Size get_shadows_count() const = 0;
117 
120  virtual const IMdl_resource_info* get_shadow(Size index) const = 0;
121 
123  virtual bool in_archive() const = 0;
124 
125 };
126 
127 
129 class IMdl_texture_info : public
130  base::Interface_declare<0x62,0x71,0xac,0x50,0xde,0xa9,0x40,0x92,0x8b,0xf0,0x1d,IMdl_resource_info>
131 {
132 
133 };
134 
137  base::Interface_declare<0x17,0x23,0x61,0xf4,0xcb,0x64,0xb3,0x40,0xb4,0x45,0x07,IMdl_resource_info>
138 {
139 
140 };
141 
144  base::Interface_declare<0xce,0x45,0xe6,0xef,0xdc,0x74,0x00,0x4f,0xac,0xae,0x34,IMdl_resource_info>
145 {
146 
147 };
148 
150 class IMdl_package_info : public
151  base::Interface_declare<0x94d,0x66,0x47a,0xb0,0xc3,0x7b,0x68,0xba,0x40,0xde,0x06,IMdl_info>
152 {
153  public:
154 
156  virtual Size get_child_count() const = 0;
157 
160  virtual const IMdl_info* get_child(Size index) const = 0;
161 
163  virtual Size get_search_path_index_count() const = 0;
164 
167  virtual Size get_search_path_index(Size index) const = 0;
168 
171  virtual const char* get_search_path(Size index) const = 0;
172 
175  virtual const IString* get_resolved_path(Size index) const = 0;
176 
179  virtual bool in_archive(Size index) const = 0;
180 };
181 
182 
184 class IMdl_discovery_result : public
185  base::Interface_declare<0xe3c1bc1a,0xb1db,0x4c8c,0xba,0x41,0x37,0xed,0x87,0xb7,0x86,0xb8>
186 {
187 public:
188 
190  virtual const IMdl_package_info* get_graph() const = 0;
191 
193  virtual Size get_search_paths_count() const = 0;
194 
197  virtual const char* get_search_path(Size index) const = 0;
198 
199 };
200 
224 class IMdl_discovery_api : public
225  base::Interface_declare<0x208aa1f2,0x08bc,0x4c81,0x8b,0x0f,0x54,0xba,0x4a,0x61,0xe9,0xd8>
226 {
227 public:
228 
233  virtual const IMdl_discovery_result* discover(
234  Uint32 filter = IMdl_info::DK_ALL) const = 0;
235 };
236 
237 } // namespace neuraylib
238 
239 } // namespace mi
240 
241 #endif // MI_NEURAYLIB_IMDL_DISCOVERY_API_H