Skip to content

editorGlobalsIntersectionCaseHandler

Class: IntersectionCaseHandler

Knows how to handle one or more IntersectionCases

Hierarchy

  • IntersectionCaseHandler

Index

Properties

Methods

Properties

Private Readonly handledCases

handledCases: number[] = []

Defined in src/util/polygon/triangulatingClipper/IntersectionCaseHandler.ts:10

List of handled cases (fingerprints)


Private Readonly handlerFunctions

handlerFunctions: Array‹function› = []

Defined in src/util/polygon/triangulatingClipper/IntersectionCaseHandler.ts:12

List of functions that are used to handle above cases

Methods

Private _handleWith

_handleWith(intersectionEventTypes: EventType[], callback: function): void

Defined in src/util/polygon/triangulatingClipper/IntersectionCaseHandler.ts:37

Internal utility function to register a case handler for a given case

Parameters:

intersectionEventTypes: EventType[]

callback: function

▸ (intersectionCase: IntersectionCase): boolean

Parameters:

Name Type
intersectionCase IntersectionCase

Returns: void


Private _labelOverlap

_labelOverlap(triangle: Triangle): void

Defined in src/util/polygon/triangulatingClipper/IntersectionCaseHandler.ts:54

Labels the triangle as overlapping with candidate

Parameters:

Name Type
triangle Triangle

Returns: void


getHandledCases

getHandledCases(): number[]

Defined in src/util/polygon/triangulatingClipper/IntersectionCaseHandler.ts:18

Returns: number[]

array of cases that can be handled, represented by their event fingerprint (@see IntersectionCase#getEventFingerprint)


handle

handle(index: number, intersectionCase: IntersectionCase): boolean

Defined in src/util/polygon/triangulatingClipper/IntersectionCaseHandler.ts:28

Parameters:

Name Type Description
index number the index of the matching event fingerprint as returned by @getHandledCases
intersectionCase IntersectionCase -

Returns: boolean

true, if the operation succeeded, false, if not