Class: SurfaceDragUtils

BIM. SurfaceDragUtils


new SurfaceDragUtils()

Handles utilities for dragging a point over the nearest model surface.

Author:
  • drajmarsh

Members


:BIM.Element|null

lastHoveredElement <static>

Stores the last hovered element for change detection.

Type

:PD.Polygon|null

lastHoveredFacet <static>

Stores the last hovered facet for change detection.

Type

:BIM.Junction|null

lastHoveredJunction <static>

Stores the last hovered junction for change detection.

Type

:THREE.Vector3

segPoint <static>

Stores the closest point on the closest path segment.

Type
  • THREE.Vector3

:THREE.Vector3

segVector <static>

The vector between the closest segment point and intersection point.

Type
  • THREE.Vector3

Methods


handleDragEnd(host, cursor, event) <static>

Completes the move after a drag has finished.

Parameters:
Name Type Description
host PD.SelectionManager

The selection manager.

cursor PD.Cursor

The cursor that just finished moving.

event object

The DOM event that triggered the end of the move.

Returns:

Returns true if the move was finalised.

Type
boolean

handleDragMove(host, newPos, cursor, event) <static>

Moves the drag point over the nearest surface.

Parameters:
Name Type Description
host PD.SelectionManager

The selection manager.

newPos THREE.Vector3

The point to snap to closest surface.

cursor PD.Cursor | null

The cursor to align with each surface, or null.

event object

The DOM event that triggered this move.

Returns:

Returns true if the move was applied.

Type
boolean

init() <static>

Initialises the last hovered items to null.