Methods
(static) getIntersector(typeA, typeB) → {undefined|function}
Get the intersector for the given types
Parameters:
Name | Type | Description |
---|---|---|
typeA |
String | The type of the first object |
typeB |
String | The type of the second object |
- Source:
Returns:
The intersector, if it exists
- Type
- undefined | function
(static) intersect(a, b) → {Array.<{x:Number, y:Number}>|null}
Computes the intersection of two typed objects
Parameters:
Name | Type | Description |
---|---|---|
a |
Object | The first object with a type |
b |
Object | The second object with a type |
- Source:
Returns:
The intersections, if they exist. May also return null, if none exist
- Type
- Array.<{x:Number, y:Number}> | null
(static) setIntersector(typeA, typeB, intersector, addReverse)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
typeA |
String | The type of the first object | |
typeB |
String | The type of the second object | |
intersector |
function | The intersection function taking objects of the specified types and returning intersections. May also return null, if none exist | |
addReverse |
Boolean | true | If true, an additional function with swapped arguments (if they are different) is added automatically |
- Source: