# IRdMaterialIndexStream Interface Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | GetNumMaterialIndices ([out, retval] RtDWORD *dwNumTripleIndices)
HRESULT | SetNumMaterialIndices ([in] RtDWORD dwNumMaterialIndices)
## Properties
RtDWORD * | index ([in] RtDWORD dwIndex)`[get]`
RtDWORD | index ([in] RtDWORD dwIndex)`[set]`

## Detailed Description

IRdMaterialIndexStream:

- Holds per-triangle material indices.
- The stream is part of IRdMesh and is stored in Triangle stream group.
- Stream is identified by STREAMID_TRIANGLES_MATINDEX id.

## Member Function Documentation

HRESULT IRdMaterialIndexStream::GetNumMaterialIndices | ( | [out, retval] RtDWORD * | dwNumTripleIndices | ) |

Get number of triangles.

Returns:
  dwNumTripleIndices [out,retval] Returns number of triangles.
  - Each triple-index represents a triangle.

  standard HRESULT processing can be applied to returned value.

HRESULT IRdMaterialIndexStream::SetNumMaterialIndices | ( | [in] RtDWORD | dwNumMaterialIndices | ) |

Set number of triangles.

Parameters:

  | dwNumMaterialIndices | [in] Set value for number of triangles. Each material index can also represents a triangle.

Returns:
  standard HRESULT processing can be applied to returned value.

## Property Documentation

RtDWORD * IRdMaterialIndexStream::index([in] RtDWORD dwIndex)`[get]`

Get material index for i-th triangle.

Parameters:

  | dwIndex | [in] Triangle index.

Returns:
  index [out, retval] Returns corresponding Material index.

  standard HRESULT processing can be applied to returned value.

RtDWORD IRdMaterialIndexStream::index([in] RtDWORD dwIndex)`[set]`

Set material index for i-th triangle.

Parameters:

  | dwIndex | [in] Triangle index.
  | index | [in] Material index.

Returns:
  standard HRESULT processing can be applied to returned value.