Iray SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IGroup Class Referenceabstract

A group is a container for other scene elements. More...

#include <igroup.h>

Inheritance diagram for mi::neuraylib::IGroup:

Public Member Functions

virtual Uint32 get_length () const =0
 Returns the number of elements. More...
 
virtual const char * get_element (Uint32 index) const =0
 Returns the name of the element index. More...
 
virtual Sint32 attach (const char *scene_element)=0
 Attaches a scene element to the group. More...
 
virtual Sint32 detach (const char *scene_element)=0
 Detaches a scene element from the group. More...
 
virtual void clear ()=0
 Removes all elements in the array of grouped elements. 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 IDatacreate_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 IDataaccess_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 IDataedit_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 IInterfaceget_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 IInterfaceget_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< 0x3b26d1b4, ... >
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< 0x3b26d1b4, ... >
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...
 

Detailed Description

A group is a container for other scene elements.

Groups are typically used to structure the scene elements. Groups can be nested and thus can be used to create a hierarchy of scene elements. Typically, groups are used together with instances, either as group of instances or instance of a group. However, many different scene elements can be part of a group.

The root node of the scene graph is given by a top-level group (called root group).

The order of elements in a group does not matter.

Member Function Documentation

 attach()

virtual Sint32 mi::neuraylib::IGroup::attach ( const char *  scene_element)
pure virtual

Attaches a scene element to the group.

Adding an element that is already in the group will succeed but won't change the group.

Only the following types of scene elements can be attached to groups:

Parameters
scene_elementThe element to attach.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: There is no element with that name.
  • -3: The element can not be attached to the group because it is in a more private scope than the group.
  • -4: This type of scene element can not be attached to groups.

 clear()

virtual void mi::neuraylib::IGroup::clear ( )
pure virtual

Removes all elements in the array of grouped elements.

 detach()

virtual Sint32 mi::neuraylib::IGroup::detach ( const char *  scene_element)
pure virtual

Detaches a scene element from the group.

Removing an element that is not in the group has no effect. The detached element is not changed or deleted.

Parameters
scene_elementThe element to detach.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: There is no element with that name.
  • -3: The element is not attached to the group.

 get_element()

virtual const char * mi::neuraylib::IGroup::get_element ( Uint32  index) const
pure virtual

Returns the name of the element index.

Note that accessing many elements by index in order is fast, but random access by index is expensive.

Returns
The name of the requested element, or NULL if index is out of bounds.

 get_length()

virtual Uint32 mi::neuraylib::IGroup::get_length ( ) const
pure virtual

Returns the number of elements.