StructureTracker

StructureTracker

This tracker needs a structure scanner attached to the device. It can scan meshes, fill
holes in scanned meshes and colorize the scanned mesh with the scanned texture.
See Structure documentation: https://structure.io/developers

Extends

Members

active :boolean

Inherited From:

Is the tracker active or not.

Type:
  • boolean

groundConfirmed :boolean

Inherited From:

Is the ground position already confirmed.

Type:
  • boolean

name :string

Inherited From:

Name of the tracker.

Type:
  • string

scanVolume :ScanVolume

Get the current settings for the scan volume override.

Type:
  • ScanVolume

scanning :boolean

mesh scan status

Type:
  • boolean

sensorStatus :StructureTracker#SensorStatus

Get the current sensor status. Is automatically updated.

Type:

tracking :boolean

Inherited From:

Current target tracking status.

Type:
  • boolean

Methods

(async) _setScanVolume() → {Promise.<Object>}

Retrieves current tracker status.

Returns:

resolves with status info object

Type
Promise.<Object>

(async) activate()

Inherited From:

Activate the tracker. Disables all other currently active trackers.

(async) colorizeMesh() → {Promise}

Colorize the scanned mesh. Starts the skinning process.

Returns:

resolved when done.

Type
Promise

(async) confirmGroundPosition()

Inherited From:

Confirms ground position to start feature tracking.

(async) deactivate()

Inherited From:

Deactivate the tracker.

(async) fillMeshHoles() → {Promise}

Fills any holes in the scanned mesh, creating a closed body.

Returns:

resolved when done.

Type
Promise

(async) getMeshList() → {Promise.<Array.<Mesh>>}

Retrieves the list of stored meshes.

Returns:

resolved when done.

Type
Promise.<Array.<Mesh>>

(async) getTrackingQuality() → {Promise.<string>}

Retrieves current quality of tracking. Quality declines in environments with a lot of sunlight.

Returns:

resolves with string describing quality

Type
Promise.<string>

isActive() → {boolean}

Inherited From:

Is the tracker currently active.

Returns:

True if active.

Type
boolean

off(eventName, eventHandler)

Inherited From:
Parameters:
Name Type Description
eventName string
eventHandler function

on(eventName, eventHandler)

Inherited From:
Parameters:
Name Type Description
eventName string
eventHandler function

once(eventName, eventHandler)

Inherited From:
Parameters:
Name Type Description
eventName string
eventHandler function

(async) reset()

Inherited From:

Reset the tracker. Shorthand function for Tracker#deactivate and Tracker#activate.

(async) resetMeshScan() → {Promise}

Resets mesh scan. Previously scanned mesh is lost.

Returns:

resolved when done.

Type
Promise

(async) setScanVolume(newScanInfo, resetTracking) → {Promise}

Override the default settings for the scan volume for the scanning progress. It's also possible to override just one
value of the scan volume (e.g. resolution).

Parameters:
Name Type Description
newScanInfo StructureTracker#ScanVolume

The scan volume parameters.

resetTracking boolean

should the tracker reset after updating the values.

Returns:

Resolved when done.

Type
Promise

(async) startMeshScan() → {Promise}

Starts mesh scan.

Returns:

resolved when done.

Type
Promise

(async) stopMeshScan() → {Promise}

Stops mesh scan.

Returns:

resolved when done.

Type
Promise

Type Definitions

ScanVolume

The scan volume of the tracker. The tracker will scan only inside this area.

Type:
  • Object

SensorStatus

The last updated sensor status.

Type:
  • Object

Events

holeFillFinished

Fired when the hole filling has finished.

holeFillProgressUpdate

Sends the progress update from the hole filling from 0 to 100.

Parameters:
Name Type Description
progress int

in percent from 0 to 100.

skinningFinished

Fired when the skinning has finished.

skinningProgressUpdate

Sends the progress update from the skinning from 0 to 100.

Parameters:
Name Type Description
progress int

in percent from 0 to 100.

trackingBatteryNeedsCharging

Fired when the battery status of the sensor is too low.

Parameters:
Name Type Description
target TrackingTarget

trackingBatteryNeedsNoCharging

Fired when the battery status of the sensor is back to normal.

Parameters:
Name Type Description
target TrackingTarget

trackingSensorConnected

Fired when the sensor is connected to the device.

Parameters:
Name Type Description
target TrackingTarget

trackingSensorDisconnected

Fired when the sensor is disconnected from the device.

Parameters:
Name Type Description
target TrackingTarget

trackingSpeedHigh

Fired when the user looks around too fast.

Parameters:
Name Type Description
target TrackingTarget

trackingSpeedNormal

Fired when the user looks around in an acceptable speed again.

Parameters:
Name Type Description
target TrackingTarget

trackingTargetStatusChanged

Inherited From:

Fired when tracking features are found or lost.

Parameters:
Name Type Description
tracking boolean