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:34


getInsertPosition()

getInsertPosition(previousIndex, nextIndex, sculptData): Point3

Function returns the the position to insert new handle

Parameters

previousIndex: number

Previous handle index

nextIndex: number

Next handle index

sculptData: SculptData

Sculpt data

Returns

Point3

Defined in

tools/src/types/ISculptToolShape.ts:58


getMaxSpacing()

getMaxSpacing(minSpacing): number

Function returns max spacing between two handles

Parameters

minSpacing: number

Returns

number

Defined in

tools/src/types/ISculptToolShape.ts:50


pushHandles()

pushHandles(viewport, sculptData): PushedHandles

Pushes the points radially away from the mouse if they are contained within the shape defined by the freehandSculpter tool

Parameters

viewport: Viewport

sculptData: SculptData

Returns

PushedHandles

Defined in

tools/src/types/ISculptToolShape.ts:29


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:40