Iray SDK API nvidia_logo_transpbg.gif Up
Scene elements

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.
 
 MDL-related elements
 MDL-related elements 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.
 

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_INSTANCE = 0 ,
  mi::neuraylib::ELEMENT_TYPE_GROUP = 1 ,
  mi::neuraylib::ELEMENT_TYPE_OPTIONS = 2 ,
  mi::neuraylib::ELEMENT_TYPE_CAMERA = 3 ,
  mi::neuraylib::ELEMENT_TYPE_LIGHT = 4 ,
  mi::neuraylib::ELEMENT_TYPE_LIGHTPROFILE = 5 ,
  mi::neuraylib::ELEMENT_TYPE_TEXTURE = 7 ,
  mi::neuraylib::ELEMENT_TYPE_IMAGE = 8 ,
  mi::neuraylib::ELEMENT_TYPE_TRIANGLE_MESH = 10 ,
  mi::neuraylib::ELEMENT_TYPE_ATTRIBUTE_CONTAINER = 16 ,
  mi::neuraylib::ELEMENT_TYPE_POLYGON_MESH = 18 ,
  mi::neuraylib::ELEMENT_TYPE_SUBDIVISION_SURFACE = 23 ,
  mi::neuraylib::ELEMENT_TYPE_FREEFORM_SURFACE = 24 ,
  mi::neuraylib::ELEMENT_TYPE_FIBERS = 25 ,
  mi::neuraylib::ELEMENT_TYPE_VOLUME = 26 ,
  mi::neuraylib::ELEMENT_TYPE_VOLUME_DATA = 27 ,
  mi::neuraylib::ELEMENT_TYPE_PARTICLES = 28 ,
  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 ,
  mi::neuraylib::ELEMENT_TYPE_IRRADIANCE_PROBES = 36 ,
  mi::neuraylib::ELEMENT_TYPE_DECAL = 37 ,
  mi::neuraylib::ELEMENT_TYPE_ON_DEMAND_MESH = 38 ,
  mi::neuraylib::ELEMENT_TYPE_PROJECTOR = 39 ,
  mi::neuraylib::ELEMENT_TYPE_SECTION_OBJECT = 40 ,
  mi::neuraylib::ELEMENT_TYPE_PROXY = 41 ,
  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::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...
 

Detailed Description

All the scene elements that make up the scene graph.

Enumeration Type Documentation

 Element_type

Distinguishes scene elements.

See also
mi::neuraylib::IScene_element::get_element_type()
Enumerator
ELEMENT_TYPE_INSTANCE 

mi::neuraylib::IInstance

ELEMENT_TYPE_GROUP 

mi::neuraylib::IGroup

ELEMENT_TYPE_OPTIONS 

mi::neuraylib::IOptions

ELEMENT_TYPE_CAMERA 

mi::neuraylib::ICamera

ELEMENT_TYPE_LIGHT 

mi::neuraylib::ILight

ELEMENT_TYPE_LIGHTPROFILE 

mi::neuraylib::ILightprofile

ELEMENT_TYPE_TEXTURE 

mi::neuraylib::ITexture

ELEMENT_TYPE_IMAGE 

mi::neuraylib::IImage

ELEMENT_TYPE_TRIANGLE_MESH 

mi::neuraylib::ITriangle_mesh

ELEMENT_TYPE_ATTRIBUTE_CONTAINER 

mi::neuraylib::IAttribute_container

ELEMENT_TYPE_POLYGON_MESH 

mi::neuraylib::IPolygon_mesh

ELEMENT_TYPE_SUBDIVISION_SURFACE 

mi::neuraylib::ISubdivision_surface

ELEMENT_TYPE_FREEFORM_SURFACE 

mi::neuraylib::IFreeform_surface

ELEMENT_TYPE_FIBERS 

mi::neuraylib::IFibers

ELEMENT_TYPE_VOLUME 

mi::neuraylib::IVolume

ELEMENT_TYPE_VOLUME_DATA 

mi::neuraylib::IVolume_data

ELEMENT_TYPE_PARTICLES 

mi::neuraylib::IParticles

ELEMENT_TYPE_MODULE 

mi::neuraylib::IModule

ELEMENT_TYPE_FUNCTION_DEFINITION 

mi::neuraylib::IFunction_definition

ELEMENT_TYPE_FUNCTION_CALL 

mi::neuraylib::IFunction_call

ELEMENT_TYPE_MATERIAL_INSTANCE 

mi::neuraylib::IMaterial_instance

ELEMENT_TYPE_COMPILED_MATERIAL 

mi::neuraylib::ICompiled_material

ELEMENT_TYPE_BSDF_MEASUREMENT 

mi::neuraylib::IBsdf_measurement

ELEMENT_TYPE_IRRADIANCE_PROBES 

mi::neuraylib::IIrradiance_probes

ELEMENT_TYPE_DECAL 

mi::neuraylib::IDecal

ELEMENT_TYPE_ON_DEMAND_MESH 

mi::neuraylib::IOn_demand_mesh

ELEMENT_TYPE_PROJECTOR 

mi::neuraylib::IProjector

ELEMENT_TYPE_SECTION_OBJECT 

mi::neuraylib::ISection_object

ELEMENT_TYPE_PROXY 

mi::neuraylib::IProxy

 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::neuraylib::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::neuraylib::IGroup or mi::neuraylib::IInstance 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.

Note
There is one exception to these rules: If the child node C is a geometry object, then P's value of A is used, no matter whether the propagation mode was set to mi::neuraylib::PROPAGATION_OVERRIDE or mi::neuraylib::PROPAGATION_STANDARD. The rationale is that for geometry objects the attribute on the object itself should be a default that is only used if no value for that attribute is inherited.
Inherited attributes are made available to the render modes, but are not available via the Iray SDK API.
See also
mi::neuraylib::IAttribute_set::set_attribute_propagation()
mi::neuraylib::IAttribute_set::get_attribute_propagation()
Enumerator
PROPAGATION_STANDARD 

Standard inheritance of attributes without any special flags.

PROPAGATION_OVERRIDE 

The override flag for attribute inheritance.

Function Documentation

 get_value() [1/3]

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).

Parameters
attribute_setThe affected attribute set.
nameThe name of the attribute to read.
keyThe key of the affected collection element.
valueThe new value will be stored here.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -3: The key is not valid.
  • -4: The attribute name does not exist.

 get_value() [2/3]

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).

Parameters
attribute_setThe affected attribute set.
nameThe name of the attribute to read.
indexThe index of the affected collection element.
valueThe new value will be stored here.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -3: The index is not valid.
  • -4: The attribute name does not exist.

 get_value() [3/3]

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.

Parameters
attribute_setThe affected attribute set.
nameThe name of the attribute to read.
valueThe new value will be stored here.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -4: The attribute name does not exist.

 set_value() [1/3]

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).

Parameters
attribute_setThe affected attribute set.
nameThe name of the attribute to modify.
keyThe key of the affected collection element.
valueThe new value to be set.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -2: The value of value is not valid.
  • -3: The key is not valid.
  • -4: The attribute name does not exist.

 set_value() [2/3]

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.

Parameters
attribute_setThe affected attribute set.
nameThe name of the attribute to modify.
valueThe new value to be set.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -2: The value of value is not valid.
  • -4: The attribute name does not exist.

 set_value() [3/3]

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).

Parameters
attribute_setThe affected attribute set.
nameThe name of the attribute to modify.
indexThe index of the affected collection element.
valueThe new value to be set.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -2: The value of value is not valid.
  • -3: The index is not valid.
  • -4: The attribute name does not exist.