All the scene elements that make up the scene graph. More...
Modules | |
Scene graph structure | |
Inner nodes of the scene graph defining its structure. |
|
Miscellaneous | |
Miscellaneous scene graph elements, for example, textures, light profiles, BSDF measurements, or decals. |
|
Materials (MDL) | |
Materials comprise a set of interfaces related to the Material Definition Language (MDL). |
|
Leaf nodes | |
Leaf nodes of the scene graph, for example, geometry, lights, or cameras. |
|
Shaders (MetaSL) | |
Shaders comprise a set of interfaces related to the MetaSL. |
|
Classes | |
class | mi::IAttribute_set |
The attribute set comprises all attributes attached to a database element. More... |
|
class | mi::IScene_element |
Common base interface for all scene elements. More... |
|
Functions | |
virtual Element_type | mi::IScene_element::get_element_type () const =0 |
Indicates the actual scene element represented by interfaces derived from this interface. More... |
|
template<class T > | |
mi::Sint32 | mi::set_value (mi::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::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::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::get_value (const mi::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::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::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... |
|
All the scene elements that make up the scene graph.
enum mi::Element_type |
Distinguishes scene elements.
enum mi::Propagation_type |
Propagation types for attribute inheritance.
Inheritance of attributes allows you to easily make changes to an entire subtree of the scene graph. For example, by setting the visible
attribute of an mi::IGroup element to false
, the entire subtree will become invisible (unless one of its elements has a visible
attribute, too, and its value is true
). Similarly, materials can be inherited down the scene graph to elements that do not have their own material. Assume the scene graph contains an inner node P (the parent) like mi::IGroup or mi::IInstance with an 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::PROPAGATION_STANDARD.
The outcome of the last case can be reverted by setting the override
flag of the attribute A on the parent node: 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::PROPAGATION_OVERRIDE.
Finally, the default
flag can be used to specify a default value for the attribute A on the child node C: this value is only used if no attribute value is inherited from the parent node P. Basically, the default
flag allows to reduce the priority of an attribute at the child node, instead of increasing the priority of the attribute on the parent node by using the override
flag there. The default
flag and the override
flag are mutually exclusive. This propagation mode is represented by mi::PROPAGATION_DEFAULT. Default flags are only taken into account at leaf nodes. The use of default flags is not recommended. They exist only to model a certain feature in the .mi file format.
enum mi::Shader_type |
Distinguishes MetaSL shader types.
Enumerator | |
---|---|
VOLUME_SHADER |
Volume shader. |
ENVIRONMENT_SHADER |
Environment shader. |
SURFACE_SHADER |
Surface shader. |
DISPLACEMENT_SHADER |
Displacement shader. |
LIGHT_SHADER |
Light shader. |
|
pure virtual |
Indicates the actual scene element represented by interfaces derived from this interface.
mi::Sint32 mi::get_value | ( | const mi::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::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::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::set_value | ( | mi::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::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. mi::Sint32 mi::set_value | ( | mi::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.