MRenderItemList Class Reference

This reference page is linked to from the following overview topics: Data Classes, 2.1 Render Items (MRenderItem).



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 MRenderItemitemAt (int index) const
 Get a read-only pointer to the item at the specified index.
MRenderItemitemAt (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

class MGeometryRequirements

Member Function Documentation

int length ( ) const

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

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
const MRenderItem * itemAt ( int  index) const

Get a read-only pointer to 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
Examples:
cgfxShaderNode.cpp, hwColorPerVertexShader.cpp, and hwPhongShader.cpp.
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 append ( MRenderItem item)

Add the item to the list.

The list assumes ownership of the item.

Parameters:
[in]itemThe render item to add
Returns:
True on successful add
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.

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