All the scene elements that make up the scene graph. More...
Modules | |
Miscellaneous | |
Miscellaneous scene graph elements, for example, textures, light profiles, BSDF measurements, or decals. | |
MDL-related elements | |
MDL-related elements comprise a set of interfaces related to the Material Definition Language (MDL). | |
Classes | |
class | mi::neuraylib::IAttribute_set |
The attribute set comprises all attributes attached to a database element. More... | |
class | mi::neuraylib::IScene_element |
Common base interface for all scene elements. More... | |
Enumerations | |
enum | mi::neuraylib::Propagation_type { mi::neuraylib::PROPAGATION_STANDARD , mi::neuraylib::PROPAGATION_OVERRIDE , PROPAGATION_FORCE_32_BIT = 0xffffffffU } |
Propagation types for attribute inheritance. More... | |
enum | mi::neuraylib::Element_type { mi::neuraylib::ELEMENT_TYPE_LIGHTPROFILE = 5 , mi::neuraylib::ELEMENT_TYPE_TEXTURE = 7 , mi::neuraylib::ELEMENT_TYPE_IMAGE = 8 , mi::neuraylib::ELEMENT_TYPE_MODULE = 29 , mi::neuraylib::ELEMENT_TYPE_FUNCTION_DEFINITION = 30 , mi::neuraylib::ELEMENT_TYPE_FUNCTION_CALL = 31 , mi::neuraylib::ELEMENT_TYPE_MATERIAL_INSTANCE = 33 , mi::neuraylib::ELEMENT_TYPE_COMPILED_MATERIAL = 34 , mi::neuraylib::ELEMENT_TYPE_BSDF_MEASUREMENT = 35 , ELEMENT_TYPE_FORCE_32_BIT = 0xffffffffU } |
Distinguishes scene elements. More... | |
Functions | |
template<class T> | |
mi::Sint32 | mi::set_value (mi::neuraylib::IAttribute_set *attribute_set, const char *name, const T &value) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API. More... | |
template<class T> | |
mi::Sint32 | mi::set_value (mi::neuraylib::IAttribute_set *attribute_set, const char *name, mi::Size index, const T &value) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant with an index for collections). More... | |
template<class T> | |
mi::Sint32 | mi::set_value (mi::neuraylib::IAttribute_set *attribute_set, const char *name, const char *key, const T &value) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant with a key for collections). More... | |
template<class T> | |
mi::Sint32 | mi::set_value (mi::neuraylib::IAttribute_set *attribute_set, const char *name, const T *values, mi::Size n) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant for entire arrays as C-like arrays). More... | |
template<class T> | |
mi::Sint32 | mi::set_value (mi::neuraylib::IAttribute_set *attribute_set, const char *name, const std::vector<T> &values) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant for entire arrays as std::vector). More... | |
template<class T> | |
mi::Sint32 | mi::get_value (const mi::neuraylib::IAttribute_set *attribute_set, const char *name, T &value) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API. More... | |
template<class T> | |
mi::Sint32 | mi::get_value (const mi::neuraylib::IAttribute_set *attribute_set, const char *name, mi::Size index, T &value) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant with an index for collections). More... | |
template<class T> | |
mi::Sint32 | mi::get_value (const mi::neuraylib::IAttribute_set *attribute_set, const char *name, const char *key, T &value) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant with a key for collections). More... | |
template<class T> | |
mi::Sint32 | mi::get_value (const mi::neuraylib::IAttribute_set *attribute_set, const char *name, T *values, mi::Size n) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant for entire arrays as C-like array). More... | |
template<class T> | |
mi::Sint32 | mi::get_value (const mi::neuraylib::IAttribute_set *attribute_set, const char *name, std::vector<T> &values) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant for entire arrays as std::vector). More... | |
All the scene elements that make up the scene graph.
Propagation types for attribute inheritance.
Inheritance of attributes allows you to easily make changes to an entire subtree of the scene graph.
Assume the scene graph contains an inner node P (the parent) with a (possibly inherited) attribute A and a child node C. If the child node C does not have the attribute A, the child will inherit P's value of A (without actually storing an explicit copy). If the child node C has the attribute A, it will use its own value of the attribute without taking P's value into consideration. This is the standard propagation rule which is represented by the propagation type mi::neuraylib::PROPAGATION_STANDARD.
The outcome of the last case can be reverted by setting the override
flag of the attribute A on the parent node (or at the node from where it was inherited to P): in this case P's value of A is inherited to the child node C, no matter whether the child has the attribute or not. This propagation mode is represented by mi::neuraylib::PROPAGATION_OVERRIDE.
Enumerator | |
---|---|
PROPAGATION_STANDARD | Standard inheritance of attributes without any special flags. |
PROPAGATION_OVERRIDE | The |
mi::Sint32 mi::get_value | ( | const mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
const char * | key, | ||
T & | value | ||
) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant with a key for collections).
attribute_set | The affected attribute set. |
name | The name of the attribute to read. |
key | The key of the affected collection element. |
value | The new value will be stored here. |
value
.name
does not exist. mi::Sint32 mi::get_value | ( | const mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
mi::Size | index, | ||
T & | value | ||
) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant with an index for collections).
attribute_set | The affected attribute set. |
name | The name of the attribute to read. |
index | The index of the affected collection element. |
value | The new value will be stored here. |
value
.name
does not exist. mi::Sint32 mi::get_value | ( | const mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
std::vector<T> & | values | ||
) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant for entire arrays as std::vector).
See also mi::get_value(const mi::neuraylib::IAttribute_set*,const char*,T*,mi::Size) for C-like arrays.
attribute_set | The affected attribute set. |
name | The name of the attribute to read. |
values | The new values will be stored here. The vector will be resized accordingly. |
values
.values
is not valid (possibly incomplete operation)name
does not exist. mi::Sint32 mi::get_value | ( | const mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
T & | value | ||
) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API.
attribute_set | The affected attribute set. |
name | The name of the attribute to read. |
value | The new value will be stored here. |
value
.name
does not exist. mi::Sint32 mi::get_value | ( | const mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
T * | values, | ||
mi::Size | n | ||
) |
Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant for entire arrays as C-like array).
See also mi::get_value(const mi::neuraylib::IAttribute_set*,const char*,std::vector<T>&) for std::vector support.
attribute_set | The affected attribute set. |
name | The name of the attribute to read. |
values | The new values will be stored here (as pointer to a C-like array). |
n | The size of the C-like array (needs to match the size of the attribute). |
values
.values
is not valid (possibly incomplete operation)name
does not exist.mi::Sint32 mi::set_value | ( | mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
const char * | key, | ||
const T & | value | ||
) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant with a key for collections).
attribute_set | The affected attribute set. |
name | The name of the attribute to modify. |
key | The key of the affected collection element. |
value | The new value to be set. |
value
.value
is not valid.name
does not exist. mi::Sint32 mi::set_value | ( | mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
const std::vector<T> & | values | ||
) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant for entire arrays as std::vector).
See also mi::set_value(mi::neuraylib::IAttribute_set*,const char*,const T*,mi::Size) for C-like arrays.
attribute_set | The affected attribute set. |
name | The name of the attribute to modify. |
values | The new values to be set. If the attribute is a dynamic array, then it is resized accordingly. If the attribute is a static array, then its size needs to match the size of values . |
values
.values
is not valid (possibly incomplete operation)name
does not exist.mi::Sint32 mi::set_value | ( | mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
const T & | value | ||
) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API.
attribute_set | The affected attribute set. |
name | The name of the attribute to modify. |
value | The new value to be set. |
value
.value
is not valid.name
does not exist. mi::Sint32 mi::set_value | ( | mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
const T * | values, | ||
mi::Size | n | ||
) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant for entire arrays as C-like arrays).
See also mi::set_value(mi::neuraylib::IAttribute_set*,const char*,const std::vector<T>&) for std::vector support.
attribute_set | The affected attribute set. |
name | The name of the attribute to modify. |
values | The new values to be set (as pointer to a C-like array). |
n | The size of the C-like array. If the attribute is a dynamic array, then it is resized accordingly. If the attribute is a static array, then its size needs to match n . |
values
.values
is not valid (possibly incomplete operation)name
does not exist.mi::Sint32 mi::set_value | ( | mi::neuraylib::IAttribute_set * | attribute_set, |
const char * | name, | ||
mi::Size | index, | ||
const T & | value | ||
) |
Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant with an index for collections).
attribute_set | The affected attribute set. |
name | The name of the attribute to modify. |
index | The index of the affected collection element. |
value | The new value to be set. |
value
.value
is not valid.name
does not exist.