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_material_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_MATERIAL_DEFINITION_H
9
#define MI_NEURAYLIB_IMDL_MATERIAL_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_material_instance;
22
31
class
IMdl_material_definition
:
public
32
mi::base::Interface_declare
<0x839307d2,0xadcd,0x4580,0x84,0xfa,0x76,0x87,0x37,0xe6,0xea,0xd0,
33
IScene_element>
34
{
35
public
:
41
virtual
const
char
*
get_module
()
const
= 0;
42
50
virtual
const
char
*
get_name
()
const
= 0;
51
55
virtual
Uint32
get_parameter_count
()
const
= 0;
56
61
virtual
const
char
*
get_parameter_name
(
Uint32
index)
const
= 0;
62
67
virtual
Sint32
get_parameter_index
(
const
char
* name)
const
= 0;
68
76
virtual
const
char
*
get_parameter_type
(
Uint32
index)
const
= 0;
77
82
virtual
const
char
*
get_parameter_type
(
const
char
* name)
const
= 0;
83
89
virtual
bool
is_parameter_type_uniform
(
Uint32
index)
const
= 0;
90
96
virtual
bool
is_parameter_type_uniform
(
const
char
* name)
const
= 0;
97
109
virtual
const
char
*
get_argument_type
(
Uint32
index)
const
= 0;
110
119
virtual
const
char
*
get_argument_type
(
const
char
* name)
const
= 0;
120
129
virtual
const
IAttachable
*
get_default
(
Uint32
index)
const
= 0;
130
146
template
<
class
T>
147
const
T*
get_default
(
Uint32
index)
const
148
{
149
const
IAttachable
* ptr_idata =
get_default
( index);
150
if
( !ptr_idata)
151
return
0;
152
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_idata->
get_interface
(
typename
T::IID()));
153
ptr_idata->
release
();
154
return
ptr_T;
155
}
156
162
virtual
const
IAttachable
*
get_default
(
const
char
* name)
const
= 0;
163
176
template
<
class
T>
177
const
T*
get_default
(
const
char
* name)
const
178
{
179
const
IAttachable
* ptr_idata =
get_default
( name);
180
if
( !ptr_idata)
181
return
0;
182
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_idata->
get_interface
(
typename
T::IID()));
183
ptr_idata->
release
();
184
return
ptr_T;
185
}
186
190
virtual
const
IAttribute_container
*
get_annotations
()
const
= 0;
191
199
virtual
const
IAttribute_container
*
get_parameter_annotations
(
Uint32
index)
const
= 0;
200
205
virtual
const
IAttribute_container
*
get_parameter_annotations
(
const
char
* name)
const
= 0;
206
231
virtual
IMdl_material_instance
*
create_material_instance
(
232
const
IAttribute_container
* arguments,
233
Sint32
* errors = 0)
const
= 0;
234
269
virtual
Sint32
create_preset
(
270
const
char
* module_name,
271
const
char
* preset_name,
272
const
IAttribute_container
* defaults)
const
= 0;
273
};
274
// end group mi_neuray_materials
276
277
}
// namespace mi
278
279
#endif // MI_NEURAYLIB_IMDL_MATERIAL_DEFINITION_H
mi
neuraylib
imdl_material_definition.h
Generated on Tue Aug 12 2014 15:28:35. Build 221133.3991, Doxygen 1.8.4