Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IMdl_discovery_api Class Referenceabstract

Interface for the discovery API. More...

Inheritance diagram for mi::neuraylib::IMdl_discovery_api:
mi::base::Interface_declare< 0x208aa1f2, 0x08bc, 0x4c81, 0x8b, 0x0f, 0x54, 0xba, 0x4a, 0x61, 0xe9, 0xd8 > mi::base::IInterface

Public Member Functions

virtual const
IMdl_discovery_result
discover (Uint32 filter=IMdl_info::DK_ALL) const =0
 Returns the file system and archive discovery result. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x208aa1f2, 0x08bc, 0x4c81, 0x8b, 0x0f, 0x54, 0xba, 0x4a, 0x61, 0xe9, 0xd8 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x208aa1f2, 0x08bc, 0x4c81, 0x8b, 0x0f, 0x54, 0xba, 0x4a, 0x61, 0xe9, 0xd8 >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

Interface for the discovery API.

The discovery API offers functionality to find MDL content in the registered MDL search paths. These search paths have to be declared with the function call::mi::neuraylib::IMdl_compiler::add_module_path() in advance. The ordering of the search paths results from the ordering of the registration and is taken into account during the discovery process.

The MDL modules and packages found inside a search path are assembled into a graph structure consisting of package and module nodes. The discovery results of multiple search paths are merged to one result graph. If a module is found, but there exists already a module with the same qualified name in a previously discovered graph, the additional module will be handled as a shadow of the existing module. Multiple packages with the same qualified name will be merged into one package.

The discovery API works for both MDL files (.mdl) and MDL archive files (.mdr). Archives have to be installed in the top level of the search paths, but material files can be placed anywhere across the sub-folders of a search path.

The result of a discovery process is provided as an mi::neuraylib::IMdl_discovery_result. This data structure provides information about the discovered search paths as well as access to the result graph structure.

Member Function Documentation

virtual const IMdl_discovery_result* mi::neuraylib::IMdl_discovery_api::discover ( Uint32  filter = IMdl_info::DK_ALL) const
pure virtual

Returns the file system and archive discovery result.

Parameters
filterBitmask, that can be used to specify which discovery kinds to include in the result (see mi::neuraylib::IMdl_info::Kind). By default, all kinds are included.