Skip to content

DiGi.ComputeSharp.Spatial.Classes

github-actions[bot] edited this page Jul 1, 2026 · 3 revisions

DiGi.ComputeSharp.Spatial.Classes Namespace

Structs

Line3Intersection Struct

Represents the result of an intersection operation in 3D space, which can be a single point, two points, or a line segment.

public readonly struct Line3Intersection : DiGi.ComputeSharp.Spatial.Interfaces.IIntersection3, DiGi.ComputeSharp.Core.Interfaces.IIntersection, DiGi.ComputeSharp.Core.Interfaces.IResult

Implements DiGi.ComputeSharp.Spatial.Interfaces.IIntersection3, IIntersection, IResult

Constructors

Line3Intersection() Constructor

Initializes a new instance of the Line3Intersection struct with default values.

public Line3Intersection();

Line3Intersection(Bool, Coordinate3) Constructor

Initializes a new instance of the Line3Intersection struct with specified solidity and the first point.

public Line3Intersection(DiGi.ComputeSharp.Core.Classes.Bool solid, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_1);

Parameters

solid Bool

The solidity flag for the intersection.

point_1 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The first coordinate point.

Line3Intersection(Bool, Coordinate3, Coordinate3) Constructor

Initializes a new instance of the Line3Intersection struct with specified solidity and two coordinate points.

public Line3Intersection(DiGi.ComputeSharp.Core.Classes.Bool solid, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_1, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_2);

Parameters

solid Bool

The solidity flag for the intersection.

point_1 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The first coordinate point.

point_2 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The second coordinate point.

Line3Intersection(Coordinate3) Constructor

Initializes a new instance of the Line3Intersection struct with the first point.

public Line3Intersection(DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_1);

Parameters

point_1 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The first coordinate point.

Line3Intersection(Coordinate3, Coordinate3) Constructor

Initializes a new instance of the Line3Intersection struct with two coordinate points.

public Line3Intersection(DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_1, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_2);

Parameters

point_1 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The first coordinate point.

point_2 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The second coordinate point.

Line3Intersection(Line3) Constructor

Initializes a new instance of the Line3Intersection struct from an existing line.

public Line3Intersection(DiGi.ComputeSharp.Spatial.Classes.Line3 line);

Parameters

line DiGi.ComputeSharp.Spatial.Classes.Line3

The line to use for initialization.

Fields

Line3Intersection.Point_1 Field

The first coordinate point of the intersection.

public readonly Coordinate3 Point_1;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Coordinate3

Line3Intersection.Point_2 Field

The second coordinate point of the intersection, used when the result is a line segment.

public readonly Coordinate3 Point_2;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Coordinate3

Line3Intersection.Solid Field

Indicates whether the intersection result is a solid line segment rather than discrete points.

public readonly Bool Solid;

Field Value

Bool

Methods

Line3Intersection.GetIntersectionGeometries(Nullable<bool>) Method

Retrieves the geometries resulting from the intersection, optionally overriding the solidity of the result.

public DiGi.ComputeSharp.Spatial.Interfaces.IGeometry3[]? GetIntersectionGeometries(System.Nullable<bool> solid=null);

Parameters

solid System.Nullable<System.Boolean>

An optional override for whether the result should be treated as a solid geometry.

Implements GetIntersectionGeometries(Nullable<bool>)

Returns

DiGi.ComputeSharp.Spatial.Interfaces.IGeometry3[]
An array of DiGi.ComputeSharp.Spatial.Interfaces.IGeometry3 objects representing the intersection, or null if the primary point is NaN.

Line3Intersection.GetLine() Method

Converts the intersection result into a line segment if it is marked as solid and contains valid points.

public DiGi.ComputeSharp.Spatial.Classes.Line3 GetLine();

Returns

DiGi.ComputeSharp.Spatial.Classes.Line3
A DiGi.ComputeSharp.Spatial.Classes.Line3 representing the intersection line, or an empty line if not applicable.

Line3Intersection.IsNaN() Method

Determines whether the intersection result is Not-a-Number (NaN).

public bool IsNaN();

Returns

System.Boolean
True if the first point is NaN; otherwise, false.

Triangle3Intersection Struct

Represents a 3D triangle intersection result containing up to six coordinates and a solidity flag.

public struct Triangle3Intersection : DiGi.ComputeSharp.Spatial.Interfaces.IIntersection3, DiGi.ComputeSharp.Core.Interfaces.IIntersection, DiGi.ComputeSharp.Core.Interfaces.IResult

Implements DiGi.ComputeSharp.Spatial.Interfaces.IIntersection3, IIntersection, IResult

Constructors

Triangle3Intersection() Constructor

Initializes a new instance of the Triangle3Intersection struct with default values.

public Triangle3Intersection();

Triangle3Intersection(Bool, Coordinate3) Constructor

Initializes a new instance of the Triangle3Intersection struct with a solidity flag and one point.

public Triangle3Intersection(DiGi.ComputeSharp.Core.Classes.Bool solid, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_1);

Parameters

solid Bool

Whether the geometry is solid.

point_1 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The first coordinate.

Triangle3Intersection(Bool, Coordinate3, Coordinate3) Constructor

Initializes a new instance of the Triangle3Intersection struct with a solidity flag and two points.

public Triangle3Intersection(DiGi.ComputeSharp.Core.Classes.Bool solid, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_1, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_2);

Parameters

solid Bool

Whether the geometry is solid.

point_1 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The first coordinate.

point_2 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The second coordinate.

Triangle3Intersection(Bool, Coordinate3, Coordinate3, Coordinate3) Constructor

Initializes a new instance of the Triangle3Intersection struct with a solidity flag and three points.

public Triangle3Intersection(DiGi.ComputeSharp.Core.Classes.Bool solid, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_1, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_2, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_3);

Parameters

solid Bool

Whether the geometry is solid.

point_1 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The first coordinate.

point_2 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The second coordinate.

point_3 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The third coordinate.

Triangle3Intersection(Bool, Coordinate3, Coordinate3, Coordinate3, Coordinate3, Coordinate3, Coordinate3) Constructor

Initializes a new instance of the Triangle3Intersection struct with a solidity flag and six points.

public Triangle3Intersection(DiGi.ComputeSharp.Core.Classes.Bool solid, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_1, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_2, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_3, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_4, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_5, DiGi.ComputeSharp.Spatial.Classes.Coordinate3 point_6);

Parameters

solid Bool

Whether the geometry is solid.

point_1 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The first coordinate.

point_2 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The second coordinate.

point_3 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The third coordinate.

point_4 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The fourth coordinate.

point_5 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The fifth coordinate.

point_6 DiGi.ComputeSharp.Spatial.Classes.Coordinate3

The sixth coordinate.

Triangle3Intersection(Line3) Constructor

Initializes a new instance of the Triangle3Intersection struct from a DiGi.ComputeSharp.Spatial.Classes.Line3.

public Triangle3Intersection(DiGi.ComputeSharp.Spatial.Classes.Line3 line);

Parameters

line DiGi.ComputeSharp.Spatial.Classes.Line3

The line used to initialize the intersection points.

Triangle3Intersection(Line3Intersection) Constructor

Initializes a new instance of the Triangle3Intersection struct from a Line3Intersection.

public Triangle3Intersection(DiGi.ComputeSharp.Spatial.Classes.Line3Intersection line3Intersection);

Parameters

line3Intersection Line3Intersection

The line intersection to convert from.

Fields

Triangle3Intersection.Point_1 Field

The first coordinate of the intersection.

public readonly Coordinate3 Point_1;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Coordinate3

Triangle3Intersection.Point_2 Field

The second coordinate of the intersection.

public readonly Coordinate3 Point_2;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Coordinate3

Triangle3Intersection.Point_3 Field

The third coordinate of the intersection.

public readonly Coordinate3 Point_3;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Coordinate3

Triangle3Intersection.Point_4 Field

The fourth coordinate of the intersection.

public readonly Coordinate3 Point_4;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Coordinate3

Triangle3Intersection.Point_5 Field

The fifth coordinate of the intersection.

public readonly Coordinate3 Point_5;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Coordinate3

Triangle3Intersection.Point_6 Field

The sixth coordinate of the intersection.

public readonly Coordinate3 Point_6;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Coordinate3

Triangle3Intersection.Solid Field

Indicates whether the intersection is considered a solid geometry.

public readonly Bool Solid;

Field Value

Bool

Methods

Triangle3Intersection.GetIntersectionGeometries(Nullable<bool>) Method

Retrieves the intersection geometries based on the available points and solidity.

public DiGi.ComputeSharp.Spatial.Interfaces.IGeometry3[]? GetIntersectionGeometries(System.Nullable<bool> solid=null);

Parameters

solid System.Nullable<System.Boolean>

Optional override for the solidity flag.

Implements GetIntersectionGeometries(Nullable<bool>)

Returns

DiGi.ComputeSharp.Spatial.Interfaces.IGeometry3[]
An array of 3D geometries, or null if no valid points exist.

Triangle3Intersection.IsNaN() Method

Determines whether the intersection is not a number (NaN), indicating it is invalid or empty.

public bool IsNaN();

Returns

System.Boolean
True if the first point is NaN; otherwise, false.

Triangulation3 Struct

Represents a 3D triangulation consisting of up to five triangles.

public readonly struct Triangulation3

Constructors

Triangulation3() Constructor

Initializes a new instance of the Triangulation3 struct with default values.

public Triangulation3();

Triangulation3(Triangle3) Constructor

Initializes a new instance of the Triangulation3 struct with one specified triangle.

public Triangulation3(DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3);

Parameters

triangle3 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The first triangle to assign.

Triangulation3(Triangle3, Triangle3) Constructor

Initializes a new instance of the Triangulation3 struct with two specified triangles.

public Triangulation3(DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_1, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_2);

Parameters

triangle3_1 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The first triangle to assign.

triangle3_2 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The second triangle to assign.

Triangulation3(Triangle3, Triangle3, Triangle3) Constructor

Initializes a new instance of the Triangulation3 struct with three specified triangles.

public Triangulation3(DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_1, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_2, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_3);

Parameters

triangle3_1 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The first triangle to assign.

triangle3_2 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The second triangle to assign.

triangle3_3 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The third triangle to assign.

Triangulation3(Triangle3, Triangle3, Triangle3, Triangle3) Constructor

Initializes a new instance of the Triangulation3 struct with four specified triangles.

public Triangulation3(DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_1, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_2, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_3, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_4);

Parameters

triangle3_1 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The first triangle to assign.

triangle3_2 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The second triangle to assign.

triangle3_3 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The third triangle to assign.

triangle3_4 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The fourth triangle to assign.

Triangulation3(Triangle3, Triangle3, Triangle3, Triangle3, Triangle3) Constructor

Initializes a new instance of the Triangulation3 struct with five specified triangles.

public Triangulation3(DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_1, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_2, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_3, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_4, DiGi.ComputeSharp.Spatial.Classes.Triangle3 triangle3_5);

Parameters

triangle3_1 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The first triangle to assign.

triangle3_2 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The second triangle to assign.

triangle3_3 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The third triangle to assign.

triangle3_4 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The fourth triangle to assign.

triangle3_5 DiGi.ComputeSharp.Spatial.Classes.Triangle3

The fifth triangle to assign.

Fields

Triangulation3.triangle_1 Field

The first triangle in the triangulation.

public readonly Triangle3 triangle_1;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Triangle3

Triangulation3.triangle_2 Field

The second triangle in the triangulation.

public readonly Triangle3 triangle_2;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Triangle3

Triangulation3.triangle_3 Field

The third triangle in the triangulation.

public readonly Triangle3 triangle_3;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Triangle3

Triangulation3.triangle_4 Field

The fourth triangle in the triangulation.

public readonly Triangle3 triangle_4;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Triangle3

Triangulation3.triangle_5 Field

The fifth triangle in the triangulation.

public readonly Triangle3 triangle_5;

Field Value

DiGi.ComputeSharp.Spatial.Classes.Triangle3

Methods

Triangulation3.IsNaN() Method

Checks if the triangulation contains NaN values by evaluating the first triangle.

public bool IsNaN();

Returns

System.Boolean
True if the first triangle is NaN; otherwise, false.

Clone this wiki locally