{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Class: RendererPicking","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/readme"},"children":["API"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d"},"children":["geotoolkit3d"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking"},"children":["picking"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking.rendererpicking"},"children":["RendererPicking"]}," / RendererPicking"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"class-rendererpicking","__idx":0},"children":["Class: RendererPicking"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking"},"children":["picking"]},".",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking.rendererpicking"},"children":["RendererPicking"]},".RendererPicking"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Default implementation for the picking renderer mechanism.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","This class uses rendering as a way to do picking.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","The idea is similar to the one used here: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://threejs.org/examples/webgl_interactive_cubes_gpu.html"},"children":["THREEJS tutorial"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","Instead of rendering color in each pixel, it will render more information coded as a rgba pixel.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","Then it will read the pixel and extract the information encoded in it.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","To do so, it will replace the current materials by custom shader-materials which will encode the required information into the pixel.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","The picking might require several steps to retrieve all the information it needs, for each pass one rgba component will be read from the graphic card.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","Typically it will execute the picking-rendering 4 passes:",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["shape-identifier: First pass to find which shapes is at the given position using its identifier"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["x-coordinate: Another pass to retrieve the world x coordinate at the pick position"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["y-coordinate: Another pass to retrieve the world y coordinate at the pick position"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["z-coordinate: Another pass to retrieve the world z coordinate at the pick position"]}]},"\nFor each pass, the scene will be reconfigured to write the corresponding attribute in place of the regular pixels.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nOne could add more passes to the picking by declaring them in the #getExtraPickingModes() of the picking material.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nUnlike the Raycasting approach, the picking occurs on the GPU, which means that:",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Vertex","&","Fragment shader are supported"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["No distance based criteria, the shape rendered at the given pixel coordinates is the one picked"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Performance is based on frame rendering performance only, however it may require several frames for a single picking operation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Returns only the closest object(s) to the camera (the one(s) visible on screen), transparency is ignored. (see filtering)"]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nNote that this picking implementation accepts a width","&","height parameters to select shapes in a rectangle centered on the given coordinates.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nA given shape will be returned only once even if it has several pixels in the picked area.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nThe results entry for such case would correspond to the pixel closest to the given picking coordinate.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nFor example if the picked object fills the whole area being picked.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nThen the picking coordinates returned will match the center of the picked rectangle.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nThis picking also accepts a 'filter' function that can hide objects that are not pickable.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nAs this filtering occurs prior to said GPU picking it may make some objects pickable even if those were initially hidden.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nFor example, if a cube is behind a plane, it's not pickable because it's hidden.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nBut if a filter that discards the plane is given, then the cube can be picked 'through' the plane.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nThis feature is intended to implement picking through non opaque object not as a convenience filter to ignore some shapes.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"hierarchy","__idx":1},"children":["Hierarchy"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.abstractpicking.abstractpicking"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AbstractPicking"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["↳ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RendererPicking"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":2},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.rendererpicking.rendererpicking#new-rendererpicking"},"children":["new RendererPicking()"]}]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.rendererpicking.rendererpicking#getclassname"},"children":["getClassName"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.rendererpicking.rendererpicking#getclassname-1"},"children":["getClassName"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.rendererpicking.rendererpicking#pick"},"children":["pick"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.rendererpicking.rendererpicking#pickarbitrary"},"children":["pickArbitrary"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.rendererpicking.rendererpicking#setpickingmaterial"},"children":["setPickingMaterial"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"contents","__idx":3},"children":["Contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"new-rendererpicking","__idx":4},"children":["new RendererPicking()"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new RendererPicking"]},"()"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"inherited-from","__idx":5},"children":["Inherited from"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["AbstractPicking.constructor"]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"getclassname","__idx":6},"children":["getClassName"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getClassName"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns","__idx":7},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"inherited-from-1","__idx":8},"children":["Inherited from"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.abstractpicking.abstractpicking"},"children":["AbstractPicking"]},".",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.abstractpicking.abstractpicking#getclassname"},"children":["getClassName"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"getclassname-1","__idx":9},"children":["getClassName"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Static"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getClassName"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-1","__idx":10},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"inherited-from-2","__idx":11},"children":["Inherited from"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.abstractpicking.abstractpicking"},"children":["AbstractPicking"]},".",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.abstractpicking.abstractpicking#getclassname-1"},"children":["getClassName"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"pick","__idx":12},"children":["pick"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Static"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["pick"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["plot"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["y"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["width?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["height?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["filter?"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking.abstractpicking.abstractpicking#pickingresult"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PickingResult"]}]},"[]"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Do a picking at the given plot coordinates and returns the objects found at this location.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","The returned objects will be in a json along with some meta information like xyz coordinates of the picked points.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","If using a width or height greater than 0, several object might be picked at once.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","In that case, the returned array would be sorted by distance to center pixel (device point given as parameter to this function).",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","If using a width or height greater than 0, one object may occupy several pixels in the picked area.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","Such object will be be returned only once in the result array.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","The results entry will correspond to the pixel closest to the given picking coordinate.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import {RendererPicking} from '@int/geotoolkit3d/picking/RendererPicking';\nimport {Line} from 'three';\n// Pick the objects in the rectangle of size 5,5 centered at (12,13)\nconst selection = RendererPicking.pick(plot, 12, 13, 2, 2, (object, pickable) => {\nif (!pickable) return false; // If object is already filtered natively, keep filtering it\nreturn !(object instanceof Line); // Prevent line picking, letting user pick through a line\n});\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters","__idx":13},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["plot"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.plot.plot"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Plot"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The target plot"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The x coordinate in plot device space"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["y"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The y coordinate in plot device space"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["width"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The amount of pixels to consider on the left and right side of the given x (effective width will be 2 times given width, plus 1 (the center pixel))"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["height"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The amount of pixels to consider on the top and bottom side of the given y (effective height will be 2 times given height, plus 1 (the center pixel))"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["filter"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking.abstractpicking.abstractpicking#filterfunction"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FilterFunction"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A function that can filter the pickable shape, takes the object to filter and it's current pickable status as parameter. Note that this filtering occurs prior to picking. As a result, an object can be picked through a filtered object. (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.rendererpicking.rendererpicking"},"children":["filtering"]}," documentation)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-2","__idx":14},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking.abstractpicking.abstractpicking#pickingresult"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PickingResult"]}]},"[]"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An array of jsons containing the intersecting object3d(s)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"overrides","__idx":15},"children":["Overrides"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.abstractpicking.abstractpicking"},"children":["AbstractPicking"]},".",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.abstractpicking.abstractpicking#pick"},"children":["pick"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"pickarbitrary","__idx":16},"children":["pickArbitrary"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Static"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["pickArbitrary"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["plot"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ray"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["width?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["height?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["filter?"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking.abstractpicking.abstractpicking#pickingresult"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PickingResult"]}]},"[]"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Perform a 3D GPU picking selection based on an arbitrary ray picking (position + direction), rather than a camera/cursor-based picking."," ","The ray length is unlimited, and the result will be the first intersection in the scene based on the ray direction."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-1","__idx":17},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["plot"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.plot.plot"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Plot"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["the 3D Plot to select from."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ray"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Ray"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["the Three.js Ray object that defines the position and direction of the ray picking."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["width"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The amount of pixels to consider on the left and right side of the given x (effective width will be 2 times given width, plus 1 (the center pixel))"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["height"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The amount of pixels to consider on the top and bottom side of the given y (effective height will be 2 times given height, plus 1 (the center pixel))"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["filter"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking.abstractpicking.abstractpicking#filterfunction"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FilterFunction"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A function that can filter the pickable shape, takes the object to filter and it's current pickable status as parameter. Note that this filtering occurs prior to picking. As a result, an object can be picked through a filtered object. (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.rendererpicking.rendererpicking"},"children":["filtering"]}," documentation)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-3","__idx":18},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking.abstractpicking.abstractpicking#pickingresult"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PickingResult"]}]},"[]"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["result the picked object, if any"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"setpickingmaterial","__idx":19},"children":["setPickingMaterial"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Static"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setPickingMaterial"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["materialClassName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pickingMaterialConstructor"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Register the picking material class to be used for picking for a given material.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","The picking renderer requires custom implementation of materials that write information instead of pixels.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","To customize the picking for a given object, one should implement the corresponding material and register it.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Deprecated"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["RendererPicking.setPickingMaterial is deprecated since 5.0, please use PickingMaterialRegistrar.setPickingMaterial instead."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["See"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.pickingrenderer.abstractshaderpickingmaterial.abstractshaderpickingmaterial"},"children":["AbstractShaderPickingMaterial"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-2","__idx":20},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["materialClassName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The picked material's classname to replace"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pickingMaterialConstructor"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.picking.pickingmaterialregistrar.pickingmaterialregistrar#materialclass"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MaterialClass"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The picking material's constructor"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-4","__idx":21},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]}]}]},"headings":[{"value":"Class: RendererPicking","id":"class-rendererpicking","depth":1},{"value":"Hierarchy","id":"hierarchy","depth":2},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Contents","id":"contents","depth":2},{"value":"new RendererPicking()","id":"new-rendererpicking","depth":4},{"value":"Inherited from","id":"inherited-from","depth":4},{"value":"getClassName","id":"getclassname","depth":4},{"value":"Returns","id":"returns","depth":4},{"value":"Inherited from","id":"inherited-from-1","depth":4},{"value":"getClassName","id":"getclassname-1","depth":4},{"value":"Returns","id":"returns-1","depth":4},{"value":"Inherited from","id":"inherited-from-2","depth":4},{"value":"pick","id":"pick","depth":4},{"value":"Parameters","id":"parameters","depth":4},{"value":"Returns","id":"returns-2","depth":4},{"value":"Overrides","id":"overrides","depth":4},{"value":"pickArbitrary","id":"pickarbitrary","depth":4},{"value":"Parameters","id":"parameters-1","depth":4},{"value":"Returns","id":"returns-3","depth":4},{"value":"setPickingMaterial","id":"setpickingmaterial","depth":4},{"value":"Parameters","id":"parameters-2","depth":4},{"value":"Returns","id":"returns-4","depth":4}],"frontmatter":{"seo":{"title":"Class: RendererPicking"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/apis/classes/geotoolkit3d.picking.rendererpicking.rendererpicking","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}