IDirect3DRMPickedArray

Applications use the methods of the IDirect3DRMPickedArray interface to organize pick objects. Picking is the process of searching for visuals in a scene, given a 2-D coordinate in a viewport or a vector in a frame. For information about ray picking, see the IDirect3DRMPicked2Array interface.

You can use the IDirect3DRMViewport2::Pick method to retrieve an IDirect3DRMPickedArray interface, and then call the IDirect3DRMPickedArray::GetPick method to retrieve an IDirect3DRMFrameArray interface and a visual object. The array of frames is the path through the hierarchy leading to the visual object; that is, a hierarchical list of the visual object's parent frames, with the topmost parent in the hierarchy first in the array.

The IDirect3DRMPickedArray interface supports the following methods:
GetPick
GetSize

The IDirect3DRMPickedArray interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
AddRef
QueryInterface
Release

The Direct3DRMPickedArray object is obtained by calling the IDirect3DRMViewport2::Pick method.

IDirect3DRMPickedArray::GetPick

IDirect3DRMPickedArray

Retrieves the Direct3DRMVisual and Direct3DRMFrame objects intersected by the specified pick.

Syntax

HRESULT GetPick(
  DWORD index,
  LPDIRECT3DRMVISUAL *lplpVisual,
  LPDIRECT3DRMFRAMEARRAY *lplpFrameArray,
  LPD3DRMPICKDESC lpD3DRMPickDesc
  );

Parameters

index
Index into the pick array identifying the pick for which information will be retrieved.
lplpVisual
Address that will contain a pointer to the Direct3DRMVisual object associated with the specified pick.
lplpFrameArray
Address that will contain a pointer to the Direct3DRMFrameArray object associated with the specified pick.
lpD3DRMPickDesc
Address of a D3DRMPICKDESC structure specifying the pick position and face and group identifiers of the objects being retrieved.

Return Value

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

See Also

IDirect3DRMViewport2::Pick

IDirect3DRMPickedArray::GetSize

IDirect3DRMPickedArray

Retrieves the number of elements contained in a Direct3DRMPickedArray object.

Syntax

DWORD GetSize( );

Return Value

Returns the number of elements.


Top of Page Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.