MCPcopy Create free account
hub / github.com/Notgnoshi/generative / SnappingStrategy

Enum SnappingStrategy

generative/snap.rs:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14#[derive(Debug, Clone, Copy, PartialEq)]
15pub enum SnappingStrategy {
16 /// Snap to the closest point, modifying the point cloud as the algorithm progresses
17 ///
18 /// Sensitive to the order in which snapping is performed
19 // TODO: There could be lots of possible strategies. During the implementation, I experimented
20 // with ClosestInputPoint and ClosestOutputPoint variants, but it got complex enough that I
21 // abandoned them. Thinking I could make prune_duplicate_nodes() generic over the different
22 // strategies was incorrect.
23 ClosestPoint(f64),
24 /// Snap points to a regular grid, instead of themselves
25 RegularGrid(f64),
26}
27
28pub fn snap_geoms(
29 geoms: impl Iterator<Item = Geometry>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected