MDL SDK API nvidia_logo_transpbg.gif Up
imdl_discovery_api.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2025 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
12namespace mi {
13
14class IString;
15
16namespace neuraylib {
17
18
21class IMdl_info : public
22 base::Interface_declare<0xd2f50312,0xe76c,0x4d64,0xa5,0x91,0xcb,0x70,0x38,0x2c,0xa9,0x9f>
23{
24public:
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
49mi_static_assert(sizeof(IMdl_info::Kind) == sizeof(Uint32));
50
52class IMdl_module_info : public
53 base::Interface_declare<0x22,0x1204,0x46,0xb1,0x5b,0xbf,0xa8,0x11,0xc7,0xe7,0xe1,
54 neuraylib::IMdl_info>
55
56{
57public:
58
60 virtual Size get_search_path_index() const = 0;
61
63 virtual const char* get_search_path() const = 0;
64
66 virtual const IString* get_resolved_path() const = 0;
67
69 virtual Size get_shadows_count() const = 0;
70
73 virtual const IMdl_module_info* get_shadow(Size index) const = 0;
74
76 virtual bool in_archive() const = 0;
77};
78
80class IMdl_xliff_info : public
81 base::Interface_declare<0x3a,0xdf,0x8a,0x42,0x94,0x09,0x59,0xe6,0xf9,0x25,0x67,
82 neuraylib::IMdl_info>
83{
84public:
85
87 virtual const char* get_resolved_path() const = 0;
88
90 virtual Size get_search_path_index() const = 0;
91
93 virtual const char* get_search_path() const = 0;
94
96 virtual bool in_archive() const = 0;
97};
98
100class IMdl_resource_info : public
101 base::Interface_declare<0x28,0x54,0x6b,0xcd,0x14,0x59,0xfd,0x42,0x9d,0xfa,0xd5,
102 neuraylib::IMdl_info>
103{
104public:
105
107 virtual Size get_search_path_index() const = 0;
108
110 virtual const char* get_search_path() const = 0;
111
113 virtual const char* get_extension() const = 0;
114
116 virtual const char* get_resolved_path() const = 0;
117
119 virtual Size get_shadows_count() const = 0;
120
123 virtual const IMdl_resource_info* get_shadow(Size index) const = 0;
124
126 virtual bool in_archive() const = 0;
127};
128
129
131class IMdl_texture_info : public
132 base::Interface_declare<0x62,0x71,0xac,0x50,0xde,0xa9,0x40,0x92,0x8b,0xf0,0x1d,
133 neuraylib::IMdl_resource_info>
134{
135};
136
139 base::Interface_declare<0x17,0x23,0x61,0xf4,0xcb,0x64,0xb3,0x40,0xb4,0x45,0x07,
140 neuraylib::IMdl_resource_info>
141{
142};
143
146 base::Interface_declare<0xce,0x45,0xe6,0xef,0xdc,0x74,0x00,0x4f,0xac,0xae,0x34,
147 neuraylib::IMdl_resource_info>
148{
149};
150
152class IMdl_package_info : public
153 base::Interface_declare<0x94d,0x66,0x47a,0xb0,0xc3,0x7b,0x68,0xba,0x40,0xde,0x06,
154 neuraylib::IMdl_info>
155{
156public:
157
159 virtual Size get_child_count() const = 0;
160
163 virtual const IMdl_info* get_child(Size index) const = 0;
164
167
170 virtual Size get_search_path_index(Size index) const = 0;
171
174 virtual const char* get_search_path(Size index) const = 0;
175
178 virtual const IString* get_resolved_path(Size index) const = 0;
179
182 virtual bool in_archive(Size index) const = 0;
183};
184
185
188 base::Interface_declare<0xe3c1bc1a,0xb1db,0x4c8c,0xba,0x41,0x37,0xed,0x87,0xb7,0x86,0xb8>
189{
190public:
191
193 virtual const IMdl_package_info* get_graph() const = 0;
194
196 virtual Size get_search_paths_count() const = 0;
197
200 virtual const char* get_search_path(Size index) const = 0;
201};
202
226class IMdl_discovery_api : public
227 base::Interface_declare<0x208aa1f2,0x08bc,0x4c81,0x8b,0x0f,0x54,0xba,0x4a,0x61,0xe9,0xd8>
228{
229public:
230
236 Uint32 filter = static_cast<Uint32>(IMdl_info::DK_ALL)) const = 0;
237};
238
239} // namespace neuraylib
240
241} // namespace mi
242
243#endif // MI_NEURAYLIB_IMDL_DISCOVERY_API_H
A simple string class.
Definition: istring.h:22
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Interface for the discovery API.
Definition: imdl_discovery_api.h:228
virtual const IMdl_discovery_result * discover(Uint32 filter=static_cast<Uint32>(IMdl_info::DK_ALL)) const =0
Returns the file system and archive discovery result.
Interface for the discovery result.
Definition: imdl_discovery_api.h:189
virtual const IMdl_package_info * get_graph() const =0
Returns a pointer to the root of the discovered graph.
virtual const char * get_search_path(Size index) const =0
Returns the search path in the local file system referenced by index.
virtual Size get_search_paths_count() const =0
Returns the number of search paths.
Abstract interface for a discovery graph node.
Definition: imdl_discovery_api.h:23
Kind
The kinds of the graph nodes.
Definition: imdl_discovery_api.h:27
virtual const char * get_qualified_name() const =0
Returns the qualified name of the graph node.
virtual Kind get_kind() const =0
Returns the kind of the graph node.
virtual const char * get_simple_name() const =0
Returns the simple_name (tail of the qualified_name) of the graph node.
Interface for lightprofile files.
Definition: imdl_discovery_api.h:141
Interface for measured bsdf files.
Definition: imdl_discovery_api.h:148
Interface for a graph node representing an MDL module.
Definition: imdl_discovery_api.h:56
virtual Size get_search_path_index() const =0
Returns the index of the search path where this module has been found.
virtual const IString * get_resolved_path() const =0
Returns an absolute path to the module file in the local file system.
virtual const IMdl_module_info * get_shadow(Size index) const =0
Returns one of the shadows this module has.
virtual bool in_archive() const =0
Returns true if the module has been discovered inside of an archive, false if not.
virtual const char * get_search_path() const =0
Returns the search path in the local file system that contains this module.
virtual Size get_shadows_count() const =0
Returns the number of shadows of this module.
Interface for a graph node representing an MDL package.
Definition: imdl_discovery_api.h:155
virtual const IString * get_resolved_path(Size index) const =0
Returns an absolute path to package in the local file system.
virtual Size get_child_count() const =0
Returns the number of modules and packages contained by this package.
virtual const char * get_search_path(Size index) const =0
Returns a search path in the local file system where this package has been found.
virtual const IMdl_info * get_child(Size index) const =0
Returns a child of this package.
virtual Size get_search_path_index(Size index) const =0
Returns the search path index in the current IMdl_discovery_result.
virtual bool in_archive(Size index) const =0
Returns true if the package has been discovered inside of an archive, false if not.
virtual Size get_search_path_index_count() const =0
Returns the number of search paths of this package.
Interface for resources.
Definition: imdl_discovery_api.h:103
virtual const char * get_extension() const =0
Returns the file extension of the resource file.
virtual Size get_search_path_index() const =0
Returns the index of the search path where this resource has been found.
virtual bool in_archive() const =0
Returns true if the resource has been discovered inside of an archive, false if not.
virtual const char * get_search_path() const =0
Returns the search path in the local file system that contains this resource.
virtual Size get_shadows_count() const =0
Returns the number of shadows of this resource.
virtual const char * get_resolved_path() const =0
Returns an absolute path to the resource file in the local file system.
virtual const IMdl_resource_info * get_shadow(Size index) const =0
Returns one of the shadows this resource has.
Interface for texture files.
Definition: imdl_discovery_api.h:134
Interface for xliff files.
Definition: imdl_discovery_api.h:83
virtual Size get_search_path_index() const =0
Returns the index of the search path where the xliff file has been found.
virtual const char * get_search_path() const =0
Returns the search path in the local file system that contains this xliff file.
virtual const char * get_resolved_path() const =0
Returns an absolute path to the xliff file in the local file system.
virtual bool in_archive() const =0
Returns true if the xliff file has been discovered inside of an archive, false if not.
#define mi_static_assert(expr)
Compile time assertion that raises a compilation error if the constant expression expr evaluates to f...
Definition: assert.h:58
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5