- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Friends

# MRenderItemList Class Reference
OpenMayaRender - API module for rendering

This reference page is linked to from the following overview topics: Data Classes, 2.1 Render Items (MRenderItem), 4.5 Handling custom renderables for object overrides.

Search for all occurrences

## Detailed Description

A list of MRenderItem objects.

A list of MRenderItem objects. All items in the list are owned by the list. This class cannot be created or destroyed, it is only passed to the user through various interfaces.

Examples:

  cgfxShaderNode.cpp, cgfxShaderNode.h, hwColorPerVertexShader.cpp, and hwPhongShader.cpp.

`#include <MHWGeometry.h>`

List of all members.

## Public Member Functions
int | length () const
| Get the number of items in the list.
int | indexOf (const MString &name, MGeometry::Primitive primitive, MGeometry::DrawMode mode) const
| Find the index of the first render item in the list matching the given search parameters.
const MRenderItem * | itemAt (int index) const
| Get a read-only pointer to the item at the specified index.
MRenderItem * | itemAt (int index)
| Get the item at the specified index.
bool | append (MRenderItem *item)
| Add the item to the list.
bool | removeAt (int index)
| Remove the item at the specified index.
void | clear ()
| Clear the list.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.
## Friends Search for all occurrences
class | MGeometryRequirements Search for all occurrences

## Member Function Documentation

int length | ( |  | ) | const

Search for all occurrences

Get the number of items in the list.

Returns:
  The number of items in the list

Examples:
  cgfxShaderNode.cpp, hwColorPerVertexShader.cpp, and hwPhongShader.cpp.

int indexOf | ( | const MString & | name,
|  | MGeometry::Primitive | primitive,
|  | MGeometry::DrawMode | mode
| ) |  | const

Search for all occurrences

Find the index of the first render item in the list matching the given search parameters.

Parameters:

  [in] | name | The name of the render item
  [in] | primitive | The primitive type of the render item
  [in] | mode | The draw mode of the render item

Returns:
  Index of render item or -1 if not found

const MRenderItem * itemAt | ( | int | index | ) | const

Search for all occurrences

Get a read-only pointer to the item at the specified index.

Note, the item is owned by the list.

Parameters:

  [in] | index | Index of item.

Returns:
  A pointer to the item at the specified index

Examples:
  cgfxShaderNode.cpp, hwColorPerVertexShader.cpp, and hwPhongShader.cpp.

MRenderItem * itemAt | ( | int | index | ) |

Search for all occurrences

Get the item at the specified index.

Note, the item is owned by the list.

Parameters:

  [in] | index | Index of item.

Returns:
  A pointer to the item at the specified index

bool append | ( | MRenderItem * | item | ) |

Search for all occurrences

Add the item to the list.

The list assumes ownership of the item.

Parameters:

  [in] | item | The render item to add

Returns:
  True on successful add

bool removeAt | ( | int | index | ) |

Search for all occurrences

Remove the item at the specified index.

Item is deleted.

Parameters:

  [in] | index | The item to remove

Returns:
  True on successful remove

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList
MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList MRenderItemList