NVIDIA Iray API Home  Up
 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 1986, 2016 NVIDIA Corporation. All rights reserved.
3 //*****************************************************************************
6 //*****************************************************************************
7 
8 #ifndef MI_NEURAYLIB_IBSDF_MEASUREMENT_H
9 #define MI_NEURAYLIB_IBSDF_MEASUREMENT_H
10 
12 #include <mi/neuraylib/version.h>
13 
14 namespace mi {
15 
16 namespace neuraylib {
17 
18 class IBsdf_isotropic_data;
19 
24 class IBsdf_measurement :
38  public base::Interface_declare<0xa05e5a42,0x3f74,0x4ad9,0x8e,0xa9,0x17,0x4f,0x97,0x52,0x39,0x8a,
39  neuraylib::IScene_element>
40 {
41 public:
50  virtual Sint32 reset_file( const char* filename) = 0;
51 
59  virtual const char* get_filename() const = 0;
60 
67  virtual const char* get_original_filename() const = 0;
68 
76  virtual Sint32 set_reflection( const IBsdf_isotropic_data* bsdf_data) = 0;
77 
83  virtual const base::IInterface* get_reflection() const = 0;
84 
98  template<class T>
99  const T* get_reflection() const
100  {
101  const base::IInterface* ptr_iinterface = get_reflection();
102  if( !ptr_iinterface)
103  return 0;
104  const T* ptr_T = static_cast<const T*>( ptr_iinterface->get_interface( typename T::IID()));
105  ptr_iinterface->release();
106  return ptr_T;
107  }
108 
116  virtual Sint32 set_transmission( const IBsdf_isotropic_data* bsdf_data) = 0;
117 
123  virtual const base::IInterface* get_transmission() const = 0;
124 
138  template<class T>
139  const T* get_transmission() const
140  {
141  const base::IInterface* ptr_iinterface = get_transmission();
142  if( !ptr_iinterface)
143  return 0;
144  const T* ptr_T = static_cast<const T*>( ptr_iinterface->get_interface( typename T::IID()));
145  ptr_iinterface->release();
146  return ptr_T;
147  }
148 };
149  // end group mi_neuray_misc
151 
152 } // namespace neuraylib
153 
154 #ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
155 using neuraylib::IBsdf_isotropic_data;
156 using neuraylib::IBsdf_measurement;
157 using neuraylib::IScene_element;
158 #endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
159 
160 } // namespace mi
161 
162 #endif // MI_NEURAYLIB_IBSDF_MEASUREMENT_H