# IRdTriangleTimestampStream Interface Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | LockBlockTimestamps ()
HRESULT | UnLockBlockTimestamps (void)
HRESULT | GetBlockTimestamp ([in] RtDWORD dwStartTriangle,[in] RtDWORD dwTriangleCount,[out, retval] RtDWORD *pdwTimestamp)
HRESULT | GetSingleBlockTimestamp ([in] RtDWORD dwBlockIndex,[out, retval] RtDWORD *pdwTimestamp)
HRESULT | GetMaxTimestamp ([out, retval] RtDWORD *pdwTimestamp)
HRESULT | GetBlockSize ([out, retval] RtDWORD *pdwBlockSize)
HRESULT | GetBlockCount ([out, retval] RtDWORD *pdwBlockCount)
HRESULT | GetStreamElements ([out, retval] RtDWORD *pdwSize)
HRESULT | SetStreamElements ([in] RtDWORD dwSize)

## Detailed Description

IRdTriangleTimestampStream:

- Mesh stream is used to optimize processing of meshes in renderers and tools during editing of objects.
- The stream is injected into the mesh in point edit mode and all PE modifier tools should update it and add to output mesh.
- Failing to do so will significantly degrade performance of renderers, since they will turn on streams optimizations and will update whole mesh in case of mesh connector invalidation.
- Check RtTriangleTimestampStream for detailed description about timestamping mechanism.
- The stream is part of IRdMesh and is stored in Custom stream group.
- Stream is identified by STREAMID_TRIANGLE_TIMESTAMPS id.

## Member Function Documentation

HRESULT IRdTriangleTimestampStream::LockBlockTimestamps | ( |  | ) |

Lock stream. Function must be called before any Get operations.

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

HRESULT IRdTriangleTimestampStream::UnLockBlockTimestamps | ( | void |  | ) |

Unlock stream.

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

HRESULT IRdTriangleTimestampStream::GetBlockTimestamp | ( | [in] RtDWORD | dwStartTriangle,
|  | [in] RtDWORD | dwTriangleCount,
|  | [out, retval] RtDWORD * | pdwTimestamp |
| ) |  |  |

Get maximal timestamp for specified set of triangles.

Parameters:

  | dwStartTriangle | [in] Specifies first triangle index.
  | dwTriangleCount | [in] Specifies number of triangles for which you want timestamp.

Returns:
  pdwTimestamp [out,retval] Pointer that will be filled with maximal timestamp for selected triangles.

  standard HRESULT processing can be applied to returned value.

HRESULT IRdTriangleTimestampStream::GetSingleBlockTimestamp | ( | [in] RtDWORD | dwBlockIndex,
|  | [out, retval] RtDWORD * | pdwTimestamp |
| ) |  |  |

Get timestamp of specified triangle block.

Parameters:

  | dwBlockIndex | [in] Index to triangle timestamp block.
  | pdwTimestamp | [out,retval] Pointer that will be filled with triangle block timestamp.

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

HRESULT IRdTriangleTimestampStream::GetMaxTimestamp | ( | [out, retval] RtDWORD * | pdwTimestamp | ) |

Get maximal triangle timestamp for whole mesh.

Returns:
  pdwTimestamp [out,retval]Pointer that will be filled with timestamp.

  standard HRESULT processing can be applied to returned value.

HRESULT IRdTriangleTimestampStream::GetBlockSize | ( | [out, retval] RtDWORD * | pdwBlockSize | ) |

Get number of triangles stored per block.

Returns:
  pdwBlockSize [out,retval] Number of triangles in one timestamp block.

  standard HRESULT processing can be applied to returned value.

HRESULT IRdTriangleTimestampStream::GetBlockCount | ( | [out, retval] RtDWORD * | pdwBlockCount | ) |

Get number of timestamp triangle blocks.

Returns:
  pdwBlockCount [out,retval] Pointer that will be filled with triangle block timestamp.

  standard HRESULT processing can be applied to returned value.

HRESULT IRdTriangleTimestampStream::GetStreamElements | ( | [out, retval] RtDWORD * | pdwSize | ) |

Get size of stream in dwords.

Returns:
  pdwSize [out,retval] Pointer to dword that will be filled with size of stream in dwords.

  standard HRESULT processing can be applied to returned value.

HRESULT IRdTriangleTimestampStream::SetStreamElements | ( | [in] RtDWORD | dwSize | ) |

Set size of streams in dwords.

Parameters:

  | dwSize | [in] New count of dwords in a stream.

If you want to add N blocks into the stream, set stream size to N+3.

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