neuray API Programmer's Manual

mi::neuraylib::IBsdf_buffer Class Reference

[Miscellaneous]

Description

Abstract interface for a buffer of BSDF values.

See also:

mi::neuraylib::IBsdf_measurement and mi::neuraylib::IBsdf_isotropic_data for related interfaces

mi::neuraylib::Bsdf_buffer for an example implementation of this interface

Public Member Functions

virtual const Float32get_data() const =0
Returns the memory block containing the actual BSDF values. More...

Member Functions

virtual const Float32* mi::​neuraylib::​IBsdf_buffer::get_data() const [pure virtual]

Returns the memory block containing the actual BSDF values. The size of the array is given by

‎   res_theta^2 * res_phi * factor
where res_phi is the value returned by mi::neuraylib::IBsdf_isotropic_data::get_resolution_phi(), res_theta is the value returned by mi::neuraylib::IBsdf_isotropic_data::get_resolution_theta(), and factor is 1 if mi::neuraylib::IBsdf_isotropic_data::get_type() returns mi::neuraylib::BSDF_SCALAR and 3 otherwise.

The index of the (first) element for a particular triple (index_theta_in, index_theta_out, index_phi_in) is given by

‎   factor * (index_theta_in * (res_phi * res_theta) + index_theta_out * res_phi + index_phi)

The pointer returned by this method has to be valid for the lifetime of this interface.