ConvexLineIntersection
public enum ConvexLineIntersection<Vector> where Vector : VectorFloatingPoint
extension ConvexLineIntersection: Equatable where Vector: Equatable
extension ConvexLineIntersection: Hashable where Vector: Hashable
The result of a convex-line intersection test.
-
Represents the case where the line’s boundaries are completely contained within the bounds of the convex shape.
Declaration
Swift
case contained -
Represents the case where the line crosses the bounds of the convex shape on a single vertex, or tangentially, in case of spheroids.
Declaration
Swift
case singlePoint(LineIntersectionPointNormal<Vector>) -
Represents cases where the line starts outside the shape and crosses in before ending within the shape’s bounds.
Declaration
Swift
case enter(LineIntersectionPointNormal<Vector>) -
Represents cases where the line starts within the convex shape and intersects the boundaries on the way out.
Declaration
Swift
case exit(LineIntersectionPointNormal<Vector>) -
Represents cases where the line crosses the convex shape twice: Once on the way in, and once again on the way out.
Declaration
Swift
case enterExit(LineIntersectionPointNormal<Vector>, LineIntersectionPointNormal<Vector>) -
Represents the case where no intersection occurs at any point.
Declaration
Swift
case noIntersection -
Returns the list of line intersection point normals referenced by this intersection instance.
Declaration
Swift
public var lineIntersectionPointNormals: [LineIntersectionPointNormal<Vector>] { get } -
Returns the list of point normals referenced by this intersection instance.
Declaration
Swift
public var pointNormals: [PointNormal<Vector>] { get } -
Returns a new
ConvexLineIntersectionwhere anyLineIntersectionPointNormalvalue is mapped by a provided closure before being stored back into the same enum case and returned.Declaration
Swift
public func mappingPointNormals( _ mapper: (LineIntersectionPointNormal<Vector>, LineIntersectionPointNormalKind) -> LineIntersectionPointNormal<Vector> ) -> ConvexLineIntersection<Vector> -
Returns a new
ConvexLineIntersectionwhere anyLineIntersectionPointNormalvalue is replaced by a provided closure before being stored back into the same enum case and returned.Declaration
Swift
public func replacingPointNormals<NewVector: VectorType>( _ mapper: (LineIntersectionPointNormal<Vector>, LineIntersectionPointNormalKind) -> LineIntersectionPointNormal<NewVector> ) -> ConvexLineIntersection<NewVector> -
Parameter passed along point normals in
See moremappingPointNormals(_:)andreplacingPointNormals(_:)to specify to the closure which kind of point normal was provided.Declaration
Swift
public enum LineIntersectionPointNormalKind