# Class LaserTool

Interface for tracked 3D coordinate.

#### Implements

- TrackCoordinate3D
- LabelUpdateEventData

##### Index

### Constructors

constructor

### Properties

end
id
isEnabled
onLabelUpdate?
start
type
x
y
z

### Accessors

isLaserVisible
isVisible
length

### Methods

dispose
update

## Constructors

### constructor

- new LaserTool(
  _geometryTool: GeometryTools,
  _parent: TransformNode,
  type: LaserToolType,
  id: string,
  start: Vector3,
  end: Vector3,
  _color: Color4,
  onLabelUpdate?: LabelUpdateHandler,
  _labelDistanceFromOrigin?: number,
  ): LaserTool

  #### Parameters

  - _geometryTool: GeometryTools
  - _parent: TransformNode
  - type: LaserToolType
  - id: string
  - start: Vector3
  - end: Vector3
  - _color: Color4
  - `Optional` onLabelUpdate: LabelUpdateHandler
  - _labelDistanceFromOrigin: number = 0.75

  #### Returns LaserTool

## Properties

### `Readonly` end

end: Vector3

Implementation of LabelUpdateEventData.end

### `Readonly` id

id: string

### isEnabled

isEnabled: boolean = false

If `undefined` or `true` and if onLabelUpdate is not undefined then coordinate tracker will report 2d coordinates for this instance.

Implementation of TrackCoordinate3D.isEnabled

### `Optional` `Readonly` onLabelUpdate

onLabelUpdate?: LabelUpdateHandler

### `Readonly` start

start: Vector3

Implementation of LabelUpdateEventData.start

### `Readonly` type

type: LaserToolType

### x

x: number

X Coordinate of laser label position

Implementation of TrackCoordinate3D.x

### y

y: number

Y Coordinate of laser label position

Implementation of TrackCoordinate3D.y

### z

z: number

Z Coordinate of laser label position

Implementation of TrackCoordinate3D.z

## Accessors

### isLaserVisible

- get isLaserVisible(): boolean

  `false` when laser is not visible.

  #### Returns boolean

### isVisible

- get isVisible(): boolean

  If `true` then laser tool is enabled.

  #### Returns boolean

- set isVisible(val: boolean): void

  If `false` then laser tool is not visible.

  #### Parameters

  - val: boolean

  #### Returns void

### length

- get length(): number

  Ray representing the laser

  #### Returns number

  Implementation of LabelUpdateEventData.length

## Methods

### dispose

- dispose(): void

  #### Returns void

### update

- update(camera: Camera, pO: PickOption): void

  #### Parameters

  - camera: Camera
  - pO: PickOption

  #### Returns void