MDL SDK API nvidia_logo_transpbg.gif 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 2022 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IBSDF_MEASUREMENT_H
8 #define MI_NEURAYLIB_IBSDF_MEASUREMENT_H
9 
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:
53  virtual Sint32 reset_file( const char* filename) = 0;
54 
63  virtual Sint32 reset_reader( IReader* reader) = 0;
64 
72  virtual const char* get_filename() const = 0;
73 
80  virtual const char* get_original_filename() const = 0;
81 
89  virtual Sint32 set_reflection( const IBsdf_isotropic_data* bsdf_data) = 0;
90 
96  virtual const base::IInterface* get_reflection() const = 0;
97 
111  template<class T>
112  const T* get_reflection() const
113  {
114  const base::IInterface* ptr_iinterface = get_reflection();
115  if( !ptr_iinterface)
116  return 0;
117  const T* ptr_T = static_cast<const T*>( ptr_iinterface->get_interface( typename T::IID()));
118  ptr_iinterface->release();
119  return ptr_T;
120  }
121 
129  virtual Sint32 set_transmission( const IBsdf_isotropic_data* bsdf_data) = 0;
130 
136  virtual const base::IInterface* get_transmission() const = 0;
137 
151  template<class T>
152  const T* get_transmission() const
153  {
154  const base::IInterface* ptr_iinterface = get_transmission();
155  if( !ptr_iinterface)
156  return 0;
157  const T* ptr_T = static_cast<const T*>( ptr_iinterface->get_interface( typename T::IID()));
158  ptr_iinterface->release();
159  return ptr_T;
160  }
161 };
162  // end group mi_neuray_misc
164 
165 } // namespace neuraylib
166 
167 } // namespace mi
168 
169 #endif // MI_NEURAYLIB_IBSDF_MEASUREMENT_H