MDL SDK API nvidia_logo_transpbg.gif Up
imdl_configuration.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2025 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IMDL_CONFIGURATION_H
8#define MI_NEURAYLIB_IMDL_CONFIGURATION_H
9
11#include <mi/neuraylib/itype.h>
13
14namespace mi {
15
16class IString;
17
18namespace base { class ILogger; }
19
20namespace neuraylib {
21
22class IMdl_entity_resolver;
23
29class IMdl_configuration : public
30 mi::base::Interface_declare<0x2657ec0b,0x8a40,0x46c5,0xa8,0x3f,0x2b,0xb5,0x72,0xa0,0x8b,0x9c>
31{
32public:
33
35
36
47 virtual Sint32 add_mdl_path( const char* path) = 0;
48
59 virtual Sint32 remove_mdl_path( const char* path) = 0;
60
65 virtual void clear_mdl_paths() = 0;
66
73 virtual Size get_mdl_paths_length() const = 0;
74
82 virtual const IString* get_mdl_path( Size index) const = 0;
83
85 virtual Size get_mdl_system_paths_length() const = 0;
86
99 virtual const char* get_mdl_system_path( Size index) const = 0;
100
103 {
104 for( mi::Size i = 0, n = get_mdl_system_paths_length(); i < n; ++i)
106 }
107
109 virtual Size get_mdl_user_paths_length() const = 0;
110
125 virtual const char* get_mdl_user_path( Size index) const = 0;
126
128 inline void add_mdl_user_paths()
129 {
130 for( mi::Size i = 0, n = get_mdl_user_paths_length(); i < n; ++i)
132 }
133
135
137
149 virtual Sint32 add_resource_path( const char* path) = 0;
150
162 virtual Sint32 remove_resource_path( const char* path) = 0;
163
169 virtual void clear_resource_paths() = 0;
170
178 virtual Size get_resource_paths_length() const = 0;
179
188 virtual const IString* get_resource_path( Size index) const = 0;
189
191
193
209 virtual Sint32 set_implicit_cast_enabled( bool value) = 0;
210
215 virtual bool get_implicit_cast_enabled() const = 0;
216
226 // is no guarantee that the name of a particular let expression is exposed.
232
236 virtual bool get_expose_names_of_let_expressions() const = 0;
237
250
254
256
258
267
276 virtual void set_entity_resolver( IMdl_entity_resolver* resolver) = 0;
277
279
280 virtual void MI_NEURAYLIB_DEPRECATED_METHOD_14_1(set_logger)( base::ILogger* logger) = 0;
281
282 virtual base::ILogger* MI_NEURAYLIB_DEPRECATED_METHOD_14_1(get_logger)() = 0;
283
285
286
303 virtual Sint32 set_material_ior_frequency( IType::Modifier frequency_qualifier) = 0;
304
309
311};
312 // end group mi_neuray_configuration
314
315} // namespace neuraylib
316
317} // namespace mi
318
319#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:195
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:31
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:102
virtual IType::Modifier get_material_ior_frequency() const =0
Returns the frequency of the material.ior field.
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:128
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 Sint32 set_material_ior_frequency(IType::Modifier frequency_qualifier)=0
Sets the frequency of the material.ior field.
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
Modifier
The possible kinds of type modifiers.
Definition: itype.h:201
int Sint32
32-bit signed integer.
Definition: types.h:46
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
Mixin class template for deriving new interface declarations.
Types of the MDL type system.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
Major and minor version number and an optional qualifier.