Reference Source
public class | source

DistanceMeasurement

Extends:

Component → DistanceMeasurement

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

axesBasis(value: number[])

Sets the axes basis for the measurement.

public get

Gets the axes basis for the measurement.

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, or ignore mouse events altogether.

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 labels should be positioned on the wires.

public get

Gets if labels should be positioned on the wires.

public set

Sets if the labels are visible except the length label.

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 set

Sets if the length label is enabled.

public get

Gets if the length label is enabled.

public get

Gets the origin Dot3D.

public set

Sets if the origin Dot3D is visible.

public get

Gets if the origin Dot3D is visible.

public

The DistanceMeasurementsPlugin that owns this DistanceMeasurement.

public get

Gets the target Dot3D.

public set

Sets if the target Dot3D is visible.

public get

Gets if the target Dot3D is visible.

public set

Sets if the measurement is adjusted based on rotation

public get

Gets if the measurement is adjusted based on rotation

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.

public set

Sets if the X-axis-aligned wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible.

public get

Gets if the X-axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible.

public set

Sets if the x label is enabled.

public get

Gets if the x label is enabled.

public set

Sets if the Y-axis-aligned wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible.

public get

Gets if the Y-axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible.

public set

Sets if the y label is enabled.

public get

Gets if the y label is enabled.

public set

Sets if the Z-axis-aligned wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible.

public get

Gets if the Z-axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible.

public set

Sets if the z label is enabled.

public get

Gets if the z label is enabled.

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

Destroys this component.

public

error(message: String)

Logs an error for this component to the JavaScript console.

public

fire(event: String, value: Object, forget: Boolean)

Fires an event on this component.

public

Returns true if there are any subscribers to the given event on this component.

public

isType(type: *): *: Boolean

Tests if this component is of the given type, or is a subclass of the given type.

public

log(message: String)

Logs a console debugging message for this component.

public

off(subId: String)

Cancels an event subscription that was previously made with Component#on or Component#once.

public

on(event: String, callback: Function, scope: Object): String

Subscribes to an event on this component.

public

once(event: String, callback: Function, scope: Object)

Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is subIdd.

public

scheduleTask(task: *)

Schedule a task to perform on the next browser interval

public

warn(message: String)

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 axesBasis(value: number[]) source

Sets the axes basis for the measurement.

The value is a 4x4 matrix where each column-vector defines an axis and must have unit length.

This is the identity matrix by default, meaning the measurement axes are the same as the world axes.

public get axesBasis: number[] source

Gets the axes basis for the measurement.

The value is a 4x4 matrix where each column-vector defines an axis and must have unit length.

This is the identity matrix by default, meaning the measurement axes are the same as the world axes.

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, or ignore mouse events altogether.

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 set labelsOnWires: Boolean source

Sets if labels should be positioned on the wires.

public get labelsOnWires: Boolean source

Gets if labels should be positioned on the wires.

public set labelsVisible: Boolean source

Sets if the labels are visible except the length label.

public get labelsVisible: Boolean source

Gets if the labels are visible.

public get length: Number source

Gets the World-space direct point-to-point distance between DistanceMeasurement#origin and DistanceMeasurement#target.

public set lengthLabelEnabled: Boolean source

Sets if the length label is enabled.

public get lengthLabelEnabled: Boolean source

Gets if the length label is enabled.

public get origin: Dot3D source

Gets the origin Dot3D.

public set originVisible: Boolean source

Sets if the origin Dot3D is visible.

public get originVisible: Boolean source

Gets if the origin Dot3D is visible.

public plugin: DistanceMeasurementsPlugin source

The DistanceMeasurementsPlugin that owns this DistanceMeasurement.

public get target: Dot3D source

Gets the target Dot3D.

public set targetVisible: Boolean source

Sets if the target Dot3D is visible.

public get targetVisible: Boolean source

Gets if the target Dot3D is visible.

public set useRotationAdjustment: Boolean source

Sets if the measurement is adjusted based on rotation

public get useRotationAdjustment: Boolean source

Gets if the measurement is adjusted based on rotation

public set visible: Boolean source

Sets whether this DistanceMeasurement is visible or not.

public get visible: Boolean source

Gets whether this DistanceMeasurement is visible or not.

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 set xAxisVisible: Boolean source

Sets if the X-axis-aligned wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible.

Wires are only shown if enabled and visible.

public get xAxisVisible: Boolean source

Gets if the X-axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible.

Wires are only shown if enabled and visible.

public set xLabelEnabled: Boolean source

Sets if the x label is enabled.

public get xLabelEnabled: Boolean source

Gets if the x label is enabled.

public set yAxisVisible: Boolean source

Sets if the Y-axis-aligned wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible.

Wires are only shown if enabled and visible.

public get yAxisVisible: Boolean source

Gets if the Y-axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible.

Wires are only shown if enabled and visible.

public set yLabelEnabled: Boolean source

Sets if the y label is enabled.

public get yLabelEnabled: Boolean source

Gets if the y label is enabled.

public set zAxisVisible: Boolean source

Sets if the Z-axis-aligned wire between DistanceMeasurement#origin and DistanceMeasurement#target is visible.

Wires are only shown if enabled and visible.

public get zAxisVisible: Boolean source

Gets if the Z-axis-aligned wires between DistanceMeasurement#origin and DistanceMeasurement#target are visible.

Wires are only shown if enabled and visible.

public set zLabelEnabled: Boolean source

Sets if the z label is enabled.

public get zLabelEnabled: Boolean source

Gets if the z label is enabled.

Public Methods

public setHighlighted(highlighted: *) source

Sets if this DistanceMeasurement appears highlighted.

Params:

NameTypeAttributeDescription
highlighted *