NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::IGroup Class Referenceabstract

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

Inheritance diagram for mi::IGroup:
Inheritance graph
[legend]

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

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x3b26d1b4, 0x4aa8, 0x4876, 0xad, 0x7c, 0x4a, 0xaa, 0xd9, 0x25, 0x0d, 0xce, IScene_element >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IScene_element
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x3b26d1b4, 0x4aa8, 0x4876, 0xad, 0x7c, 0x4a, 0xaa, 0xd9, 0x25, 0x0d, 0xce, IScene_element >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. 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, any scene element 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

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

Attaches a scene element to the group.

Adding an element that is already in the group is an undefined operation.

Parameters
scene_element The 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.
virtual void mi::IGroup::clear ( )
pure virtual

Removes all elements in the array of grouped elements.

virtual Sint32 mi::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_element The 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.
virtual const char* mi::IGroup::get_element ( Uint32  index) const
pure virtual

Returns the name of the element index.

Returns
The name of the requested element, or NULL if index is out of bounds.
virtual Uint32 mi::IGroup::get_length ( ) const
pure virtual

Returns the number of elements.