For a list of all Renderer Pick functions and related topics, see Renderer Picking.
The semantics of renderer picking are identical to rendering except that during picking, primitives are hit tested instead of converted to pixels.
All primitives which are passed to the rendering pipeline (i.e., they are not made invisible by the invisibility filter and they are not culled by the current culling mode) are eligible for picking. Picking uses the geometric definition of primitives, so it is possible for hollow, empty and transparent fill areas to be picked. However, it is implementation-dependent whether rendering effects which increase the area of the primitive (such as linewidth) are considered.
Two types of hit test rendering and traversals are supported:
For both types, the hit test which is performed on the primitives is controlled by the specified pick device type. The pick inclusion and pick exclusion filters control which primitives are to be tested.
For a list of all Renderer Pick functions and related topics, see Renderer Picking.
The pick method determines which "hit" primitives are picked. For pick one, PEXlib defines four standard pick methods:
The Z-buffer contents may not be preserved when using the visible pick methods. The visible pick methods only return primitives which would be visible in the pick aperture if they were rendered using the renderer's current HLHSR mode. For example, if the HLHSR mode is enabled, then the pick method PEXPickClosestZ may return a primitive which is occluded by another primitive which does not satisfy the pick filter test. However, the pick method PEXPickVisibleAny guarantees that the picked primitive is not occluded.
For pick all (multiple primitives may be picked), PEXlib defines two standard pick methods:
A "pick first" can be accomplished by specifying the maximum number of hits to be one.
To inquire the supported pick methods, invoke the PEXGetEnumTypeInfo function.
For a list of all Renderer Pick functions and related topics, see Renderer Picking.
The renderer's pick inclusion and exclusion filters specify the name sets to be used to filter primitives during picking. See Renderer Attributes. The pick functions only return primitives which are not excluded by the pick filter. pick one returns a primitive which most closely satisfies the pick criteria and also passes the pick filter test. A flag is returned from pick one functions to indicate whether a primitive which did not satisfy the pick filter was a better candidate with the specified pick method.
For a list of all Renderer Pick functions and related topics, see Renderer Picking.
In addition to pick device type and pick inclusion and exclusion filters, you can further control pick all by using the renderer's pick start path. The pick start path indicates where to begin the next pick all and is bound at the start of the pick all rendering or traversal.
For a list of all Renderer Pick functions and related topics, see Renderer Picking.
If a drawable that is associated with a renderer is destroyed or resized while the renderer is performing an immediate mode pick one or pick all hit test, then the pick operation is terminated and the renderer state is set to PEXIdle. The implementation ignores all subsequent output and traversal requests to the renderer until the next PEXEndPickOne or PEXEndPickAll (whichever is appropriate) which returns a pick status of PEXAbortedPick along with an empty pick path.
If a drawable that is associated with a renderer is moved, exposed or occluded while the renderer is performing a pick one or pick all hit test, then the implementation continues to process output commands and requests using the new drawable attributes until the pick operation is explicitly or implicitly terminated.