IDirect3DRMFrame::SetOrientation
HRESULT SetOrientation(LPDIRECT3DRMFRAME lpRef, D3DVALUE rvDx,
D3DVALUE rvDy, D3DVALUE rvDz, D3DVALUE rvUx, D3DVALUE rvUy,
D3DVALUE rvUz);
Aligns a frame so that its z-direction points along the direction vector [rvDx, rvDy, rvDz] and its y-direction aligns with the vector [rvUx, rvUy, rvUz].
·Returns D3DRM_OK if successful, or an error otherwise. For a list of possible return codes, see Direct3D Retained-Mode Return Values.
lpRef
Address of a variable that represents the Direct3DRMFrame object to be used as the reference.
rvDx, rvDy, and rvDz
New z-axis for the frame.
rvUx, rvUy, and rvUz
New y-axis for the frame.
The default orientation of a frame has a direction vector of [0, 0, 1] and an up vector of [0, 1, 0].
If [rvUx, rvUy, rvUz] is parallel to [rvDx, rvDy, rvDz], the D3DRMERR_BADVALUE error value is returned; otherwise, the [rvUx, rvUy, rvUz] vector passed is projected onto the plane that is perpendicular to [rvDx, rvDy, rvDz].