IDirect3DRMFrame2::SetQuaternion

Sets a frame's orientation relative to a reference frame using a unit quaternion.

HRESULT SetQuaternion(
LPDIRECT3DRMFRAME2 lpRef,
D3DRMQUATERNION *quat
)

Parameters

lpRef

Address of a variable that represents the Direct3DRMFrame2 object to be used as the reference.

quat

A D3DRMQUATERNION structure that holds the unit quaternion.

Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible return codes, see Direct3D Retained-Mode Return Values.

Remarks

A quaternion is a four-valued vector that can be used to represent any rotation, and that has properties that are useful when interpolating between orientations. A quaternion is a unit quaternion if s**2 + x**2 + y**2 + z**2 = 1

The function D3DRMQuaternionFromRotation can be used to generate unit quaternions from arbitrary rotation values.

The SetQuaternion method is supported by FrameInterpolators. See IDirect3DRMInterpolator Interface for more information about interpolators.