MDL SDK API nvidia_logo_transpbg.gif Up
imdl_factory.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2022 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IMDL_FACTORY_H
8#define MI_NEURAYLIB_IMDL_FACTORY_H
9
13
14namespace mi {
15
16class IArray;
17class IString;
18
19namespace neuraylib {
20
21class IExpression_factory;
22class IMdl_execution_context;
23class IMdl_module_builder;
24class IMdl_module_transformer;
25class ITransaction;
26class IType_factory;
27class IValue_bsdf_measurement;
28class IValue_factory;
29class IValue_light_profile;
30class IValue_texture;
31
47class IMdl_factory : public
48 mi::base::Interface_declare<0xba936279,0x4b71,0x42a4,0x95,0x37,0x98,0x69,0x97,0xb3,0x47,0x72>
49{
50public:
52 virtual IType_factory* create_type_factory( ITransaction* transaction) = 0;
53
56
59
62
71
103 ITransaction* transaction,
104 const char* file_path,
106 Float32 gamma,
107 const char* selector,
108 bool shared,
109 Sint32* errors = 0) = 0;
110
111#ifdef MI_NEURAYLIB_DEPRECATED_12_1
113 ITransaction* transaction,
114 const char* file_path,
116 Float32 gamma,
117 bool shared,
118 Sint32* errors = 0)
119 { return create_texture( transaction, file_path, shape, gamma, 0, shared, errors); }
120#endif // MI_NEURAYLIB_DEPRECATED_12_1
121
145 ITransaction* transaction, const char* file_path, bool shared, Sint32* errors = 0) = 0;
146
171 ITransaction* transaction, const char* file_path, bool shared, Sint32* errors = 0) = 0;
172
192 ITransaction* transaction,
193 const char* module_name,
194 Mdl_version min_module_version,
195 Mdl_version max_module_version,
196 IMdl_execution_context* context) = 0;
197
208 ITransaction* transaction, const char* module_name, IMdl_execution_context* context) = 0;
209
224 virtual const IString* get_db_module_name( const char* mdl_name) = 0;
225
240 virtual const IString* get_db_definition_name( const char* mdl_name) = 0;
241
278 virtual void analyze_uniform(
279 ITransaction* transaction,
280 const char* root_name,
281 bool root_uniform,
282 const IExpression* query_expr,
283 bool& query_result,
284 IString* error_path,
285 IMdl_execution_context* context) const = 0;
286
302 virtual const IString* decode_name( const char* name) = 0;
303
315 virtual const IString* encode_module_name( const char* name) = 0;
316
337 const char* name, const IArray* parameter_types) const = 0;
338
351 virtual const IString* encode_type_name( const char* name) const = 0;
352
353 virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_12_0(create_variants)(
354 ITransaction* transaction, const char* module_name, const IArray* variant_data) = 0;
355
356 virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_12_0(create_materials)(
357 ITransaction* transaction, const char* module_name, const IArray* material_data) = 0;
358
359 virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_12_0(create_materials)(
360 ITransaction* transaction,
361 const char* module_name,
362 const IArray* mdl_data,
363 IMdl_execution_context* context) = 0;
364
366 virtual bool is_valid_mdl_identifier( const char* name) const = 0;
367};
368 // end group mi_neuray_mdl_misc
370
371} // namespace neuraylib
372
373} // namespace mi
374
375#endif // MI_NEURAYLIB_IMDL_FACTORY_H
This interface represents static arrays, i.e., arrays with a fixed number of elements.
Definition: iarray.h:37
A simple string class.
Definition: istring.h:22
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
The interface for creating expressions.
Definition: iexpression.h:541
The interface to MDL expressions.
Definition: iexpression.h:48
The execution context can be used to query status information like error and warning messages concern...
Definition: imdl_execution_context.h:126
Factory for various MDL interfaces and functions.
Definition: imdl_factory.h:49
virtual IMdl_execution_context * create_execution_context()=0
Creates an execution context.
virtual IMdl_module_builder * create_module_builder(ITransaction *transaction, const char *module_name, Mdl_version min_module_version, Mdl_version max_module_version, IMdl_execution_context *context)=0
Creates a module builder for a given module.
virtual IMdl_execution_context * clone(const IMdl_execution_context *context)=0
Clones an execution context.
virtual bool is_valid_mdl_identifier(const char *name) const =0
Indicates whether the given string is a valid MDL identifier.
virtual IType_factory * create_type_factory(ITransaction *transaction)=0
Returns an MDL type factory for the given transaction.
virtual const IString * encode_type_name(const char *name) const =0
Encodes an MDL type name.
virtual const IString * encode_module_name(const char *name)=0
Encodes a DB or MDL module name.
virtual IMdl_module_transformer * create_module_transformer(ITransaction *transaction, const char *module_name, IMdl_execution_context *context)=0
Creates a module transformer for a given module.
virtual IValue_bsdf_measurement * create_bsdf_measurement(ITransaction *transaction, const char *file_path, bool shared, Sint32 *errors=0)=0
Creates a value referencing a BSDF measurement identified by an MDL file path.
virtual IValue_light_profile * create_light_profile(ITransaction *transaction, const char *file_path, bool shared, Sint32 *errors=0)=0
Creates a value referencing a light profile identified by an MDL file path.
virtual void analyze_uniform(ITransaction *transaction, const char *root_name, bool root_uniform, const IExpression *query_expr, bool &query_result, IString *error_path, IMdl_execution_context *context) const =0
Analyzes whether an expression graph violates the uniform constraints.
virtual IExpression_factory * create_expression_factory(ITransaction *transaction)=0
Returns an MDL expression factory for the given transaction.
virtual const IString * get_db_module_name(const char *mdl_name)=0
Returns the DB name for the MDL name of a module (or file path for MDLE modules).
virtual const IString * decode_name(const char *name)=0
Decodes a DB or MDL name.
virtual const IString * encode_function_definition_name(const char *name, const IArray *parameter_types) const =0
Encodes a DB or MDL function or material definition name.
virtual IValue_texture * create_texture(ITransaction *transaction, const char *file_path, IType_texture::Shape shape, Float32 gamma, const char *selector, bool shared, Sint32 *errors=0)=0
Creates a value referencing a texture identified by an MDL file path.
virtual IValue_factory * create_value_factory(ITransaction *transaction)=0
Returns an MDL value factory for the given transaction.
virtual const IString * get_db_definition_name(const char *mdl_name)=0
Returns the DB name for the MDL name of an material or function definition.
The module builder allows to create new MDL modules.
Definition: imdl_module_builder.h:34
The module transformer allows to apply certain transformations on an MDL module.
Definition: imdl_module_transformer.h:38
A transaction provides a consistent view on the database.
Definition: itransaction.h:84
The interface for creating types.
Definition: itype.h:610
Shape
The possible texture shapes.
Definition: itype.h:454
A BSDF measurement value.
Definition: ivalue.h:558
The interface for creating values.
Definition: ivalue.h:656
A light profile value.
Definition: ivalue.h:545
A texture value.
Definition: ivalue.h:523
float Float32
32-bit float.
Definition: types.h:49
signed int Sint32
32-bit signed integer.
Definition: types.h:44
Mdl_version
The MDL version.
Definition: iexpression.h:27
Expressions of the MDL type system.
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.