Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface VertexViewerMeasurementDistance

Hierarchy

  • VertexViewerMeasurementDistance

Index

Properties

anchorLabelOffset?: number

The distance from an anchor to its label.

The camera used to position the anchors. If viewer is defined, then the projection view matrix of the viewer will be used.

distance?: number

The distance between start and end in real world units. Value will be undefined if the start and end positions are undefined, or if the measurement is invalid.

end?: Vector3

The world position of the ending anchor.

endJson?: string

The world position of the ending anchor, as a JSON string. The JSON string can be an array or object representation in the format of [x, y, z] or {"x": 0, "y": 0, "z": 0}.

fractionalDigits?: number

The number of fraction digits to display.

hitProvider?: PointToPointHitProvider
indicatorPt?: Vector3
interactingAnchor?: "none" | Anchor

A property that reflects which anchor is currently being interacted with.

invalid?: boolean

Indicates if the measurement is invalid. A measurement is invalid if either the start or end position are not on the surface of the model.

labelFormatter?: Formatter<undefined | number>

An optional formatter that can be used to format the display of a distance. The formatting function is passed a calculated real-world distance and is expected to return a string.

lineCapLength?: number

The length of the caps at each end of the distance measurement.

measurementModel?: MeasurementModel

The measurement model that will be updated when this measurement changes. You can pass this to a component to display measurement outcomes.

mode?: ViewerMeasurementDistanceMode

A mode that specifies how the measurement component should behave.

When unset, the component will not respond to interactions with the handles.

When edit, the measurement anchors are interactive and the user is able to reposition them.

When replace, anytime the user clicks on the canvas, a new measurement will be created and replace any existing measurement. After a measurement is created, the measurement will be editable.

showAxisReferenceLines?: boolean

Enables the display of axis reference lines between the start and end point.

snapDistance?: number

The distance, in pixels, between the mouse and nearest snappable edge. A value of 0 disables snapping.

start?: Vector3

The world position of the starting anchor.

startJson?: string

The world position of the starting anchor, as a JSON string. The JSON string can be an array or object representation in the format of [x, y, z] or {"x": 0, "y": 0, "z": 0}.

The unit of measurement.

viewer?: HTMLVertexViewerElement

The viewer to connect to this measurement. The measurement will redraw any time the viewer redraws the scene.

Methods