The IDLgrBuffer::PickData function method maps a point in the two-dimensional device space of the buffer to a point in the three-dimensional data space of an object tree. The resulting 3-D data space coordinates are returned in a user-specified variable. The PickData function returns one if the specified location in the buffer's device space "hits" a graphic object, or zero otherwise.
| Note |
Result = Obj->[IDLgrBuffer::]PickData( View, Object, Location, XYZLocation [, DIMENSIONS=[width,height]][, PATH=objref(s)] [, PICK_STATUS=variable])
Returns one if the specified location in the buffer's device space "hits" a graphic object, or zero otherwise.
The object reference of an IDLgrView object that contains the object being picked.
The object reference of a model or atomic graphic object from which the data space coordinates are being requested.
| Note |
A two-element vector [x, y] specifying the location in the buffer's device space of the point to pick data from.
A named variable that will contain the three-dimensional double-precision floating-point data space coordinates of the picked point. Note that the value returned in this variable is a location, not a data value.
| Note |
Set this keyword to a two-element array [w, h] to specify data picking should occur for all device locations that fall within a pick box of these dimensions. The pick box will be centered about the coordinates [x, y] specified in the Location argument, and will occupy the rectangle defined by:
(x-(w/2), y-(h/2)) - (x+(w/2), y+(h/2))
By default, the pick box covers a single pixel. The array returned via the XYZLocation argument will have dimensions [3, w, h].
Set this keyword to a single object reference or a vector of object references. This keyword specifies the path in the graphics hierarchy to map the device position to a data space coordinate. Each path object reference specified with this keyword must contain an alias. The data space coordinate is computed for the version of the object falling within that path. If this keyword is not set, the PARENT properties determine the path from the current object to the top of the graphics hierarchy and no alias paths are pursued.
| Note |
Set this keyword to a named variable that will contain "hit" information for each pixel in the pick box. If the DIMENSIONS keyword is not set, the PICK_STATUS will be a scalar value exactly matching the Result of the method call. If the DIMENSIONS keyword is set, the PICK_STATUS variable will be an array matching the dimensions of the pick box. Each value in the PICK_STATUS array corresponds to a pixel in the pick box, and will be set to one of the following values:
|
Value
|
Description
|
|---|---|
| -1 |
The pixel falls outside of the window's viewport.
|
| 0 |
No graphic object is "hit" at that pixel location.
|
| 1 |
A graphic object is "hit" at that pixel location.
|
Introduced: 5.0
PICK_STATUS keyword added: 5.6