MDL SDK API nvidia_logo_transpbg.gif Up
imdl_configuration.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2022 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IMDL_CONFIGURATION_H
8#define MI_NEURAYLIB_IMDL_CONFIGURATION_H
9
11
12namespace mi {
13
14class IString;
15
16namespace base { class ILogger; }
17
18namespace neuraylib {
19
20class IMdl_entity_resolver;
21
27class IMdl_configuration : public
28 mi::base::Interface_declare<0x2657ec0b,0x8a40,0x46c5,0xa8,0x3f,0x2b,0xb5,0x72,0xa0,0x8b,0x9c>
29{
30public:
32
33
44 virtual void set_logger( base::ILogger* logger) = 0;
45
52 virtual base::ILogger* get_logger() = 0;
53
55
56
67 virtual Sint32 add_mdl_path( const char* path) = 0;
68
79 virtual Sint32 remove_mdl_path( const char* path) = 0;
80
85 virtual void clear_mdl_paths() = 0;
86
93 virtual Size get_mdl_paths_length() const = 0;
94
101 virtual const IString* get_mdl_path( Size index) const = 0;
102
105
118 virtual const char* get_mdl_system_path( Size index) const = 0;
119
122 {
123 for( mi::Size i = 0, n = get_mdl_system_paths_length(); i < n; ++i)
125 }
126
128 virtual Size get_mdl_user_paths_length() const = 0;
129
144 virtual const char* get_mdl_user_path( Size index) const = 0;
145
147 inline void add_mdl_user_paths()
148 {
149 for( mi::Size i = 0, n = get_mdl_user_paths_length(); i < n; ++i)
151 }
152
154
156
168 virtual Sint32 add_resource_path( const char* path) = 0;
169
181 virtual Sint32 remove_resource_path( const char* path) = 0;
182
188 virtual void clear_resource_paths() = 0;
189
197 virtual Size get_resource_paths_length() const = 0;
198
206 virtual const IString* get_resource_path( Size index) const = 0;
207
209
211
225 virtual Sint32 set_implicit_cast_enabled( bool value) = 0;
226
231 virtual bool get_implicit_cast_enabled() const = 0;
232
242 // is no guarantee that the name of a particular let expression is exposed.
246
250 virtual bool get_expose_names_of_let_expressions() const = 0;
251
264
268
270
272
278
287 virtual void set_entity_resolver( IMdl_entity_resolver* resolver) = 0;
288
290
292
296 virtual Sint32 set_materials_are_functions( bool value) = 0;
297
301 virtual bool get_materials_are_functions() const = 0;
302
322 virtual Sint32 set_encoded_names_enabled( bool value) = 0;
323
327 virtual bool get_encoded_names_enabled() const = 0;
328
330};
331 // end group mi_neuray_configuration
333
334} // namespace neuraylib
335
336} // namespace mi
337
338#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:29
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 base::ILogger * get_logger()=0
Returns the used logger.
virtual Sint32 add_mdl_path(const char *path)=0
Adds a path to the list of paths to search for MDL modules.
virtual Sint32 set_materials_are_functions(bool value)=0
Defines whether materials are treated as functions.
void add_mdl_system_paths()
Adds the MDL system paths to the MDL search path.
Definition: imdl_configuration.h:121
virtual Size get_mdl_paths_length() const =0
Returns the number of paths to search for MDL modules.
virtual void set_logger(base::ILogger *logger)=0
Sets the logger.
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:147
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 bool get_materials_are_functions() const =0
Indicates whether materials are treated as functions.
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 bool get_encoded_names_enabled() const =0
Indicates whether encoded names are enabled.
virtual Sint32 set_encoded_names_enabled(bool value)=0
Defines whether encoded names are enabled.
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:110
signed int Sint32
32-bit signed integer.
Definition: types.h:44
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5