Skip to main content

Crate ifc_lite_clash

Crate ifc_lite_clash 

Source
Expand description

§IFC-Lite Clash

High-performance geometry kernel for clash detection. This is a faithful native port of the TypeScript reference engine in packages/clash: the same AABB/vector math, triangle-triangle intersection (SAT) and minimum-distance routines, per-element triangle BVHs, broad-phase candidate generation, and — crucially — the exact narrow-phase classification.

All geometric computation is performed in f64, even though vertices and AABBs are sourced from f32 buffers.

§Usage

use ifc_lite_clash::ClashSession;

let mut session = ClashSession::new();
// positions: concatenated per-element vertex coords (x, y, z, ...)
// pos_ranges: [float_offset, float_len] per element
// indices: concatenated per-element LOCAL triangle indices
// idx_ranges: [idx_offset, idx_len] per element
// aabbs: [minx, miny, minz, maxx, maxy, maxz] per element
session.ingest(&[], &[], &[], &[], &[]);
let result = session.run_rule(&[], &[], 0, 0.0, 0.0, false);
assert!(result.records.is_empty());

Structs§

Aabb
An axis-aligned bounding box with explicit min/max corners.
ClashRecord
One classified clash between two elements (GLOBAL element indices).
ClashSession
A clash session: stores per-element geometry, element AABBs, and caches the per-element triangle BVHs that the narrow phase needs.
RuleResult
The records produced by a single rule run.

Enums§

ClashStatus
Clash classification. Discriminants match the public ABI (Hard = 0, etc.).