MDL SDK API
Up
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
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
10
#include <
mi/neuraylib/iexpression.h
>
11
#include <
mi/neuraylib/iscene_element.h
>
12
#include <
mi/neuraylib/ifunction_definition.h
>
13
14
namespace
mi {
15
16
namespace
neuraylib {
17
22
class
IMaterial_instance;
23
class
IMdl_execution_context;
24
29
class
IMaterial_definition
:
public
30
mi::base::Interface_declare
<0x73753e3d,0x62e4,0x41a7,0xa8,0xf5,0x37,0xeb,0xda,0xd9,0x01,0xd9,
31
neuraylib::IScene_element>
32
{
33
public
:
36
virtual
const
char
*
get_module
()
const
= 0;
37
40
virtual
const
char
*
get_mdl_name
()
const
= 0;
41
44
virtual
const
char
*
get_mdl_module_name
()
const
= 0;
45
48
virtual
const
char
*
get_mdl_simple_name
()
const
= 0;
49
52
virtual
const
char
*
get_mdl_parameter_type_name
(
Size
index)
const
= 0;
53
56
virtual
const
char
*
get_prototype
()
const
= 0;
57
60
virtual
void
get_mdl_version
(
Mdl_version
& since,
Mdl_version
& removed)
const
= 0;
61
64
virtual
IFunction_definition::Semantics
get_semantic
()
const
= 0;
65
68
virtual
bool
is_exported
()
const
= 0;
69
72
virtual
const
IType
*
get_return_type
()
const
= 0;
73
76
virtual
Size
get_parameter_count
()
const
= 0;
77
80
virtual
const
char
*
get_parameter_name
(
Size
index)
const
= 0;
81
84
virtual
Size
get_parameter_index
(
const
char
* name)
const
= 0;
85
88
virtual
const
IType_list
*
get_parameter_types
()
const
= 0;
89
92
virtual
const
IExpression_list
*
get_defaults
()
const
= 0;
93
96
virtual
const
IExpression_list
*
get_enable_if_conditions
()
const
= 0;
97
100
virtual
Size
get_enable_if_users
(
Size
index)
const
= 0;
101
104
virtual
Size
get_enable_if_user
(
Size
index,
Size
u_index)
const
= 0;
105
108
virtual
const
IAnnotation_block
*
get_annotations
()
const
= 0;
109
112
virtual
const
IAnnotation_block
*
get_return_annotations
()
const
= 0;
113
116
virtual
const
IAnnotation_list
*
get_parameter_annotations
()
const
= 0;
117
120
virtual
const
char
*
get_thumbnail
()
const
= 0;
121
124
virtual
bool
is_valid
(
IMdl_execution_context
* context)
const
= 0;
125
128
virtual
const
IExpression_direct_call
*
get_body
()
const
= 0;
129
132
virtual
Size
get_temporary_count
()
const
= 0;
133
136
virtual
const
IExpression
*
get_temporary
(
Size
index)
const
= 0;
137
140
virtual
const
char
*
get_temporary_name
(
Size
index)
const
= 0;
141
144
template
<
class
T>
145
const
T*
get_temporary
(
Size
index)
const
146
{
147
const
IExpression
* ptr_iexpression =
get_temporary
( index);
148
if
( !ptr_iexpression)
149
return
0;
150
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_iexpression->
get_interface
(
typename
T::IID()));
151
ptr_iexpression->
release
();
152
return
ptr_T;
153
}
154
157
virtual
IMaterial_instance
*
create_material_instance
(
158
const
IExpression_list
* arguments,
Sint32
* errors = 0)
const
= 0;
159
};
160
// end group mi_neuray_mdl_elements
162
163
}
// namespace neuraylib
164
165
}
// namespace mi
166
167
#endif // MI_NEURAYLIB_IMATERIAL_DEFINITION_H
5 April 2022, 20:40, rev.358266
© 2022 NVIDIA Corporation.
All rights reserved.