NVIDIA Iray API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
imdl_function_definition.h
Go to the documentation of this file.
1
//*****************************************************************************
2
// Copyright 1986, 2014 NVIDIA Corporation. All rights reserved.
3
//*****************************************************************************
6
//*****************************************************************************
7
8
#ifndef MI_NEURAYLIB_IMDL_FUNCTION_DEFINITION_H
9
#define MI_NEURAYLIB_IMDL_FUNCTION_DEFINITION_H
10
11
#include <
mi/neuraylib/iattachable.h
>
12
#include <
mi/neuraylib/iscene_element.h
>
13
14
namespace
mi {
15
20
class
IAttribute_container;
21
class
IMdl_function_call;
22
32
class
IMdl_function_definition
:
public
33
mi::base::Interface_declare
<0x0a8d2440,0x0b1f,0x4424,0x87,0xad,0x50,0xe1,0x20,0x8e,0x62,0x39,
34
IScene_element>
35
{
36
public
:
42
virtual
const
char
*
get_module
()
const
= 0;
43
51
virtual
const
char
*
get_name
()
const
= 0;
52
56
virtual
const
char
*
get_return_type
()
const
= 0;
57
61
virtual
bool
is_return_type_varying
()
const
= 0;
62
66
virtual
Uint32
get_parameter_count
()
const
= 0;
67
72
virtual
const
char
*
get_parameter_name
(
Uint32
index)
const
= 0;
73
78
virtual
Sint32
get_parameter_index
(
const
char
* name)
const
= 0;
79
87
virtual
const
char
*
get_parameter_type
(
Uint32
index)
const
= 0;
88
93
virtual
const
char
*
get_parameter_type
(
const
char
* name)
const
= 0;
94
100
virtual
bool
is_parameter_type_uniform
(
Uint32
index)
const
= 0;
101
107
virtual
bool
is_parameter_type_uniform
(
const
char
* name)
const
= 0;
108
120
virtual
const
char
*
get_argument_type
(
Uint32
index)
const
= 0;
121
130
virtual
const
char
*
get_argument_type
(
const
char
* name)
const
= 0;
131
140
virtual
const
IAttachable
*
get_default
(
Uint32
index)
const
= 0;
141
157
template
<
class
T>
158
const
T*
get_default
(
Uint32
index)
const
159
{
160
const
IAttachable
* ptr_idata =
get_default
( index);
161
if
( !ptr_idata)
162
return
0;
163
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_idata->
get_interface
(
typename
T::IID()));
164
ptr_idata->
release
();
165
return
ptr_T;
166
}
167
173
virtual
const
IAttachable
*
get_default
(
const
char
* name)
const
= 0;
174
187
template
<
class
T>
188
const
T*
get_default
(
const
char
* name)
const
189
{
190
const
IAttachable
* ptr_idata =
get_default
( name);
191
if
( !ptr_idata)
192
return
0;
193
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_idata->
get_interface
(
typename
T::IID()));
194
ptr_idata->
release
();
195
return
ptr_T;
196
}
197
201
virtual
const
IAttribute_container
*
get_annotations
()
const
= 0;
202
206
virtual
const
IAttribute_container
*
get_return_annotations
()
const
= 0;
207
215
virtual
const
IAttribute_container
*
get_parameter_annotations
(
Uint32
index)
const
= 0;
216
221
virtual
const
IAttribute_container
*
get_parameter_annotations
(
const
char
* name)
const
= 0;
222
247
virtual
IMdl_function_call
*
create_function_call
(
248
const
IAttribute_container
* arguments,
Sint32
* errors = 0)
const
= 0;
249
};
250
// end group mi_neuray_materials
252
253
}
// namespace mi
254
255
#endif // MI_NEURAYLIB_IMDL_FUNCTION_DEFINITION_H
mi
neuraylib
imdl_function_definition.h
Generated on Tue Aug 12 2014 15:28:35. Build 221133.3991, Doxygen 1.8.4