MDL SDK API nvidia_logo_transpbg.gif Up
imaterial_definition.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2022 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IMATERIAL_DEFINITION_H
8#define MI_NEURAYLIB_IMATERIAL_DEFINITION_H
9
13
14namespace mi {
15
16namespace neuraylib {
17
22class IMaterial_instance;
23class IMdl_execution_context;
24
30 mi::base::Interface_declare<0x73753e3d,0x62e4,0x41a7,0xa8,0xf5,0x37,0xeb,0xda,0xd9,0x01,0xd9,
31 neuraylib::IScene_element>
32{
33public:
34#ifdef MI_NEURAYLIB_DEPRECATED_13_0
35 virtual const char* get_module() const = 0;
36
37 virtual const char* get_mdl_name() const = 0;
38
39 virtual const char* get_mdl_module_name() const = 0;
40
41 virtual const char* get_mdl_simple_name() const = 0;
42
43 virtual const char* get_mdl_parameter_type_name( Size index) const = 0;
44
45 virtual const char* get_prototype() const = 0;
46
47 virtual void get_mdl_version( Mdl_version& since, Mdl_version& removed) const = 0;
48
49 virtual IFunction_definition::Semantics get_semantic() const = 0;
50
51 virtual bool is_exported() const = 0;
52
53 virtual const IType* get_return_type() const = 0;
54
55 virtual Size get_parameter_count() const = 0;
56
57 virtual const char* get_parameter_name( Size index) const = 0;
58
59 virtual Size get_parameter_index( const char* name) const = 0;
60
61 virtual const IType_list* get_parameter_types() const = 0;
62
63 virtual const IExpression_list* get_defaults() const = 0;
64
65 virtual const IExpression_list* get_enable_if_conditions() const = 0;
66
67 virtual Size get_enable_if_users( Size index) const = 0;
68
69 virtual Size get_enable_if_user( Size index, Size u_index) const = 0;
70
71 virtual const IAnnotation_block* get_annotations() const = 0;
72
73 virtual const IAnnotation_block* get_return_annotations() const = 0;
74
75 virtual const IAnnotation_list* get_parameter_annotations() const = 0;
76
77 virtual const char* get_thumbnail() const = 0;
78
79 virtual bool is_valid( IMdl_execution_context* context) const = 0;
80
81 virtual const IExpression_direct_call* get_body() const = 0;
82
83 virtual Size get_temporary_count() const = 0;
84
85 virtual const IExpression* get_temporary( Size index) const = 0;
86
87 virtual const char* get_temporary_name( Size index) const = 0;
88
89 template<class T>
90 const T* get_temporary( Size index) const
91 {
92 const IExpression* ptr_iexpression = get_temporary( index);
93 if ( !ptr_iexpression)
94 return 0;
95 const T* ptr_T = static_cast<const T*>( ptr_iexpression->get_interface( typename T::IID()));
96 ptr_iexpression->release();
97 return ptr_T;
98 }
99
100 virtual IMaterial_instance* create_material_instance(
101 const IExpression_list* arguments, Sint32* errors = 0) const = 0;
102#endif // MI_NEURAYLIB_DEPRECATED_13_0
103};
104 // end group mi_neuray_mdl_elements
106
107} // namespace neuraylib
108
109} // namespace mi
110
111#endif // MI_NEURAYLIB_IMATERIAL_DEFINITION_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
An annotation block is an array of annotations.
Definition: iexpression.h:468
An ordered collection of annotation blocks identified by name or index.
Definition: iexpression.h:496
A direct call expression.
Definition: iexpression.h:202
An ordered collection of expressions identified by name or index.
Definition: iexpression.h:239
The interface to MDL expressions.
Definition: iexpression.h:48
Semantics
All known semantics of functions definitions.
Definition: ifunction_definition.h:55
This interface represents a material definition.
Definition: imaterial_definition.h:32
This interface represents a material instance.
Definition: imaterial_instance.h:34
The execution context can be used to query status information like error and warning messages concern...
Definition: imdl_execution_context.h:126
An ordered collection of types identified by name or index.
Definition: itype.h:542
The interface to MDL types.
Definition: itype.h:51
virtual const IInterface * get_interface(const Uuid &interface_id) const =0
Acquires a const interface from another.
virtual Uint32 release() const =0
Decrements the reference count.
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
Mdl_version
The MDL version.
Definition: iexpression.h:27
Expressions of the MDL type system.
Scene element Function_definition.
Base class for all scene elements.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5