Applications use the methods of the Direct3DRMPick2Array interface to organize pick objects and to return more information about the pick objects. The pick array is zero based (0 to N-1). For more information about picking, see Direct3DRMPickArray.
You can use the Direct3DRMFrame3.RayPick method to retrieve an Direct3DRMPick2Array object, and then call the Direct3DRMPick2Array.GetPickFrame method to retrieve an Direct3DRMFrameArray interface, a visual object, and information about the object intersected by the ray, including the face and group identifiers, pick position, and horizontal and vertical texture coordinates for the vertex, vertex normal, and color of the object. The array of frames is the path through the hierarchy leading to the visual object.
The Direct3DRMPick2Array interface supports the following methods.
Obtain the Direct3DRMPick2Array object by calling the Direct3DRMFrame3.RayPick method.
Retrieves the Direct3DRMFrameArray object intersected by the specified pick.
Syntax
object.GetPickFrame(index As Long, pickDesc As D3DRMPICKDESC2) As Direct3DRMFrameArray
Parts
- object
- Object expression that resolves to a Direct3DRMPick2Array object.
- index
- Index into the pick array identifying the pick for which information will be retrieved.
- pickDesc
- D3DRMPICKDESC2 type specifying the face and group identifiers, pick position, horizontal and vertical texture coordinates for the vertex, vertex normal, and color of the intersected objects.
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.
Remarks
This method is similar to Direct3DRMPickedArray.GetPickFrame except that it retrieves the u- and v-values in a D3DRMPICKDESC2 type rather than a D3DRMPICKDESC type.
See Also
Retrieves the Direct3DRMVisual object intersected by the specified pick.
Syntax
object.GetPickVisual(index As Long, pickDesc As D3DRMPICKDESC2) As Direct3DRMVisual
Parts
- object
- Object expression that resolves to a Direct3DRMPick2Array object.
- index
- Index into the pick array identifying the pick for which information will be retrieved.
- pickDesc
- D3DRMPICKDESC2 type specifying the face and group identifiers, pick position, horizontal and vertical texture coordinates for the vertex, vertex normal, and color of the intersected objects.
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.
Remarks
This method is similar to Direct3DRMPickArray.GetPickVisual except that it retrieves the u- and v-values in a D3DRMPICKDESC2 type rather than a D3DRMPICKDESC type.
See Also
Retrieves the number of elements contained in a Direct3DRMPick2Array object.
Syntax
object.GetSize( ) As Long
Parts
- object
- Object expression that resolves to a Direct3DRMPick2Array 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
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.