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
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
81 virtual const IString* get_mdl_path( Size index) const = 0;
82
84 virtual Size get_mdl_system_paths_length() const = 0;
85
98 virtual const char* get_mdl_system_path( Size index) const = 0;
99
102 {
103 for( mi::Size i = 0, n = get_mdl_system_paths_length(); i < n; ++i)
105 }
106
108 virtual Size get_mdl_user_paths_length() const = 0;
109
124 virtual const char* get_mdl_user_path( Size index) const = 0;
125
127 inline void add_mdl_user_paths()
128 {
129 for( mi::Size i = 0, n = get_mdl_user_paths_length(); i < n; ++i)
131 }
132
134
136
148 virtual Sint32 add_resource_path( const char* path) = 0;
149
161 virtual Sint32 remove_resource_path( const char* path) = 0;
162
168 virtual void clear_resource_paths() = 0;
169
177 virtual Size get_resource_paths_length() const = 0;
178
186 virtual const IString* get_resource_path( Size index) const = 0;
187
189
191
207 virtual Sint32 set_implicit_cast_enabled( bool value) = 0;
208
213 virtual bool get_implicit_cast_enabled() const = 0;
214
224 // is no guarantee that the name of a particular let expression is exposed.
230
234 virtual bool get_expose_names_of_let_expressions() const = 0;
235
248
252
254
256
265
274 virtual void set_entity_resolver( IMdl_entity_resolver* resolver) = 0;
275
277
278 virtual void MI_NEURAYLIB_DEPRECATED_METHOD_14_1(set_logger)( base::ILogger* logger) = 0;
279
280 virtual base::ILogger* MI_NEURAYLIB_DEPRECATED_METHOD_14_1(get_logger)() = 0;
281
283
284
301 virtual Sint32 set_material_ior_frequency( IType::Modifier frequency_qualifier) = 0;
302
307
309};
310 // end group mi_neuray_configuration
312
313} // namespace neuraylib
314
315} // namespace mi
316
317#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: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:101
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:127
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:198
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.
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.