DOTS Geometry
 
Loading...
Searching...
No Matches
LineIntersection Class Reference

Static Public Member Functions

static JobHandle FindLineSegmentIntersectionsCombinatorial (NativeList< LineSegment2D > segments, ref NativeList< float2 > intersections, JobHandle dependsOn=default)
 Detects all intersections between line segments in a combinatorical way i. e. each segment is checked against all other segments (which is O(nē))
 
static JobHandle FindLineSegmentIntersectionsCombinatorialParallel (NativeList< LineSegment2D > segments, ref NativeList< float2 > intersections, JobHandle dependsOn=default)
 Detects all intersections between line segments in a combinatorical way i. e. each segment is checked against all other segments (which is O(nē)) The checks are done in parallel.
 
static JobHandle FindLineSegmentIntersectionsSweep (NativeList< LineSegment2D > segments, ref NativeList< float2 > intersections, bool restartOnPrecisionErrors=true, float epsilon=10e-4f, JobHandle dependsOn=default)
 Detects all intersections between line segments using an output-dependent sweepline algorithm. In theory this is faster than using the combinatorical version, but in practice this only happens after having several thousand line segments. And only if the floating-precision errors are tame (so as to have as few O(n)-restarts as possible). Use with caution.
 
static JobHandle FindLSPlaneIntersectionsCombinatorialParallel (Plane intersectionPlane, NativeList< LineSegment3D > segments, ref NativeList< float3 > intersections, float epsilon=10e-6f, JobHandle dependsOn=default)
 Detects all intersections between line segments and a plane in a combinatorical way i. e. each segment is checked against the plane (which is O(n)) The checks are done in parallel.
 

Member Function Documentation

◆ FindLineSegmentIntersectionsCombinatorial()

static JobHandle FindLineSegmentIntersectionsCombinatorial ( NativeList< LineSegment2D > segments,
ref NativeList< float2 > intersections,
JobHandle dependsOn = default )
static

Detects all intersections between line segments in a combinatorical way i. e. each segment is checked against all other segments (which is O(nē))

Parameters
segments
intersections
dependsOn
Returns

◆ FindLineSegmentIntersectionsCombinatorialParallel()

static JobHandle FindLineSegmentIntersectionsCombinatorialParallel ( NativeList< LineSegment2D > segments,
ref NativeList< float2 > intersections,
JobHandle dependsOn = default )
static

Detects all intersections between line segments in a combinatorical way i. e. each segment is checked against all other segments (which is O(nē)) The checks are done in parallel.

Parameters
segments
intersections
dependsOn
Returns

◆ FindLineSegmentIntersectionsSweep()

static JobHandle FindLineSegmentIntersectionsSweep ( NativeList< LineSegment2D > segments,
ref NativeList< float2 > intersections,
bool restartOnPrecisionErrors = true,
float epsilon = 10e-4f,
JobHandle dependsOn = default )
static

Detects all intersections between line segments using an output-dependent sweepline algorithm. In theory this is faster than using the combinatorical version, but in practice this only happens after having several thousand line segments. And only if the floating-precision errors are tame (so as to have as few O(n)-restarts as possible). Use with caution.

Parameters
segments
intersections
restartOnPrecisionErrorsRestarts (an O(n)-operation) the algorithm status after a precision error has been detected
epsilonChoose this value to be smaller than the order of magnitude of the line segments
dependsOn
Returns

◆ FindLSPlaneIntersectionsCombinatorialParallel()

static JobHandle FindLSPlaneIntersectionsCombinatorialParallel ( Plane intersectionPlane,
NativeList< LineSegment3D > segments,
ref NativeList< float3 > intersections,
float epsilon = 10e-6f,
JobHandle dependsOn = default )
static

Detects all intersections between line segments and a plane in a combinatorical way i. e. each segment is checked against the plane (which is O(n)) The checks are done in parallel.

Parameters
intersectionPlane
segments
intersections
dependsOn
Returns