# IRdAvatarMotionState Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | SetTimeStamp (RtUlong dwTimeStamp)
HRESULT | GetTimeStamp (RtUlong *pdwTimeStamp)
HRESULT | SetCameraTransform ([in] RtMatrixf *pTransform)
HRESULT | GetCameraTransform ([out] RtMatrixf *pTransform)
HRESULT | SetAvatarPositionRotation ([in] RtVector3f *pPos,[in] RtVector3f *pRot)
HRESULT | GetAvatarPositionRotation ([out] RtVector3f *pPos,[out] RtVector3f *pRot)
HRESULT | AddTrack ([in] BSTR szTrackName,[in] RtFloat fWeight,[in] RtFloat fTime)
HRESULT | GetTracksCount ([out, retval] RtUlong *pdwTracksCount)
HRESULT | GetTrack ([in] RtUlong dwIndex,[out] BSTR *pszTrackName,[out] RtFloat *pfWeight,[out] RtFloat *pfTime)

## Detailed Description

This interface contains avatar motion state which is used for network transfer of avatar motions.

## Member Function Documentation

HRESULT IRdAvatarMotionState::SetTimeStamp | ( | RtUlong | dwTimeStamp | ) |

Set timestamp of this data. Timestamps are used for time-smooth interpolation

Parameters:

  | dwTimeStamp | Motion state time stamp
  | S_OK | is returned

HRESULT IRdAvatarMotionState::GetTimeStamp | ( | RtUlong * | pdwTimeStamp | ) |

Get timestamp of this data.

Parameters:

  | pdwTimeStamp | Motion state time stamp
  | S_OK | is returned

HRESULT IRdAvatarMotionState::SetCameraTransform | ( | [in] RtMatrixf * | pTransform | ) |

Set camera transform.

Parameters:

  | pTransform | Camera transform matrix
  | S_OK | is returned

HRESULT IRdAvatarMotionState::GetCameraTransform | ( | [out] RtMatrixf * | pTransform | ) |

Get camera transform

Parameters:

  | pTransform | Camera transform matrix
  | S_OK | is returned

HRESULT IRdAvatarMotionState::SetAvatarPositionRotation | ( | [in] RtVector3f * | pPos,
|  | [in] RtVector3f * | pRot |
| ) |  |  |

Set avatar position and rotation.

Parameters:

  | pPos | Avatar position
  | pRot | Avatar rotation
  | S_OK | is returned

HRESULT IRdAvatarMotionState::GetAvatarPositionRotation | ( | [out] RtVector3f * | pPos,
|  | [out] RtVector3f * | pRot |
| ) |  |  |

Get avatar position and rotation.

Parameters:

  | pPos | Avatar position
  | pRot | Avatar rotation
  | S_OK | is returned

HRESULT IRdAvatarMotionState::AddTrack | ( | [in] BSTR | szTrackName,
|  | [in] RtFloat | fWeight,
|  | [in] RtFloat | fTime |
| ) |  |  |

Add track to data object.

Parameters:

  | szTrackName | Name of the track
  | fWeight | Weight for animation
  | fTime | Animation time

Returns:
  S_OK is returned.

HRESULT IRdAvatarMotionState::GetTracksCount | ( | [out, retval] RtUlong * | pdwTracksCount | ) |

Get tracks count.

Parameters:

  | pdwTracksCount | Number of active tracks

Returns:
  S_OK is returned

HRESULT IRdAvatarMotionState::GetTrack | ( | [in] RtUlong | dwIndex,
|  | [out] BSTR * | pszTrackName,
|  | [out] RtFloat * | pfWeight,
|  | [out] RtFloat * | pfTime |
| ) |  |  |

Get track data.

Parameters:

  | dwIndex | Track index
  | pszTrackName | Name of the track
  | pfWeight | Weight for animation
  | pfTime | Animation time

Returns:
  S_OK is returned if succeeded