API / geotoolkit3d / picking / RayCastPicking / RayCastPicking
picking.RayCastPicking.RayCastPicking
Picking using raycasting algorithm.
This selection strategy use a raycasting algorithm to determine what objects are at the requested location.
Note that this algorithm has some known limitations as it's a CPU approach:
- Vertex&Fragment shader are not supported, therefore objects making use of them might not be pickable or picked at the wrong coordinates
- Raycasting use a distance-based criteria
- Can be slow if the picked object or any object considered as a candidate internally has a lot of triangles
- Returns all objects at the given location that match the criteria
↳
RayCastPicking
Constructors
Methods
▸ getClassName(): string
string
▸ Static getClassName(): string
string
▸ Static getPickingRay(plot, x, y): Ray
Return the Ray on the given plot at the given screen coordinates.
| Name | Type | Description |
|---|---|---|
plot | Plot | The target plot |
x | number | The x coordinate in plot device space |
y | number | The y coordinate in plot device space |
Ray
▸ Static getPickingRayClient(plot, x, y): Ray
Return the Ray on the given plot at the given screen coordinates.
| Name | Type | Description |
|---|---|---|
plot | Plot | The target plot |
x | number | The x coordinate in client device space |
y | number | The y coordinate in client device space |
Ray
▸ Static pick(plot, x, y): PickingResult[]
Cast a ray at the given pixel location (relative to the plot).
Objects close enough to the ray will be retrieved by the raycast operation.
| Name | Type | Description |
|---|---|---|
plot | Plot | The target plot |
x | number | The x coordinate in device space (pixels) |
y | number | The x coordinate in device space (pixels) |
An array of PickingResult containing the intersecting shapes