# IRdTriangleStream Interface Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | GetNumTripleIndices ([out, retval] RtDWORD *dwNumTripleIndices)
HRESULT | SetNumTripleIndices ([in] RtDWORD dwNumTripleIndices)
HRESULT | BeginWrite ()
HRESULT | EndWrite ()
## Properties
RtUlong * | i ([in] RtDWORD dwIndex)`[get]`
RtUlong | i ([in] RtDWORD dwIndex)`[set]`
RtUlong * | j ([in] RtDWORD dwIndex)`[get]`
RtUlong | j ([in] RtDWORD dwIndex)`[set]`
RtUlong * | k ([in] RtDWORD dwIndex)`[get]`
RtUlong | k ([in] RtDWORD dwIndex)`[set]`

## Detailed Description

IRdTriangleStream:

- Stores list of triangle indices.
- The stream is part of IRdMesh and is stored in Triangle stream group.
- Stream is identified by STREAMID_TRIANGLES_INDICES id.

## Member Function Documentation

HRESULT IRdTriangleStream::GetNumTripleIndices | ( | [out, retval] RtDWORD * | dwNumTripleIndices | ) |

Get number of triangles. Each triple-index represents a triangle.

Returns:
  dwNumTripleIndices [out,retval] Returns value for number of triangles found.

  standard HRESULT processing can be applied to returned value

HRESULT IRdTriangleStream::SetNumTripleIndices | ( | [in] RtDWORD | dwNumTripleIndices | ) |

Set number of triangles.

Parameters:

  | dwNumTripleIndices | [in] Number of triangle to set stream to.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdTriangleStream::BeginWrite | ( |  | ) |

BeginWrite and EndWrite are used when, through use of a loop in script or similar, a process of writing the stream will take a little time.
BeginWrite would be used just before loop code.
Once the loop has ended, first line in code should be EndWrite

HRESULT IRdTriangleStream::EndWrite | ( |  | ) |

See BeginWrite.

## Property Documentation

RtUlong * IRdTriangleStream::i([in] RtDWORD dwIndex)`[get]`

Get first vertex of dwIndex-th triangle.

Parameters:

  | dwIndex | [in] Triangle index value.

Returns:
  pVal [out,retval] Vertex index of the first triangle corner. (i).

  standard HRESULT processing can be applied to returned value.

RtUlong IRdTriangleStream::i([in] RtDWORD dwIndex)`[set]`

Set first vertex of dwIndex-th triangle

Parameters:

  | dwIndex | [in] Triangle index value.
  | newVal | [in]Vertex index of the first triangle corner. (i).

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

RtUlong * IRdTriangleStream::j([in] RtDWORD dwIndex)`[get]`

Get second vertex of dwIndex-th triangle.

Parameters:

  | dwIndex | [in] Triangle index.

Returns:
  pVal [out,retval] Vertex index of the second triangle corner. (j).

  standard HRESULT processing can be applied to returned value.

RtUlong IRdTriangleStream::j([in] RtDWORD dwIndex)`[set]`

Set second vertex of dwIndex-th triangle.

Parameters:

  | dwIndex | [in] Triangle index.
  | newVal | [in] Vertex index of the second triangle corner. (j).

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

RtUlong* IRdTriangleStream::k([in] RtDWORD dwIndex)`[get]`

Get third vertex of dwIndex-th triangle.

Parameters:

  | dwIndex | [in] Triangle index.

Returns:
  pVal [out, retval] Vertex index of the third triangle corner. (k).

  standard HRESULT processing can be applied to returned value.

RtUlong IRdTriangleStream::k([in] RtDWORD dwIndex)`[set]`

Set third vertex of dwIndex-th triangle.

Parameters:

  | dwIndex | [in] Triangle index.
  | newVal | [in] Vertex index of the third triangle corner. (k).

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