A scene element that stores measured BSDF data. More...
#include <ibsdf_measurement.h>
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::IInterface * | get_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::IInterface * | get_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... | |
Public Member Functions inherited from mi::neuraylib::IScene_element | |
virtual Element_type | get_element_type () const =0 |
Indicates the actual scene element represented by interfaces derived from this interface. More... | |
Public Member Functions inherited from mi::neuraylib::IAttribute_set | |
virtual IData * | create_attribute (const char *name, const char *type)=0 |
Creates a new attribute name of the type type . More... | |
template<class T> | |
T * | create_attribute (const char *name, const char *type) |
Creates a new attribute name of the type type . More... | |
template<class T> | |
T * | create_attribute (const char *name) |
Creates a new attribute name of the type T . More... | |
virtual bool | destroy_attribute (const char *name)=0 |
Destroys the attribute name . More... | |
virtual const IData * | access_attribute (const char *name) const =0 |
Returns a const pointer to the attribute name . More... | |
template<class T> | |
const T * | access_attribute (const char *name) const |
Returns a const pointer to the attribute name . More... | |
virtual IData * | edit_attribute (const char *name)=0 |
Returns a mutable pointer to the attribute name . More... | |
template<class T> | |
T * | edit_attribute (const char *name) |
Returns a mutable pointer to the attribute name . More... | |
virtual bool | is_attribute (const char *name) const =0 |
Indicates existence of an attribute. More... | |
virtual const char * | get_attribute_type_name (const char *name) const =0 |
Returns the type of an attribute. More... | |
virtual Sint32 | set_attribute_propagation (const char *name, Propagation_type value)=0 |
Sets the propagation type of the attribute name . More... | |
virtual Propagation_type | get_attribute_propagation (const char *name) const =0 |
Returns the propagation type of the attribute name . More... | |
virtual const char * | enumerate_attributes (Sint32 index) const =0 |
Returns the name of the attribute indicated by index . More... | |
Public Member Functions inherited from mi::base::IInterface | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0xa05e5a42, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::Interface_declare< 0x8a2a4da9, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::Interface_declare< 0x1bcb8d48, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::IInterface | |
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> | IID |
Declares the interface ID (IID) of this interface. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0xa05e5a42, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x8a2a4da9, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x1bcb8d48, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::IInterface | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
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.
|
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().
|
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().
|
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.
T | The interface type of the requested element. |
NULL
on failure (no BSDF data available or if T
does not match the element's type).
|
pure virtual |
Returns the BSDF data for the reflection.
Note that it is not possible to manipulate the BSDF data.
NULL
if there is none.
|
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.
T | The interface type of the requested element. |
NULL
on failure (no BSDF data available or if T
does not match the element's type).
|
pure virtual |
Returns the BSDF data for transmission.
Note that it is not possible to manipulate the BSDF data.
NULL
if there is none.
|
pure virtual |
Sets the BSDF measurement to a file identified by filename
.
NULL
pointer).
.mbsdf is supported).Sets the BSDF measurement to the data provided by a reader.
reader | The reader that provides the data for the BSDF measurement in .mbsdf format. |
NULL
pointer).
|
pure virtual |
Sets the BSDF data for the reflection.
bsdf_data | The BSDF data to be used by this BSDF measurement. The value NULL can be used to remove the BSDF data for reflection. |
bsdf_data
is invalid.
|
pure virtual |
Sets the BSDF data for transmission.
bsdf_data | The BSDF data to be used by this BSDF measurement. The value NULL can be used to remove the BSDF data for transmission. |
bsdf_data
is invalid.