MRenderItemList Class Reference

#include <MHWGeometry.h>

Class 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:

Public Member Functions

int length () const
 Get the number of items in the list. More...
 
int indexOf (const MString &name) const
 Find the index of the first render item in the list matching the given search parameters. More...
 
int indexOf (const MString &name, MRenderItem::RenderItemType type) const
 Find the index of the first render item in the list matching the given search parameters. More...
 
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. More...
 
const MRenderItemitemAt (int index) const
 Get a read-only pointer to the item at the specified index. More...
 
MRenderItemitemAt (int index)
 Get the item at the specified index. More...
 
bool append (MRenderItem *item)
 Add the item to the list. More...
 
bool removeAt (int index)
 Remove the item at the specified index. More...
 
void clear ()
 Clear the list.
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Member Function Documentation

int indexOf ( const MString name,
MRenderItem::RenderItemType  type 
) const

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

Parameters
[in]nameThe name of the render item
[in]typeThe type of the render item
Returns
Index of render item or -1 if not found
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.

Parameters
[in]nameThe name of the render item
[in]primitiveThe primitive type of the render item
[in]modeThe draw mode of the render item
Returns
Index of render item or -1 if not found
MRenderItem * itemAt ( int  index)

Get the item at the specified index.

Note, the item is owned by the list.

Parameters
[in]indexIndex of item.
Returns
A pointer to the item at the specified index
bool removeAt ( int  index)

Remove the item at the specified index.

Item is deleted.

Parameters
[in]indexThe item to remove
Returns
True on successful remove
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files:
  • MHWGeometry.h
  • MHWGeometry.cpp