API Docs for: 1.0.2
Show:

GIScene.Control.Measure Class

The Measure-Control lets you pick two points of an Object by clicking. As a result you get the an Object containing the measured distance in scene units.

The measure-Event content looks like this:

    {
        distance:           {Number in Scene units},
        angleToNorth :      {Number angle in degrees}
    }

Constructor

GIScene.Control.Measure

(
  • 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\Measure.js:152

Activates this Control

deactivate

()

Inherited from GIScene.Control but overwritten in GIScene\Control\Measure.js:194

Deactivates this Control

drawPickResult

(
  • pickResult
)

Draws a cross symbol to where the user has picked and a connection line.

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

measure

The measure event contains a content property with an result object