MeasurePath

Measurement path composed of points and lines.

Constructor

new MeasurePath(parentMeasureObject, itownsView, pointMaterial, lineMaterial)

Parameters:
NameTypeDescription
parentMeasureObjectGroup

Group that contains the path.

itownsViewPlanarView

iTowns view instance.

pointMaterialMeshBasicMaterial

Material for the sphere meshes.

lineMaterialLineBasicMaterial

Material for the lines.

Members

labelDomElements :Array.<Label3D>

Type:

lineMaterial :LineBasicMaterial

Type:
  • LineBasicMaterial

object3D :Object3D

Type:
  • Object3D

pointMaterial :MeshBasicMaterial

Type:
  • MeshBasicMaterial

points :Array.<Vector3>

Type:
  • Array.<Vector3>

sphereMesh :Array.<Mesh>

Type:
  • Array.<Mesh>

Methods

addPoint(vector, itownsView)

Adds a new point to the measurement path.

Parameters:
NameTypeDescription
vectorVector3

position of the point.

itownsViewPlanarView

iTowns view instance.

update(itownsView)

Updates the 3D objects representing the measurement path, including spheres and lines.

Parameters:
NameTypeDescription
itownsViewPlanarView

iTowns view instance.

updateTransform(itownsView)

Updates the transform (scale) of spheres and labels based on camera distance.

Parameters:
NameTypeDescription
itownsViewPlanarView

iTowns view instance.