Class: Picker

AL3D.Picker

new Picker(p)

Class that can be use to select meshes in the scene.
Parameters:
Name Type Description
p Object Object that represents the picker.
Properties
Name Type Description
callback function Callback to execute when mesh is picked.
Author:
  • Ángel Luis Perales Gómez.
Source:

Methods

doPick(renderObjects, camera, width, height)

Do the pick process and call the mesh clickListener or the callback passed to picker constructor.
Parameters:
Name Type Description
renderObjects Array.<AL3D.Object3D> Objects in the scene.
camera AL3D.Camera Camera to use to render the scene.
width number Viewport width
height number Viewport height.
Source:

pick(x, y)

Set the x and y coordenates and tell the system that must do the pick process.
Parameters:
Name Type Description
x number screen x coordinate.
y number screen y coordinate.
Source: