Click or drag to resize

LineTools Class

Collection of helper methods for misc collisions. Does float tolerance and line collisions with lines and AABBs.
Inheritance Hierarchy
SystemObject
  Internal.tainicom.Aether.Physics2D.CommonLineTools

Namespace:  Internal.tainicom.Aether.Physics2D.Common
Assembly:  NeoAxis.Core (in NeoAxis.Core.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax
C#
public static class LineTools

The LineTools type exposes the following members.

Methods
  NameDescription
Public methodStatic memberDistanceBetweenPointAndLineSegment
Public methodStatic memberLineIntersect(Vector2, Vector2, Vector2, Vector2)
Public methodStatic memberLineIntersect(Vector2, Vector2, Vector2, Vector2, Vector2)
This method detects if two line segments intersect, and, if so, the point of intersection. Note: If two line segments are coincident, then no intersection is detected (there are actually infinite intersection points).
Public methodStatic memberLineIntersect(Vector2, Vector2, Vector2, Vector2, Vector2)
This method detects if two line segments intersect, and, if so, the point of intersection. Note: If two line segments are coincident, then no intersection is detected (there are actually infinite intersection points).
Public methodStatic memberLineIntersect(Vector2, Vector2, Vector2, Vector2, Boolean, Boolean, Vector2)
This method detects if two line segments (or lines) intersect, and, if so, the point of intersection. Use the firstIsSegment and secondIsSegment parameters to set whether the intersection point must be on the first and second line segments. Setting these both to true means you are doing a line-segment to line-segment intersection. Setting one of them to true means you are doing a line to line-segment intersection test, and so on. Note: If two line segments are coincident, then no intersection is detected (there are actually infinite intersection points). Author: Jeremy Bell
Public methodStatic memberLineIntersect(Vector2, Vector2, Vector2, Vector2, Boolean, Boolean, Vector2)
This method detects if two line segments (or lines) intersect, and, if so, the point of intersection. Use the firstIsSegment and secondIsSegment parameters to set whether the intersection point must be on the first and second line segments. Setting these both to true means you are doing a line-segment to line-segment intersection. Setting one of them to true means you are doing a line to line-segment intersection test, and so on. Note: If two line segments are coincident, then no intersection is detected (there are actually infinite intersection points). Author: Jeremy Bell
Public methodStatic memberLineIntersect2
Check if the lines a0->a1 and b0->b1 cross. If they do, intersectionPoint will be filled with the point of crossing. Grazing lines should not return true.
Public methodStatic memberLineSegmentAABBIntersect
Get all intersections between a line segment and an AABB.
Public methodStatic memberLineSegmentVerticesIntersect
Get all intersections between a line segment and a list of vertices representing a polygon. The vertices reuse adjacent points, so for example edges one and two are between the first and second vertices and between the second and third vertices. The last edge is between vertex vertices.Count - 1 and verts0. (ie, vertices from a Geometry or AABB)
Top
See Also