MDL SDK API nvidia_logo_transpbg.gif Up
imdl_configuration.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IMDL_CONFIGURATION_H
8#define MI_NEURAYLIB_IMDL_CONFIGURATION_H
9
12
13namespace mi {
14
15class IString;
16
17namespace base { class ILogger; }
18
19namespace neuraylib {
20
21class IMdl_entity_resolver;
22
28class IMdl_configuration : public
29 mi::base::Interface_declare<0x2657ec0b,0x8a40,0x46c5,0xa8,0x3f,0x2b,0xb5,0x72,0xa0,0x8b,0x9c>
30{
31public:
32
34
35
46 virtual Sint32 add_mdl_path( const char* path) = 0;
47
58 virtual Sint32 remove_mdl_path( const char* path) = 0;
59
64 virtual void clear_mdl_paths() = 0;
65
72 virtual Size get_mdl_paths_length() const = 0;
73
80 virtual const IString* get_mdl_path( Size index) const = 0;
81
83 virtual Size get_mdl_system_paths_length() const = 0;
84
97 virtual const char* get_mdl_system_path( Size index) const = 0;
98
101 {
102 for( mi::Size i = 0, n = get_mdl_system_paths_length(); i < n; ++i)
104 }
105
107 virtual Size get_mdl_user_paths_length() const = 0;
108
123 virtual const char* get_mdl_user_path( Size index) const = 0;
124
126 inline void add_mdl_user_paths()
127 {
128 for( mi::Size i = 0, n = get_mdl_user_paths_length(); i < n; ++i)
130 }
131
133
135
147 virtual Sint32 add_resource_path( const char* path) = 0;
148
160 virtual Sint32 remove_resource_path( const char* path) = 0;
161
167 virtual void clear_resource_paths() = 0;
168
176 virtual Size get_resource_paths_length() const = 0;
177
185 virtual const IString* get_resource_path( Size index) const = 0;
186
188
190
204 virtual Sint32 set_implicit_cast_enabled( bool value) = 0;
205
210 virtual bool get_implicit_cast_enabled() const = 0;
211
221 // is no guarantee that the name of a particular let expression is exposed.
225
229 virtual bool get_expose_names_of_let_expressions() const = 0;
230
243
247
249
251
257
266 virtual void set_entity_resolver( IMdl_entity_resolver* resolver) = 0;
267
269
270 virtual void MI_NEURAYLIB_DEPRECATED_METHOD_14_1(set_logger)( base::ILogger* logger) = 0;
271
272 virtual base::ILogger* MI_NEURAYLIB_DEPRECATED_METHOD_14_1(get_logger)() = 0;
273};
274 // end group mi_neuray_configuration
276
277} // namespace neuraylib
278
279} // namespace mi
280
281#endif // MI_NEURAYLIB_IMDL_CONFIGURATION_H
A simple string class.
Definition: istring.h:22
The ILogger interface class supports logging of messages.
Definition: ilogger.h:194
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
This interface can be used to query and change the MDL configuration.
Definition: imdl_configuration.h:30
virtual Sint32 set_expose_names_of_let_expressions(bool value)=0
Defines whether an attempt is made to expose names of let expressions.
virtual bool get_simple_glossy_bsdf_legacy_enabled() const =0
Returns true if the legacy behavior for bsdfs of type df::simple_glossy_bsdf() used in MDL modules wi...
virtual Sint32 remove_mdl_path(const char *path)=0
Removes a path from the list of paths to search for MDL modules.
virtual Sint32 set_simple_glossy_bsdf_legacy_enabled(bool value)=0
Configures the behavior of df::simple_glossy_bsdf() in MDL modules of versions smaller than 1....
virtual Size get_resource_paths_length() const =0
Returns the number of paths to search for resources, i.e., textures, light profiles,...
virtual IMdl_entity_resolver * get_entity_resolver() const =0
Returns an instance of the built-in entity resolver.
virtual Sint32 add_mdl_path(const char *path)=0
Adds a path to the list of paths to search for MDL modules.
void add_mdl_system_paths()
Adds the MDL system paths to the MDL search path.
Definition: imdl_configuration.h:100
virtual Size get_mdl_paths_length() const =0
Returns the number of paths to search for MDL modules.
virtual const IString * get_mdl_path(Size index) const =0
Returns the index -th path to search for MDL modules.
virtual bool get_expose_names_of_let_expressions() const =0
Indicates whether an attempt is made to expose names of let expressions.
void add_mdl_user_paths()
Adds the MDL user paths to the MDL search path.
Definition: imdl_configuration.h:126
virtual void set_entity_resolver(IMdl_entity_resolver *resolver)=0
Installs an external entity resolver.
virtual const IString * get_resource_path(Size index) const =0
Returns the index -th path to search for resources, i.e., textures, light profiles,...
virtual void clear_resource_paths()=0
Clears the list of paths to search for resources, i.e., textures, light profiles, and BSDF measuremen...
virtual Sint32 add_resource_path(const char *path)=0
Adds a path to the list of paths to search for resources, i.e., textures, light profiles,...
virtual bool get_implicit_cast_enabled() const =0
Indicates whether the SDK is supposed to automatically insert the cast operator for compatible types.
virtual const char * get_mdl_system_path(Size index) const =0
Returns the index -th path in the MDL system paths.
virtual Size get_mdl_user_paths_length() const =0
Returns the number of MDL user paths.
virtual Size get_mdl_system_paths_length() const =0
Returns the number of MDL system paths.
virtual Sint32 set_implicit_cast_enabled(bool value)=0
Defines whether a cast operator is automatically inserted for compatible argument types.
virtual const char * get_mdl_user_path(Size index) const =0
Returns the index -th path in the MDL user paths.
virtual void clear_mdl_paths()=0
Clears the list of paths to search for MDL modules.
virtual Sint32 remove_resource_path(const char *path)=0
Removes a path from the list of paths to search for resources, i.e., textures, light profiles,...
The entity resolver is used to resolve MDL modules and resources in such modules.
Definition: imdl_entity_resolver.h:34
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
Major and minor version number and an optional qualifier.