GIScene.Control.Pick Class
The Pick-Control lets you pick an Object by clicking. As a result you get the an Object containing various information on the clicked point or event.content == false.
The click-Event content looks like this:
{
distance: {Number in Scene units},
object: {A reference to the clicked object},
face: {A reference to the clicked face},
faceIndex: {Index Number of the geomerty.faces Array},
point: {The intersection point on the clicked face as THREE.Vector3}
}
Constructor
GIScene.Control.Pick
(
-
camera
-
[config]
Parameters:
-
camera
THREE.Camera -
[config]
Object optionalConfiguration properties. e.g. {color : new THREE.Color(0xff0000)}
Item Index
Methods
Events
Methods
activate
()
Activates this Control
deactivate
()
Deactivates this Control
drawPickResult
(
-
pickResult
Draws a cross symbol to where the user has picked.
Parameters:
-
pickResult
ObjectA Raycaster intersect object
setScene
(
-
scene
Sets the scene property. This is automatically called on scene.addControl()
Parameters:
-
scene
Object
Properties
config
Object
The config which is used to initialize the Control. Merged from defaults and passed config Object.
isActive
Boolean
Events
click
The click event contains a content property with an result object or false