Skip to content

DiGi.ComputeSharp.Geometry.Spatial

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.ComputeSharp.Geometry.Spatial Namespace

Classes

Convert Class

public static class Convert

Inheritance System.Object → Convert

Methods

Convert.ToComputeSharp(this Mesh3D, bool) Method

Converts a Mesh3D instance into a list of ComputeSharp Triangle3 structures.

public static System.Collections.Generic.List<DiGi.ComputeSharp.Spatial.Classes.Triangle3>? ToComputeSharp(this DiGi.Geometry.Spatial.Classes.Mesh3D? mesh3D, bool solid);

Parameters

mesh3D DiGi.Geometry.Spatial.Classes.Mesh3D

The source mesh to be converted.

solid System.Boolean

A flag indicating whether the conversion should treat the mesh as a solid volume.

Returns

System.Collections.Generic.List<DiGi.ComputeSharp.Spatial.Classes.Triangle3>
A list of Triangle3 objects representing the mesh, or null if the input mesh is null.

Convert.ToComputeSharp(this Point3D) Method

Converts a DiGi.Geometry.Spatial.Classes.Point3D to a DiGi.ComputeSharp.Spatial.Classes.Coordinate3.

public static DiGi.ComputeSharp.Spatial.Classes.Coordinate3 ToComputeSharp(this DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D DiGi.Geometry.Spatial.Classes.Point3D

The point to convert.

Returns

DiGi.ComputeSharp.Spatial.Classes.Coordinate3
The equivalent DiGi.ComputeSharp.Spatial.Classes.Coordinate3, or a default instance if the input is null.

Convert.ToComputeSharp(this Triangle3D, bool) Method

Converts a DiGi.Geometry.Spatial.Classes.Triangle3D instance to a ComputeSharp DiGi.ComputeSharp.Spatial.Classes.Triangle3.

public static DiGi.ComputeSharp.Spatial.Classes.Triangle3 ToComputeSharp(this DiGi.Geometry.Spatial.Classes.Triangle3D triangle3D, bool solid);

Parameters

triangle3D DiGi.Geometry.Spatial.Classes.Triangle3D

The source triangle to convert.

solid System.Boolean

Indicates whether the resulting triangle should be treated as solid.

Returns

DiGi.ComputeSharp.Spatial.Classes.Triangle3
A new DiGi.ComputeSharp.Spatial.Classes.Triangle3 instance representing the converted geometry.

Convert.ToComputeSharp(this Vector3D) Method

Converts a DiGi.Geometry.Spatial.Classes.Vector3D to a DiGi.ComputeSharp.Spatial.Classes.Coordinate3.

public static DiGi.ComputeSharp.Spatial.Classes.Coordinate3 ToComputeSharp(this DiGi.Geometry.Spatial.Classes.Vector3D? vetcor3D);

Parameters

vetcor3D DiGi.Geometry.Spatial.Classes.Vector3D

The vector to convert.

Returns

DiGi.ComputeSharp.Spatial.Classes.Coordinate3
The equivalent DiGi.ComputeSharp.Spatial.Classes.Coordinate3, or a default instance if the input is null.

Convert.ToComputeSharp(this IEnumerable<Triangle3D>, bool) Method

Converts a collection of DiGi.Geometry.Spatial.Classes.Triangle3D elements to a list of ComputeSharp DiGi.ComputeSharp.Spatial.Classes.Triangle3 elements.

public static System.Collections.Generic.List<DiGi.ComputeSharp.Spatial.Classes.Triangle3>? ToComputeSharp(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Triangle3D>? triangle3Ds, bool solid);

Parameters

triangle3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Triangle3D>

The source enumerable of DiGi.Geometry.Spatial.Classes.Triangle3D objects to convert.

solid System.Boolean

A flag indicating whether the conversion should treat the geometry as solid.

Returns

System.Collections.Generic.List<DiGi.ComputeSharp.Spatial.Classes.Triangle3>
A list of ComputeSharp DiGi.ComputeSharp.Spatial.Classes.Triangle3 objects, or null if the input collection is null.

Convert.ToDiGi(this IEnumerable<Triangle3>, double) Method

Converts a collection of Triangle3 objects into a Mesh3D object.

public static DiGi.Geometry.Spatial.Classes.Mesh3D? ToDiGi(this System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Spatial.Classes.Triangle3> triangle3s, double tolerance=1E-06);

Parameters

triangle3s System.Collections.Generic.IEnumerable<DiGi.ComputeSharp.Spatial.Classes.Triangle3>

The collection of triangles to be converted.

tolerance System.Double

The distance tolerance used for vertex merging or processing.

Returns

DiGi.Geometry.Spatial.Classes.Mesh3D
A Mesh3D instance if the conversion is successful; otherwise, null.

Convert.ToDiGi(this Nullable<Coordinate3>) Method

Converts a Coordinate3 instance to a Point3D instance.

public static DiGi.Geometry.Spatial.Classes.Point3D? ToDiGi(this System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Coordinate3> coordinate3);

Parameters

coordinate3 System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Coordinate3>

The source Coordinate3 object to convert.

Returns

DiGi.Geometry.Spatial.Classes.Point3D
A Point3D representation of the coordinate, or null if the input is null.

Convert.ToDiGi(this Nullable<Line3>) Method

Converts a DiGi.ComputeSharp.Spatial.Classes.Line3 instance to a DiGi.Geometry.Spatial.Classes.Segment3D instance.

public static DiGi.Geometry.Spatial.Classes.Segment3D? ToDiGi(this System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Line3> line3);

Parameters

line3 System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Line3>

The DiGi.ComputeSharp.Spatial.Classes.Line3 object to convert.

Returns

DiGi.Geometry.Spatial.Classes.Segment3D
A DiGi.Geometry.Spatial.Classes.Segment3D representation of the line, or null if the input is null.

Convert.ToDiGi(this Nullable<Triangle3>) Method

Converts a DiGi.ComputeSharp.Spatial.Classes.Triangle3 instance to a DiGi.Geometry.Spatial.Classes.Triangle3D instance.

public static DiGi.Geometry.Spatial.Classes.Triangle3D? ToDiGi(this System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Triangle3> triangle3);

Parameters

triangle3 System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Triangle3>

The source DiGi.ComputeSharp.Spatial.Classes.Triangle3 object to convert.

Returns

DiGi.Geometry.Spatial.Classes.Triangle3D
A DiGi.Geometry.Spatial.Classes.Triangle3D representation of the input triangle, or null if the input is null.

Convert.ToDiGi_Line3D(this Nullable<Line3>) Method

Converts a DiGi.ComputeSharp.Spatial.Classes.Line3 instance to a DiGi.Geometry.Spatial.Classes.Line3D instance.

public static DiGi.Geometry.Spatial.Classes.Line3D? ToDiGi_Line3D(this System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Line3> line3);

Parameters

line3 System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Line3>

The source DiGi.ComputeSharp.Spatial.Classes.Line3 instance to convert.

Returns

DiGi.Geometry.Spatial.Classes.Line3D
A DiGi.Geometry.Spatial.Classes.Line3D instance if the conversion is successful; otherwise, null.

Convert.ToDiGi_Vector3D(this Nullable<Coordinate3>) Method

Converts a DiGi.ComputeSharp.Spatial.Classes.Coordinate3 instance to a DiGi.Geometry.Spatial.Classes.Vector3D instance.

public static DiGi.Geometry.Spatial.Classes.Vector3D? ToDiGi_Vector3D(this System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Coordinate3> coordinate3);

Parameters

coordinate3 System.Nullable<DiGi.ComputeSharp.Spatial.Classes.Coordinate3>

The source coordinate to convert.

Returns

DiGi.Geometry.Spatial.Classes.Vector3D
A DiGi.Geometry.Spatial.Classes.Vector3D representation of the coordinate, or null if the input is null.

Create Class

public static class Create

Inheritance System.Object → Create

Methods

Create.IntersectionResult3D(this Mesh3D, IEnumerable<Mesh3D>, bool, double) Method

Calculates the 3D intersection between a source mesh and a collection of other meshes.

public static DiGi.Geometry.Spatial.Classes.IntersectionResult3D? IntersectionResult3D(this DiGi.Geometry.Spatial.Classes.Mesh3D? mesh3D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Mesh3D>? mesh3Ds, bool solid, double tolerance=1E-06);

Parameters

mesh3D DiGi.Geometry.Spatial.Classes.Mesh3D

The source mesh to evaluate.

mesh3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Mesh3D>

The collection of meshes to intersect with the source mesh.

solid System.Boolean

A boolean value indicating whether to perform a solid intersection operation.

tolerance System.Double

The distance tolerance for the intersection calculation.

Returns

DiGi.Geometry.Spatial.Classes.IntersectionResult3D
An IntersectionResult3D(this Mesh3D, IEnumerable<Mesh3D>, bool, double) containing the result of the intersection, or null if no valid intersection is found.

Create.IntersectionResult3D_CPU(this Mesh3D, IEnumerable<Mesh3D>, bool, double) Method

Computes the 3D intersection between a source mesh and a collection of other meshes using CPU processing.

public static DiGi.Geometry.Spatial.Classes.IntersectionResult3D? IntersectionResult3D_CPU(this DiGi.Geometry.Spatial.Classes.Mesh3D? mesh3D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Mesh3D>? mesh3Ds, bool solid, double tolerance=1E-06);

Parameters

mesh3D DiGi.Geometry.Spatial.Classes.Mesh3D

The source mesh to evaluate for intersections.

mesh3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Mesh3D>

The collection of target meshes to intersect with the source mesh.

solid System.Boolean

Specifies whether to perform a solid intersection (volumetric) or a surface-based intersection.

tolerance System.Double

The distance tolerance used for numerical precision during the intersection calculation.

Returns

DiGi.Geometry.Spatial.Classes.IntersectionResult3D
An IntersectionResult3D(this Mesh3D, IEnumerable<Mesh3D>, bool, double) containing the intersection data if successful; otherwise, null.

Query Class

public static class Query

Inheritance System.Object → Query

Methods

Query.Shading(this IEnumerable<IPolygonalFace3D>, Vector3D, double) Method

Performs a shading analysis on a collection of polygonal faces based on a specified direction and tolerance.

public static System.Collections.Generic.List<System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.PolygonalFace3D>?>? Shading(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>? polygonalFace3Ds, DiGi.Geometry.Spatial.Classes.Vector3D? direction, double tolerance);

Parameters

polygonalFace3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

The collection of polygonal faces to be analyzed for shading.

direction DiGi.Geometry.Spatial.Classes.Vector3D

The vector representing the light source or projection direction.

tolerance System.Double

The precision tolerance used for geometric calculations.

Returns

System.Collections.Generic.List<System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.PolygonalFace3D>>
A list containing groups of shaded polygonal faces, or null if the input collection is null.

Query.Shading_CPU(this IEnumerable<IPolygonalFace3D>, Vector3D, double) Method

Calculates shading for a collection of polygonal faces based on a specified direction and tolerance using CPU processing.

public static System.Collections.Generic.List<System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.PolygonalFace3D>?>? Shading_CPU(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>? polygonalFace3Ds, DiGi.Geometry.Spatial.Classes.Vector3D? direction, double tolerance);

Parameters

polygonalFace3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

The collection of polygonal faces to be processed.

direction DiGi.Geometry.Spatial.Classes.Vector3D

The vector representing the light or view direction used for shading calculations.

tolerance System.Double

The precision tolerance used for geometric comparisons.

Returns

System.Collections.Generic.List<System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.PolygonalFace3D>>
A nested list of shaded polygonal faces, or null if the operation cannot be completed.

Clone this wiki locally