NVIDIA Iray SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IBsdf_measurement Class Referenceabstract

A scene element that stores measured BSDF data. More...

Inheritance diagram for mi::neuraylib::IBsdf_measurement:
mi::base::Interface_declare< 0xa05e5a42, 0x3f74, 0x4ad9, 0x8e, 0xa9, 0x17, 0x4f, 0x97, 0x52, 0x39, 0x8a, neuraylib::IScene_element > mi::neuraylib::IScene_element mi::base::Interface_declare< 0x8a2a4da9, 0xe323, 0x452c, 0xb8, 0xda, 0x92, 0x45, 0x67, 0x85, 0xd7, 0x78, neuraylib::IAttribute_set > mi::neuraylib::IAttribute_set mi::base::Interface_declare< 0x1bcb8d48, 0x10c1, 0x4b3e, 0x9b, 0xfa, 0x06, 0x23, 0x61, 0x81, 0xd3, 0xe1 > mi::base::IInterface

Public Member Functions

virtual Sint32 reset_file (const char *filename)=0
 Sets the BSDF measurement to a file identified by filename. More...
 
virtual Sint32 reset_reader (IReader *reader)=0
 Sets the BSDF measurement to the data provided by a reader. More...
 
virtual const char * get_filename () const =0
 Returns the resolved file name of the file containing the BSDF measurement. More...
 
virtual const char * get_original_filename () const =0
 Returns the unresolved file name as passed to reset_file(). More...
 
virtual Sint32 set_reflection (const IBsdf_isotropic_data *bsdf_data)=0
 Sets the BSDF data for the reflection. More...
 
virtual const base::IInterfaceget_reflection () const =0
 Returns the BSDF data for the reflection. More...
 
template<class T >
const T * get_reflection () const
 Returns the BSDF data for reflection. More...
 
virtual Sint32 set_transmission (const IBsdf_isotropic_data *bsdf_data)=0
 Sets the BSDF data for transmission. More...
 
virtual const base::IInterfaceget_transmission () const =0
 Returns the BSDF data for transmission. More...
 
template<class T >
const T * get_transmission () const
 Returns the BSDF data for transmission. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xa05e5a42, 0x3f74, 0x4ad9, 0x8e, 0xa9, 0x17, 0x4f, 0x97, 0x52, 0x39, 0x8a, neuraylib::IScene_element >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
neuraylib::IScene_element
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xa05e5a42, 0x3f74, 0x4ad9, 0x8e, 0xa9, 0x17, 0x4f, 0x97, 0x52, 0x39, 0x8a, neuraylib::IScene_element >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

A scene element that stores measured BSDF data.

The measured BSDF is split into the two components for reflection and transmission. Currently, only isotropic data is supported (see the abstract interface mi::neuraylib::IBsdf_isotropic_data). The data can be imported from file or can be passed via the API.

A BSDF measurement appears in the scene as an argument of an MDL function call (see mi::neuraylib::IFunction_call) or default argument of an MDL function definition (see mi::neuraylib::IFunction_definition). The type of such an argument is mi::neuraylib::IType_bsdf_measurement or an alias of it.

See Also
mi::neuraylib::IBsdf_isotropic_data, mi::neuraylib::IBsdf_buffer

Member Function Documentation

virtual const char* mi::neuraylib::IBsdf_measurement::get_filename ( ) const
pure virtual

Returns the resolved file name of the file containing the BSDF measurement.

The method returns NULL if there is no file associated with the BSDF measurement, e.g., after default construction, calls to set_reflection() or set_transmission(), or failures to resolves the file name passed to reset_file().

See Also
get_original_filename()
virtual const char* mi::neuraylib::IBsdf_measurement::get_original_filename ( ) const
pure virtual

Returns the unresolved file name as passed to reset_file().

The method returns NULL after default construction or calls to set_reflection() or set_transmission().

See Also
get_filename()
virtual const base::IInterface* mi::neuraylib::IBsdf_measurement::get_reflection ( ) const
pure virtual

Returns the BSDF data for the reflection.

Note that it is not possible to manipulate the BSDF data.

Returns
The BSDF data for reflection, or NULL if there is none.
template<class T >
const T* mi::neuraylib::IBsdf_measurement::get_reflection ( ) const
inline

Returns the BSDF data for reflection.

Note that it is not possible to manipulate the BSDF data.

This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid &) on the returned pointer, since the return type already is a const pointer to the type T specified as template parameter.

Template Parameters
TThe interface type of the requested element.
Returns
The BSDF data for reflection, or NULL on failure (no BSDF data available or if T does not match the element's type).
virtual const base::IInterface* mi::neuraylib::IBsdf_measurement::get_transmission ( ) const
pure virtual

Returns the BSDF data for transmission.

Note that it is not possible to manipulate the BSDF data.

Returns
The BSDF data for transmission, or NULL if there is none.
template<class T >
const T* mi::neuraylib::IBsdf_measurement::get_transmission ( ) const
inline

Returns the BSDF data for transmission.

Note that it is not possible to manipulate the BSDF data.

This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid &) on the returned pointer, since the return type already is a const pointer to the type T specified as template parameter.

Template Parameters
TThe interface type of the requested element.
Returns
The BSDF data for transmission, or NULL on failure (no BSDF data available or if T does not match the element's type).
virtual Sint32 mi::neuraylib::IBsdf_measurement::reset_file ( const char *  filename)
pure virtual

Sets the BSDF measurement to a file identified by filename.

Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: Failure to resolve the given filename, e.g., the file does not exist.
  • -3: Invalid file format or invalid filename extension (only .mbsdf is supported).
virtual Sint32 mi::neuraylib::IBsdf_measurement::reset_reader ( IReader reader)
pure virtual

Sets the BSDF measurement to the data provided by a reader.

Parameters
readerThe reader that provides the data for the BSDF measurement in .mbsdf format.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -3: Invalid file format.
virtual Sint32 mi::neuraylib::IBsdf_measurement::set_reflection ( const IBsdf_isotropic_data bsdf_data)
pure virtual

Sets the BSDF data for the reflection.

Parameters
bsdf_dataThe BSDF data to be used by this BSDF measurement. The value NULL can be used to remove the BSDF data for reflection.
Returns
  • 0: Success.
  • -2: The resolution or type of bsdf_data is invalid.
virtual Sint32 mi::neuraylib::IBsdf_measurement::set_transmission ( const IBsdf_isotropic_data bsdf_data)
pure virtual

Sets the BSDF data for transmission.

Parameters
bsdf_dataThe BSDF data to be used by this BSDF measurement. The value NULL can be used to remove the BSDF data for transmission.
Returns
  • 0: Success.
  • -2: The resolution or type of bsdf_data is invalid.