CornerFinder
Hierarchy
Constructors
constructor
• new CornerFinder()
Inherited from
Finder<Corner, Blueprint>.constructor
Defined in
Filter Methods
atDistance
▸ atDistance(distance
, point?
): CornerFinder
Filter to find elements that are at a specified distance from a point.
Parameters
Name | Type |
---|---|
distance | number |
point | Point2D |
Returns
Defined in
atPoint
▸ atPoint(point
): CornerFinder
Filter to find elements that contain a certain point
Parameters
Name | Type |
---|---|
point | Point2D |
Returns
Defined in
inBox
▸ inBox(corner1
, corner2
): CornerFinder
Filter to find elements that are within a box
Parameters
Name | Type |
---|---|
corner1 | Point2D |
corner2 | Point2D |
Returns
Defined in
inList
▸ inList(elementList
): CornerFinder
Filter to find corner that have their point are in the list.
Parameters
Name | Type |
---|---|
elementList | Point2D [] |
Returns
Defined in
ofAngle
▸ ofAngle(angle
): CornerFinder
Filter to find corner that a certain angle between them - only between 0 and 180.
Parameters
Name | Type |
---|---|
angle | number |
Returns
Defined in
Filter Combination Methods
and
▸ and(findersList
): CornerFinder
Combine logically a set of filter with an AND operation.
You need to pass an array of functions that take a finder as a argument and return the same finder with some filters applied to it.
Note that by default filters are applied with and AND operation, but in some case you might want to create them dynamically and use this method.
Parameters
Name | Type |
---|---|
findersList | (f : CornerFinder ) => CornerFinder [] |
Returns
Inherited from
Finder.and
Defined in
either
▸ either(findersList
): CornerFinder
Combine logically a set of filter with an OR operation.
You need to pass an array of functions that take a finder as a argument and return the same finder with some filters applied to it.
Parameters
Name | Type |
---|---|
findersList | (f : CornerFinder ) => CornerFinder [] |
Returns
Inherited from
Finder.either
Defined in
not
▸ not(finderFun
): CornerFinder
Invert the result of a particular finder
You need to pass a function that take a finder as a argument and return the same finder with some filters applied to it.
Parameters
Name | Type |
---|---|
finderFun | (f : CornerFinder ) => CornerFinder |
Returns
Inherited from
Finder.not
Defined in
Other Methods
clone
▸ clone(): CornerFinder
Returns
Defined in
delete
▸ delete(): void
Returns
void
Inherited from
Finder.delete
Defined in
find
▸ find(shape
, options
): Corner
Returns all the elements that fit the set of filters defined on this finder
If unique is configured as an option it will either return the unique element found or throw an error.
Parameters
Name | Type |
---|---|
shape | Blueprint |
options | Object |
options.unique | true |
Returns
Inherited from
Finder.find
Defined in
▸ find(shape
): Corner
[]
Parameters
Name | Type |
---|---|
shape | Blueprint |
Returns
Corner
[]
Inherited from
Finder.find
Defined in
▸ find(shape
, options
): Corner
[]
Parameters
Name | Type |
---|---|
shape | Blueprint |
options | Object |
options.unique? | false |
Returns
Corner
[]
Inherited from
Finder.find
Defined in
shouldKeep
▸ shouldKeep(element
): boolean
Parameters
Name | Type |
---|---|
element | Corner |
Returns
boolean
Overrides
Finder.shouldKeep