import {DistanceMeasurement} from '@xeokit/xeokit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.js'
DistanceMeasurement
Extends:
Measures the distance between two 3D points.
See DistanceMeasurementsPlugin for more info.
Member Summary
Public Members | ||
public set |
Sets whether this DistanceMeasurement indicates that its measurement is approximate. |
|
public get |
Gets whether this DistanceMeasurement indicates that its measurement is approximate. |
|
public set |
Sets if the axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are enabled. |
|
public get |
Gets if the axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are enabled. |
|
public set |
Sets if the axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible. |
|
public get |
Gets if the axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible. |
|
public set |
Sets if the wires, dots ad labels will fire "mouseOver" "mouseLeave" and "contextMenu" events. |
|
public get |
Gets if the wires, dots ad labels will fire "mouseOver" "mouseLeave" and "contextMenu" events. |
|
public get |
color: * |
|
public set |
|
|
public set |
Sets if the labels are visible. |
|
public get |
Gets if the labels are visible. |
|
public get |
Gets the World-space direct point-to-point distance between DistanceMeasurement#origin and DistanceMeasurement#target. |
|
public get |
Gets the origin Marker. |
|
public set |
Sets if the origin Marker is visible. |
|
public get |
Gets if the origin Marker is visible. |
|
public |
The DistanceMeasurementsPlugin that owns this DistanceMeasurement. |
|
public get |
Gets the target Marker. |
|
public set |
Sets if the target Marker is visible. |
|
public get |
Gets if the target Marker is visible. |
|
public set |
Sets whether this DistanceMeasurement is visible or not. |
|
public get |
Gets whether this DistanceMeasurement is visible or not. |
|
public set |
Sets if the direct point-to-point wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible. |
|
public get |
Gets if the direct point-to-point wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible. |
Method Summary
Public Methods | ||
public |
setHighlighted(highlighted: *) Sets if this DistanceMeasurement appears highlighted. |
Inherited Summary
From class Component | ||
public get |
The Component that owns the lifecycle of this Component, if any. |
|
public |
True as soon as this Component has been destroyed |
|
public |
ID of this Component, unique within the Scene. |
|
public |
meta: * Arbitrary, user-defined metadata on this component. |
|
public |
The parent Scene that contains this Component. |
|
public |
The viewer that contains this Scene. |
|
public |
clear() Destroys all Components that are owned by this. |
|
public |
destroy() Destroys this component. |
|
public |
Logs an error for this component to the JavaScript console. |
|
public |
Fires an event on this component. |
|
public |
Returns true if there are any subscribers to the given event on this component. |
|
public |
Tests if this component is of the given type, or is a subclass of the given type. |
|
public |
Logs a console debugging message for this component. |
|
public |
Cancels an event subscription that was previously made with Component#on or Component#once. |
|
public |
Subscribes to an event on this component. |
|
public |
Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is subIdd. |
|
public |
Logs a warning for this component to the JavaScript console. |
Public Members
public set approximate: Boolean source
Sets whether this DistanceMeasurement indicates that its measurement is approximate.
This is true
by default.
public get approximate: Boolean source
Gets whether this DistanceMeasurement indicates that its measurement is approximate.
This is true
by default.
public set axisEnabled: Boolean source
Sets if the axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are enabled.
Wires are only shown if enabled and visible.
public get axisEnabled: Boolean source
Gets if the axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are enabled.
Wires are only shown if enabled and visible.
public set axisVisible: Boolean source
Sets if the axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible.
Wires are only shown if enabled and visible.
public get axisVisible: Boolean source
Gets if the axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible.
Wires are only shown if enabled and visible.
public set clickable: Boolean source
Sets if the wires, dots ad labels will fire "mouseOver" "mouseLeave" and "contextMenu" events.
public get clickable: Boolean source
Gets if the wires, dots ad labels will fire "mouseOver" "mouseLeave" and "contextMenu" events.
public get color: * source
public set color source
public get length: Number source
Gets the World-space direct point-to-point distance between DistanceMeasurement#origin and DistanceMeasurement#target.
public plugin: DistanceMeasurementsPlugin source
The DistanceMeasurementsPlugin that owns this DistanceMeasurement.
public set wireVisible: Boolean source
Sets if the direct point-to-point wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible.
public get wireVisible: Boolean source
Gets if the direct point-to-point wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible.
Public Methods
public setHighlighted(highlighted: *) source
Sets if this DistanceMeasurement appears highlighted.
Params:
Name | Type | Attribute | Description |
highlighted | * |