NVIDIA Iray API
Home
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
imdl_compiled_material.h
Go to the documentation of this file.
1
//*****************************************************************************
2
// Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
3
//*****************************************************************************
6
//*****************************************************************************
7
8
#ifndef MI_NEURAYLIB_IMDL_COMPILED_MATERIAL_H
9
#define MI_NEURAYLIB_IMDL_COMPILED_MATERIAL_H
10
11
#include <
mi/neuraylib/iscene_element.h
>
12
#include <
mi/neuraylib/version.h
>
13
14
namespace
mi {
15
16
namespace
neuraylib {
17
22
class
IAttribute_container;
23
27
enum
Material_slot
{
28
SLOT_THIN_WALLED
,
29
SLOT_SURFACE_SCATTERING
,
30
SLOT_SURFACE_EMISSION_EDF_EMISSION
,
31
SLOT_SURFACE_EMISSION_INTENSITY
,
32
SLOT_BACKFACE_SCATTERING
,
33
SLOT_BACKFACE_EMISSION_EDF_EMISSION
,
34
SLOT_BACKFACE_EMISSION_INTENSITY
,
35
SLOT_IOR
,
36
SLOT_VOLUME_SCATTERING
,
37
SLOT_VOLUME_ABSORPTION_COEFFICIENT
,
38
SLOT_VOLUME_SCATTERING_COEFFICIENT
,
39
SLOT_GEOMETRY_DISPLACEMENT
,
40
SLOT_GEOMETRY_CUTOUT_OPACITY
,
41
SLOT_GEOMETRY_NORMAL
,
42
SLOT_FORCE_32_BIT = 0xffffffffU
43
};
44
45
mi_static_assert
(
sizeof
(
Material_slot
) ==
sizeof
(
Uint32
));
46
71
class
IMdl_compiled_material
:
public
72
mi::base::Interface_declare
<0xb6d884c1,0x1db5,0x49f9,0x88,0x1c,0xd2,0x79,0x96,0x96,0xd3,0xf4,
73
neuraylib::IScene_element>
74
{
75
public
:
77
78
85
virtual
const
IData
*
get_field
(
const
char
* name)
const
= 0;
86
100
template
<
class
T>
101
const
T*
get_field
(
const
char
* name)
const
102
{
103
const
IData
* ptr_idata =
get_field
( name);
104
if
( !ptr_idata)
105
return
0;
106
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_idata->
get_interface
(
typename
T::IID()));
107
ptr_idata->
release
();
108
return
ptr_T;
109
}
110
114
virtual
Uint32
get_temporary_count
()
const
= 0;
115
120
virtual
const
IData
*
get_temporary
(
Uint32
index)
const
= 0;
121
133
template
<
class
T>
134
const
T*
get_temporary
(
Uint32
index)
const
135
{
136
const
IData
* ptr_idata =
get_temporary
( index);
137
if
( !ptr_idata)
138
return
0;
139
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_idata->
get_interface
(
typename
T::IID()));
140
ptr_idata->
release
();
141
return
ptr_T;
142
}
143
145
virtual
Float32
get_mdl_meters_per_scene_unit
()
const
= 0;
146
149
virtual
bool
depends_on_state_transform
()
const
= 0;
150
152
virtual
bool
depends_on_state_object_id
()
const
= 0;
153
155
157
161
virtual
Uint32
get_parameter_count
()
const
= 0;
162
168
virtual
const
char
*
get_parameter_name
(
Uint32
index)
const
= 0;
169
176
virtual
const
IData
*
get_argument
(
Uint32
index)
const
= 0;
177
189
template
<
class
T>
190
const
T*
get_argument
(
Uint32
index)
const
191
{
192
const
IData
* ptr_idata =
get_argument
( index);
193
if
( !ptr_idata)
194
return
0;
195
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_idata->
get_interface
(
typename
T::IID()));
196
ptr_idata->
release
();
197
return
ptr_T;
198
}
199
206
virtual
base::Uuid
get_hash
()
const
= 0;
207
214
virtual
base::Uuid
get_slot_hash
(
Material_slot
slot)
const
= 0;
215
217
};
218
// end group mi_neuray_materials
220
221
}
// namespace neuraylib
222
223
#ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
224
using
neuraylib::IAttribute_container;
225
using
neuraylib::IMdl_compiled_material;
226
using
neuraylib::IScene_element;
227
using
neuraylib::Material_slot
;
228
using
neuraylib::SLOT_BACKFACE_EMISSION_EDF_EMISSION
;
229
using
neuraylib::SLOT_BACKFACE_EMISSION_INTENSITY
;
230
using
neuraylib::SLOT_BACKFACE_SCATTERING
;
231
using
neuraylib::SLOT_FORCE_32_BIT;
232
using
neuraylib::SLOT_GEOMETRY_CUTOUT_OPACITY
;
233
using
neuraylib::SLOT_GEOMETRY_DISPLACEMENT
;
234
using
neuraylib::SLOT_GEOMETRY_NORMAL
;
235
using
neuraylib::SLOT_IOR
;
236
using
neuraylib::SLOT_SURFACE_EMISSION_EDF_EMISSION
;
237
using
neuraylib::SLOT_SURFACE_EMISSION_INTENSITY
;
238
using
neuraylib::SLOT_SURFACE_SCATTERING
;
239
using
neuraylib::SLOT_THIN_WALLED
;
240
using
neuraylib::SLOT_VOLUME_ABSORPTION_COEFFICIENT
;
241
using
neuraylib::SLOT_VOLUME_SCATTERING
;
242
using
neuraylib::SLOT_VOLUME_SCATTERING_COEFFICIENT
;
243
#endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
244
245
}
// namespace mi
246
247
#endif // MI_NEURAYLIB_IMDL_COMPILED_MATERIAL_H
mi
neuraylib
imdl_compiled_material.h
Generated on Fri Mar 4 2016 19:53:39. Build 250909.11169, Doxygen 1.8.4