Skip to content

editorGlobalsTwinMap

Class: TwinMap

Stores twin edges for linking twin relationship using a map in a map. The outer map links start points to end points. The inner map links end points to the edges that are made of the start and end point. This construct is necessary as a mesh point can have multiple edges associated to it. Therefore we need to differentiate between these multiple edges using their end points.

This is essentially a Multimap, for more information see: https://en.wikipedia.org/wiki/Multimap

Hierarchy

  • TwinMap

Index

Constructors

Properties

Methods

Constructors

constructor

+ new TwinMap(): TwinMap

Defined in src/modules/kyub.core.mirror/src/TwinMap.ts:16

Returns: TwinMap

Properties

Private bucketMap

bucketMap: Map‹MeshPoint, Map‹MeshPoint, MeshHalfEdge››

Defined in src/modules/kyub.core.mirror/src/TwinMap.ts:16

Methods

addTwin

addTwin(startPoint: MeshPoint, endPoint: MeshPoint, edge: MeshHalfEdge): void

Defined in src/modules/kyub.core.mirror/src/TwinMap.ts:29

Adds a possible twin to the map.

Parameters:

Name Type Description
startPoint MeshPoint start point of given edge
endPoint MeshPoint end point of given edge
edge MeshHalfEdge needs to be linked to twin

Returns: void


getTwinEdge

getTwinEdge(startPoint: MeshPoint, endPoint: MeshPoint): MeshHalfEdge

Defined in src/modules/kyub.core.mirror/src/TwinMap.ts:48

Gets a twin for given start and end point of an edge.

Parameters:

Name Type Description
startPoint MeshPoint same as end point of possible twin
endPoint MeshPoint same as start point of possible twin

Returns: MeshHalfEdge

twin or undefined if no twin was found


removeTwin

removeTwin(startPoint: MeshPoint, endPoint: MeshPoint): boolean

Defined in src/modules/kyub.core.mirror/src/TwinMap.ts:65

Removes an edge that needs to be linked.

Parameters:

Name Type Description
startPoint MeshPoint of edge
endPoint MeshPoint of edge

Returns: boolean

whether the operation was successful


size

size(): number

Defined in src/modules/kyub.core.mirror/src/TwinMap.ts:81

Returns: number