API Docs for: 1.0.2
Show:

GIScene.Control.Pick Class

Extends GIScene.Control
Module: GIScene

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 optional

    Configuration properties. e.g. {color : new THREE.Color(0xff0000)}

Item Index

Properties

Events

Methods

activate

()

Inherited from GIScene.Control but overwritten in GIScene\Control\Pick.js:119

Activates this Control

deactivate

()

Inherited from GIScene.Control but overwritten in GIScene\Control\Pick.js:141

Deactivates this Control

drawPickResult

(
  • pickResult
)

Draws a cross symbol to where the user has picked.

Parameters:

  • pickResult Object

    A 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