new SurfaceDrawing()
A utility class for drawing on a model surface.
Members
-
:PD.LocalCoordinates
_localCoords <static>
-
The local coordinates of the current polygon.
Type
-
:BIM.Element|null
cursor <static>
-
Stores the cursor to follow drawing surface.
Type
- BIM.Element | null
-
:BIM.Element|null
element <static>
-
Stores the element that owns the drawing surface.
Type
- BIM.Element | null
-
:BIM.Element|null
junction <static>
-
Stores the junction that defines the drawing surface.
Type
- BIM.Element | null
Methods
-
handleDragMove(host, newPos, cursor, event) <static>
-
Moves the cursor over the drawing surface.
Parameters:
Name Type Description hostPD.SelectionManager The selection manager.
newPosTHREE.Vector3 The point to snap to the surface surface.
cursorPD.Cursor | null The cursor to align with the surface, or null.
eventobject The DOM event that triggered this move.
Returns:
Returns true if the move was applied.
- Type
- boolean
-
handleDragStart(host, cursor, event) <static>
-
Prepare cursor for an interactive drag event.
Parameters:
Name Type Description hostPD.SelectionManager The selection manager.
cursorPD.Cursor The cursor that is about to move.
eventobject The DOM event that triggered this move.
Returns:
Returns true if the move is allowed.
- Type
- boolean
-
handlePreSelect(host, raycaster, cursor) <static>
-
Handles interactive pre-selection events.
Parameters:
Name Type Description hostPD.SelectionManager The selection manager.
raycasterTHREE.Raycaster The ray cast into the current scene.
cursorPD.Cursor The cursor that is about to move.
Returns:
Returns true if something in the model was pre-selected and geometry was added to the mesh, otherwise false.
- Type
- boolean
-
init(element, junction, cursor) <static>
-
Initialises surface drawing.
Parameters:
Name Type Description elementBIM.Element The element that owns the drawing surface.
junctionBIM.Junction The junction that defines the drawing surface.
cursorPD.Cursor The cursor to follow the drawing surface.
Returns:
Returns true if surface able to be drawn on was found and set, otherwise false.
- Type
- boolean
-
setCursorToSurface(host, cursor [, newPos]) <static>
-
Moves the cursor over the drawing surface.
Parameters:
Name Type Argument Description hostPD.SelectionManager The selection manager.
cursorPD.Cursor | null The cursor to align with the surface, or null.
newPosTHREE.Vector3 <optional>
An optional point to snap to the surface surface.
Returns:
Returns true if the cursor was updated.
- Type
- boolean