Skip to content

editor › Globals › HandlerUtils

Class: HandlerUtils

Small utility functions that wrap repetitive tasks that occur when handling intersection cases

Hierarchy

  • HandlerUtils

Index

Methods

Methods

Static Private _addToSingleIntersection

▸ _addToSingleIntersection(groupedIntersections: IGroupedIntersections, baseSideCode: SideCode, point: Vector3): void

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:147

Parameters:

Name Type Default
groupedIntersections IGroupedIntersections -
baseSideCode SideCode null
point Vector3 -

Returns: void


Static convertGroupedIntersectionsToLines

▸ convertGroupedIntersectionsToLines(groupedIntersections: IGroupedIntersections): IStraightLine[]

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:84

Parameters:

Name Type
groupedIntersections IGroupedIntersections

Returns: IStraightLine[]


Static convertGroupedIntersectionsToLinesWithInsidePoint

▸ convertGroupedIntersectionsToLinesWithInsidePoint(groupedIntersections: IGroupedIntersections, insidePoint: Vector3): object

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:98

Parameters:

Name Type
groupedIntersections IGroupedIntersections
insidePoint Vector3

Returns: object

  • lineWithPoint: ILineWithPoint

  • straightLine(): object

  • point0: Vector3‹› = doubleIntersections[0].intersectionPoint

  • point1: Vector3‹› = doubleIntersections[1].intersectionPoint

  • sideCode0: SideCode = doubleIntersections[0].baseSide

  • sideCode1: SideCode = doubleIntersections[1].baseSide


Static cutSliceWithExtraPoint

▸ cutSliceWithExtraPoint(base: Triangle, events: IntersectionEvent[], extraPointSide: SideCode, extraPoint: Vector3, labelOverlapFunction: function): void

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:32

Parameters:

▪ base: Triangle

▪ events: IntersectionEvent[]

▪ extraPointSide: SideCode

▪ extraPoint: Vector3

▪ labelOverlapFunction: function

▸ (triangle: Triangle): void

Parameters:

Name Type
triangle Triangle

Returns: void


Static getOtherPointOfSide

▸ getOtherPointOfSide(triangle: Triangle, sideCode: SideCode, pointName: PointCode): Vector3

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:46

Parameters:

Name Type
triangle Triangle
sideCode SideCode
pointName PointCode

Returns: Vector3


Static groupIntersectionsByCandidateSide

▸ groupIntersectionsByCandidateSide(events: IntersectionEvent[]): Dictionary‹IntersectionEvent[]›

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:79

Parameters:

Name Type
events IntersectionEvent[]

Returns: Dictionary‹IntersectionEvent[]›


Static pointInOtherTriangle

▸ pointInOtherTriangle(triangle: Triangle, otherTriangle: Triangle, allowEpsilonDistance: boolean): Vector3

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:19

Parameters:

Name Type Default
triangle Triangle -
otherTriangle Triangle -
allowEpsilonDistance boolean false

Returns: Vector3

The point of a triangle that is inside the other triangle. Zero or one inside point expected


Static pointOfSideInOtherTriangle

▸ pointOfSideInOtherTriangle(triangle: Triangle, sideCode: SideCode, otherTriangle: Triangle): Vector3‹›

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:53

Parameters:

Name Type
triangle Triangle
sideCode SideCode
otherTriangle Triangle

Returns: Vector3‹›


Static pointsInOtherTriangle

▸ pointsInOtherTriangle(triangle: Triangle, otherTriangle: Triangle, allowEpsilonDistance: boolean): Vector3‹›[]

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:61

Parameters:

Name Type Default
triangle Triangle -
otherTriangle Triangle -
allowEpsilonDistance boolean false

Returns: Vector3‹›[]


Static sliceAndLabel

▸ sliceAndLabel(base: Triangle, lines: Array‹object›, labelOverlapFunction: function): void

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:134

Parameters:

▪ base: Triangle

▪ lines: Array‹object›

▪ labelOverlapFunction: function

▸ (triangle: Triangle): void

Parameters:

Name Type
triangle Triangle

Returns: void


Static triangleThatHasPoint

▸ triangleThatHasPoint(triangles: Triangle[], pointOrPoints: Vector3 | Vector3[]): Triangle‹›

Defined in src/util/polygon/triangulatingClipper/subdivideHandlers/HandlerUtils.ts:66

Parameters:

Name Type
triangles Triangle[]
pointOrPoints Vector3 | Vector3[]

Returns: Triangle‹›