-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.ComputeSharp.Planar
public static class CreateInheritance System.Object → Create
Calculates the intersection of two 2D lines within a specified tolerance.
public static DiGi.ComputeSharp.Planar.Classes.Line2Intersection Line2Intersection(DiGi.ComputeSharp.Planar.Classes.Line2 line_1, DiGi.ComputeSharp.Planar.Classes.Line2 line_2, double tolerance);line_1 Line2
The first 2D line.
line_2 Line2
The second 2D line.
tolerance System.Double
The numerical tolerance used for geometric comparisons and proximity checks.
Line2Intersection
A Line2Intersection object containing the intersection result, which may be empty, a single point, or a line segment in the case of coincident lines.
Calculates the intersection between a line and a triangle in 2D space based on a specified tolerance.
public static DiGi.ComputeSharp.Planar.Classes.Line2Intersection Line2Intersection(DiGi.ComputeSharp.Planar.Classes.Line2 line, DiGi.ComputeSharp.Planar.Classes.Triangle2 triangle, double tolerance);line Line2
The line to test for intersection.
triangle Triangle2
The triangle to test for intersection.
tolerance System.Double
The tolerance value used for floating-point comparisons and proximity checks.
Line2Intersection
A Line2Intersection object representing the intersection result (e.g., a point, a line segment, or no intersection).
Calculates the intersections between a specified line and a collection of other lines using GPU acceleration.
public static System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Planar.Classes.Line2Intersection>? Line2Intersections(DiGi.ComputeSharp.Planar.Classes.Line2 line, System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Planar.Classes.Line2>? lines, double tolerance);line Line2
The primary line to check for intersections.
lines System.Collections.Generic.IEnumerable<Line2>
The collection of lines to test against the primary line.
tolerance System.Double
The distance tolerance used to determine if two lines are intersecting.
System.Collections.Generic.IEnumerable<Line2Intersection>
A collection of Line2Intersection results, or null if the input line is invalid, the lines collection is empty/null, or the graphics device is unavailable.
Calculates the intersections between a collection of lines and a collection of triangles using GPU acceleration.
public static System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Planar.Classes.Line2Intersection>? Line2Intersections(System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Planar.Classes.Line2>? lines, System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Planar.Classes.Triangle2>? triangles, double tolerance);lines System.Collections.Generic.IEnumerable<Line2>
The collection of lines to test.
triangles System.Collections.Generic.IEnumerable<Triangle2>
The collection of triangles to intersect against.
tolerance System.Double
The distance tolerance used to determine intersections.
System.Collections.Generic.IEnumerable<Line2Intersection>
A collection of Line2Intersection results laid out row-major (row = line index, column = triangle index) with NaN results filtered out, or null if either input collection is null/empty or the graphics device is unavailable.
public static class ModifyInheritance System.Object → Modify
Adds a point to the pair of points defined by two coordinates within the specified tolerance, filling the first free (NaN) slot.
public static bool Add(ref DiGi.ComputeSharp.Planar.Classes.Coordinate2 point_1, ref DiGi.ComputeSharp.Planar.Classes.Coordinate2 point_2, DiGi.ComputeSharp.Planar.Classes.Coordinate2 point, double tolerance);point_1 Coordinate2
The first endpoint of the pair.
point_2 Coordinate2
The second endpoint of the pair.
point Coordinate2
The point to be added.
tolerance System.Double
The tolerance value for the operation.
System.Boolean
True if the point was successfully added; otherwise, false.
Swaps two provided indices if the cross product of the given vectors is negative, or if the first vector is NaN while the second is not.
public static bool SwapIfCrossProductNegative(ref int index_1, ref int index_2, DiGi.ComputeSharp.Planar.Classes.Coordinate2 vector_1, DiGi.ComputeSharp.Planar.Classes.Coordinate2 vector_2);index_1 System.Int32
A reference to the first index to be potentially swapped.
index_2 System.Int32
A reference to the second index to be potentially swapped.
vector_1 Coordinate2
The first coordinate vector used for the cross product calculation.
vector_2 Coordinate2
The second coordinate vector used for the cross product calculation.
System.Boolean
True if the indices were swapped; otherwise, false.
public static class QueryInheritance System.Object → Query
Calculates the centroid of up to six 2D coordinates, ignoring any coordinates that are NaN.
internal static DiGi.ComputeSharp.Planar.Classes.Coordinate2 Centroid(DiGi.ComputeSharp.Planar.Classes.Coordinate2 point_1, DiGi.ComputeSharp.Planar.Classes.Coordinate2 point_2, DiGi.ComputeSharp.Planar.Classes.Coordinate2 point_3, DiGi.ComputeSharp.Planar.Classes.Coordinate2 point_4, DiGi.ComputeSharp.Planar.Classes.Coordinate2 point_5, DiGi.ComputeSharp.Planar.Classes.Coordinate2 point_6);point_1 Coordinate2
The first coordinate.
point_2 Coordinate2
The second coordinate.
point_3 Coordinate2
The third coordinate.
point_4 Coordinate2
The fourth coordinate.
point_5 Coordinate2
The fifth coordinate.
point_6 Coordinate2
The sixth coordinate.
Coordinate2
A new Coordinate2(Coordinate2, Coordinate2, Coordinate2, Coordinate2, Coordinate2, Coordinate2, int) representing the centroid of the valid coordinates.
Query.Coordinate2(Coordinate2, Coordinate2, Coordinate2, Coordinate2, Coordinate2, Coordinate2, int) Method
Selects one of the six 2D coordinates by its index (1-based).
internal static DiGi.ComputeSharp.Planar.Classes.Coordinate2 Coordinate2(ref DiGi.ComputeSharp.Planar.Classes.Coordinate2 coordinate_1, ref DiGi.ComputeSharp.Planar.Classes.Coordinate2 coordinate_2, ref DiGi.ComputeSharp.Planar.Classes.Coordinate2 coordinate_3, ref DiGi.ComputeSharp.Planar.Classes.Coordinate2 coordinate_4, ref DiGi.ComputeSharp.Planar.Classes.Coordinate2 coordinate_5, ref DiGi.ComputeSharp.Planar.Classes.Coordinate2 coordinate_6, int index);coordinate_1 Coordinate2
The first coordinate reference.
coordinate_2 Coordinate2
The second coordinate reference.
coordinate_3 Coordinate2
The third coordinate reference.
coordinate_4 Coordinate2
The fourth coordinate reference.
coordinate_5 Coordinate2
The fifth coordinate reference.
coordinate_6 Coordinate2
The sixth coordinate reference.
index System.Int32
The 1-based index of the coordinate to select.
Coordinate2
The selected Coordinate2(Coordinate2, Coordinate2, Coordinate2, Coordinate2, Coordinate2, Coordinate2, int), or a default coordinate if index is out of bounds.
Determines whether a specified line segment intersects with any triangle in the provided collection.
public static bool Intersect(DiGi.ComputeSharp.Planar.Classes.Line2 line2, System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Planar.Classes.Triangle2>? triangle2s, bool includeStart, bool includeEnd);line2 Line2
The line segment to evaluate for intersection.
triangle2s System.Collections.Generic.IEnumerable<Triangle2>
A collection of triangles to check against the line segment.
includeStart System.Boolean
Indicates whether the start point of the line should be included in the intersection test.
includeEnd System.Boolean
Indicates whether the end point of the line should be included in the intersection test.
System.Boolean
True if an intersection is found; otherwise, false.
Determines whether each line in the provided collection intersects with any of the specified 2D triangles.
public static System.Collections.Generic.List<bool>? Intersect(System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Planar.Classes.Line2>? line2s, System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Planar.Classes.Triangle2>? triangle2s, bool includeStart, bool includeEnd);line2s System.Collections.Generic.IEnumerable<Line2>
The collection of 2D lines to evaluate for intersections.
triangle2s System.Collections.Generic.IEnumerable<Triangle2>
The collection of 2D triangles to test against.
includeStart System.Boolean
If set to true, the start point of the line is included in the intersection calculation.
includeEnd System.Boolean
If set to true, the end point of the line is included in the intersection calculation.
System.Collections.Generic.List<System.Boolean>
A list of boolean values indicating the intersection result for each input line, or null if the input collections are null.
Determines whether a 2D line intersects any of the triangles contained within the specified read-only buffer.
public static bool Intersect(this ComputeSharp.GraphicsDevice graphicDevice, DiGi.ComputeSharp.Planar.Classes.Line2 line2, ComputeSharp.ReadOnlyBuffer<DiGi.ComputeSharp.Planar.Classes.Triangle2> triangle2s, bool includeStart, bool includeEnd);graphicDevice ComputeSharp.GraphicsDevice
The graphics device used to perform the intersection calculation.
line2 Line2
The 2D line to test for intersection.
triangle2s ComputeSharp.ReadOnlyBuffer<Triangle2>
A read-only buffer containing the triangles to be tested against the line.
includeStart System.Boolean
If set to true, includes the start point of the line in the intersection test.
includeEnd System.Boolean
If set to true, includes the end point of the line in the intersection test.
System.Boolean
True if an intersection is found; otherwise, false.
Query.Intersect(this GraphicsDevice, IEnumerable<Line2>, ReadOnlyBuffer<Triangle2>, bool, bool) Method
Performs an intersection test between a collection of 2D lines and a buffer of 2D triangles using the specified graphics device.
public static System.Collections.Generic.List<bool>? Intersect(this ComputeSharp.GraphicsDevice? graphicDevice, System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Planar.Classes.Line2>? line2s, ComputeSharp.ReadOnlyBuffer<DiGi.ComputeSharp.Planar.Classes.Triangle2>? triangle2s, bool includeStart, bool includeEnd);graphicDevice ComputeSharp.GraphicsDevice
The graphics device used to perform the intersection calculations.
line2s System.Collections.Generic.IEnumerable<Line2>
An enumerable collection of 2D lines to be tested for intersections.
triangle2s ComputeSharp.ReadOnlyBuffer<Triangle2>
A read-only buffer containing the 2D triangles to test against.
includeStart System.Boolean
If set to true, includes the start point of each line in the intersection check.
includeEnd System.Boolean
If set to true, includes the end point of each line in the intersection check.
System.Collections.Generic.List<System.Boolean>
A list of boolean values indicating whether each corresponding line intersects any triangle, or null if the operation failed.