Skip to main content

Interface: ISculptToolShape

This interface defines a contract for implementing various shapes within the sculptor tool. Classes such as CircleSculptCursor adhere to this interface, providing specific implementations for sculptor tools to utilize the shape during sculpting operations.

Methods

configureToolSize()

configureToolSize(evt): void

Function configures the tool size

Parameters

evt: InteractionEventType

Returns

void

Defined in

tools/src/types/ISculptToolShape.ts:29


getEdge()

getEdge(viewport, p1, p2, mouseCanvas): object

Parameters

viewport: Viewport

p1: Point3

p2: Point3

mouseCanvas: Point2

Returns

object

angle

angle: number

canvasPoint

canvasPoint: Point2

point

point: Point3

Defined in

tools/src/types/ISculptToolShape.ts:37


getMaxSpacing()

getMaxSpacing(minSpacing): number

Function returns max spacing between two handles

Parameters

minSpacing: number

Returns

number

Defined in

tools/src/types/ISculptToolShape.ts:57


interpolatePoint()

interpolatePoint(viewport, angle, center): Point2

Parameters

viewport: Viewport

angle: number

center: Point2

Returns

Point2

Defined in

tools/src/types/ISculptToolShape.ts:31


renderShape()

renderShape(svgDrawingHelper, canvasLocation, options): void

Used to render shapes supported for sculptor tool

Parameters

svgDrawingHelper: SVGDrawingHelper

The svgDrawingHelper providing the context for drawing.

canvasLocation: Point2

Current canvas location in canvas index coordinates

options: any

Options for drawing shapes

Returns

void

Defined in

tools/src/types/ISculptToolShape.ts:20


updateToolSize()

updateToolSize(canvasCoords, viewport, activeAnnotation): void

Updates the tool size

Parameters

canvasCoords: Point2

Current canvas points

viewport: Viewport

activeAnnotation: ContourAnnotation

Returns

void

Defined in

tools/src/types/ISculptToolShape.ts:47