Material Definition Language 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
ibsdf_measurement.h
Go to the documentation of this file.
1
/***************************************************************************************************
2
* Copyright 2019 NVIDIA Corporation. All rights reserved.
3
**************************************************************************************************/
6
7
#ifndef MI_NEURAYLIB_IBSDF_MEASUREMENT_H
8
#define MI_NEURAYLIB_IBSDF_MEASUREMENT_H
9
10
#include <
mi/neuraylib/iscene_element.h
>
11
12
namespace
mi {
13
14
namespace
neuraylib {
15
16
class
IBsdf_isotropic_data;
17
class
IReader;
18
23
class
IBsdf_measurement :
37
public
base::Interface_declare<0xa05e5a42,0x3f74,0x4ad9,0x8e,0xa9,0x17,0x4f,0x97,0x52,0x39,0x8a,
38
neuraylib::IScene_element>
39
{
40
public
:
50
virtual
Sint32
reset_file
(
const
char
* filename) = 0;
51
60
virtual
Sint32
reset_reader
( IReader* reader) = 0;
61
69
virtual
const
char
*
get_filename
()
const
= 0;
70
77
virtual
const
char
*
get_original_filename
()
const
= 0;
78
86
virtual
Sint32
set_reflection
(
const
IBsdf_isotropic_data* bsdf_data) = 0;
87
93
virtual
const
base::IInterface*
get_reflection
()
const
= 0;
94
108
template
<
class
T>
109
const
T*
get_reflection
()
const
110
{
111
const
base::IInterface
* ptr_iinterface =
get_reflection
();
112
if
( !ptr_iinterface)
113
return
0;
114
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_iinterface->
get_interface
(
typename
T::IID()));
115
ptr_iinterface->
release
();
116
return
ptr_T;
117
}
118
126
virtual
Sint32
set_transmission
(
const
IBsdf_isotropic_data
* bsdf_data) = 0;
127
133
virtual
const
base::IInterface
*
get_transmission
()
const
= 0;
134
148
template
<
class
T>
149
const
T*
get_transmission
()
const
150
{
151
const
base::IInterface
* ptr_iinterface =
get_transmission
();
152
if
( !ptr_iinterface)
153
return
0;
154
const
T* ptr_T =
static_cast<
const
T*
>
( ptr_iinterface->
get_interface
(
typename
T::IID()));
155
ptr_iinterface->
release
();
156
return
ptr_T;
157
}
158
};
159
// end group mi_neuray_misc
161
162
}
// namespace neuraylib
163
164
}
// namespace mi
165
166
#endif // MI_NEURAYLIB_IBSDF_MEASUREMENT_H
20 February 2019, 22:00, revision 315630, Doxygen 1.8.4
© 1986, 2019 NVIDIA Corporation.
All rights reserved.