using System; namespace OpenNest.Engine.BestFit { /// /// Batches directional-distance computations for multiple offset positions. /// GPU implementations can process all offsets in a single kernel launch. /// public interface ISlideComputer : IDisposable { /// /// Computes the first blocking contact distance for each offset position. /// Separating/tangential contacts on closed boundaries do not block. /// /// Flat array [x1,y1,x2,y2, ...] for stationary edges. /// Number of line segments in stationarySegments. /// Flat array [x1,y1,x2,y2, ...] for moving edges at origin. /// Number of line segments in movingTemplateSegments. /// Flat array [dx,dy, dx,dy, ...] of translation offsets. /// Number of offset positions. /// Push direction. /// Array of minimum distances, one per offset position. double[] ComputeBatch( double[] stationarySegments, int stationaryCount, double[] movingTemplateSegments, int movingCount, double[] offsets, int offsetCount, PushDirection direction ); /// /// Computes first blocking contact distances with per-offset directions. /// Uploads segment data once for all offsets, reducing GPU round-trips. /// double[] ComputeBatchMultiDir( double[] stationarySegments, int stationaryCount, double[] movingTemplateSegments, int movingCount, double[] offsets, int offsetCount, int[] directions ); } }