RectangularGridFilter
public struct RectangularGridFilter : GridFilter
Bounds an infinite grid to a finite, fixed rectangle.
-
The point at the minimum valid location.
Declaration
Swift
public let lowerBound: Point2
-
The point at the maximum valid location.
Declaration
Swift
public let upperBound: Point2
-
Allows all points within the rectangle defined by
a
andb
. -
Allows all points whose x and y coordinates fall within the specified ranges.
Declaration
Swift
public init(x: ClosedRange<Int>, y: ClosedRange<Int>)
-
Returns
true
iffvertex
should be considered part of the grid.Declaration
Swift
public func isPartOfGrid(_ vertex: Point2) -> Bool
-
Returns
true
iffedge
should be considered part of the grid.Declaration
Swift
public func isPartOfGrid(_ edge: GridEdge) -> Bool