# IRdMaterialChunk Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | GetMaterialIndex ([out, retval] RtDWORD *pdwIndex)
HRESULT | SetMaterialIndex ([in] RtDWORD dwIndex)
HRESULT | GetNumMaterialItems ([out, retval] RtDWORD *pdwNum)
HRESULT | GetMaterialItem ([in] RtMatClsId &MatClsId,[out, retval] IRsObject **ppMaterial)
HRESULT | GetMaterialInfo ([out, retval] IRdMaterialActiveInfo **ppMaterialInfo)
HRESULT | SetMaterialInfo ([in] IRdMaterialActiveInfo *pMaterialInfo)

## Detailed Description

Material chunk contains list of material flavors contained in material.

## Member Function Documentation

HRESULT IRdMaterialChunk::GetMaterialIndex | ( | [out, retval] RtDWORD * | pdwIndex | ) |

Returns material index.

Returns:
  pdwIndex [out,retval] Material index.

HRESULT IRdMaterialChunk::SetMaterialIndex | ( | [in] RtDWORD | dwIndex | ) |

Set material index

Parameters:

  | dwIndex | [in] Material index.

HRESULT IRdMaterialChunk::GetNumMaterialItems | ( | [out, retval] RtDWORD * | pdwNum | ) |

Returns number of material items defined.

Returns:
  pdwNum [out, retval] Number of items.

HRESULT IRdMaterialChunk::GetMaterialItem | ( | [in] RtMatClsId & | MatClsId,
|  | [out, retval] IRsObject ** | ppMaterial |
| ) |  |  |

Return material item specified with class id.

Parameters:

  | MatClsId | [in] Material class ID.

Returns:
  ppMaterial [out, retval] Retrieved material.

HRESULT IRdMaterialChunk::GetMaterialInfo | ( | [out, retval] IRdMaterialActiveInfo ** | ppMaterialInfo | ) |

Return enclosed material info data object.

Returns:
  ppMaterialInfo [out, retval] Retrieved material info.

HRESULT IRdMaterialChunk::SetMaterialInfo | ( | [in] IRdMaterialActiveInfo * | pMaterialInfo | ) |

Set material info data object.

Parameters:

  | pMaterialInfo | [in] Material info to set.