Home > @modelo.io/api > MeasureAngle

MeasureAngle class

A used to measure the angles on the model surface.

Signature:

export default class MeasureAngle extends Measure 

Constructors

ConstructorDescription
(constructor)(viewer)Constructs a new instance of the MeasureAngle class

Methods

MethodDescription
_onTouchStop(touch)
getAngle()Get the current measured angle in radians.
isRadians()Is the current measurement unit radians now?
setEnabled(enabled)Enable the tool.
useRadians(enabled)Choose to use radians or degrees.

Remarks

Notice that we can not enable multiple measure tools at the same time. Before a new tool being enabled, the old tool must be disabled first.

Moreover, the measurement tools require mouse input and mouse input should be added to the viewer before the tool.

Example

var ruler = new Modelo.View.Tool.MeasureAngle(viewer);
viewer.addTool(ruler);