Applications use the methods of the Direct3DRMPickArray interface to organize pick objects. The pick array is zero based (0 to N-1).
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 Direct3DRMPick2Array interface.
You can use the Direct3DRMViewport2.Pick method to retrieve an Direct3DRMPickArray object, and then call the Direct3DRMPickArray.GetPickFrame method to retrieve an Direct3DRMFrameArray 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 Direct3DRMPickArray interface supports the following methods.
Obtain the Direct3DRMPickArray object by calling the Direct3DRMViewport2.Pick method.
Retrieves the Direct3DRMFrameArray object intersected by the specified pick.
Syntax
object.GetPickFrame(index As Long, pickDesc As D3DRMPICKDESC) As Direct3DRMFrameArray
Parts
- object
- Object expression that resolves to a Direct3DRMPickArray object.
- index
- Index into the pick array identifying the pick for which information will be retrieved.
- pickDesc
- D3DRMPICKDESC type specifying the pick position and face and group identifiers of the objects being retrieved.
Return Value
Returns the Direct3DRMFrameArray object associated with the specified pick.
Error Values
For a list of possible errors, see Direct3D Retained Mode Error Values.
See Also
Retrieves the Direct3DRMVisual object intersected by the specified pick.
Syntax
object.GetPickVisual(index As Long, pickDesc As D3DRMPICKDESC) As Direct3DRMVisual
Parts
- object
- Object expression that resolves to a Direct3DRMPickArray object.
- index
- Index into the pick array identifying the pick for which information will be retrieved.
- pickDesc
- D3DRMPICKDESC type specifying the pick position and face and group identifiers of the objects being retrieved.
Return Value
Returns the Direct3DRMVisual object associated with the specified pick.
Error Values
For a list of possible errors, see Direct3D Retained Mode Error Values.
See Also
Retrieves the number of elements contained in a Direct3DRMPickArray object.
Syntax
object.GetSize( ) As Long
Parts
- object
- Object expression that resolves to a Direct3DRMPickArray object.
Return Value
Returns the number of elements.
Error Values
For a list of possible errors, see Direct3D Retained Mode Error Values.
Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.