pub struct ClashSession { /* private fields */ }Expand description
A clash session: stores per-element geometry, element AABBs, and caches the per-element triangle BVHs that the narrow phase needs.
Implementations§
Source§impl ClashSession
impl ClashSession
pub fn new() -> Self
Sourcepub fn ingest(
&mut self,
positions: &[f32],
pos_ranges: &[u32],
indices: &[u32],
idx_ranges: &[u32],
aabbs: &[f32],
)
pub fn ingest( &mut self, positions: &[f32], pos_ranges: &[u32], indices: &[u32], idx_ranges: &[u32], aabbs: &[f32], )
Ingest N elements from flat arenas.
positions: concatenated per-element vertex coords (x, y, z, ...).pos_ranges: 2 per element =[float_offset, float_len].indices: concatenated per-element LOCAL (0-based within that element’s vertices) triangle indices.idx_ranges: 2 per element =[idx_offset, idx_len].aabbs: 6 per element =[minx, miny, minz, maxx, maxy, maxz].
Vertex/AABB coords are f32-sourced; they are stored and computed in
f64.
Sourcepub fn run_rule(
&self,
group_a: &[u32],
group_b: &[u32],
mode: u8,
tolerance: f64,
clearance: f64,
report_touch: bool,
) -> RuleResult
pub fn run_rule( &self, group_a: &[u32], group_b: &[u32], mode: u8, tolerance: f64, clearance: f64, report_touch: bool, ) -> RuleResult
Run one rule.
group_a / group_b are GLOBAL element indices. An empty group_b
requests a self-clash within group_a (pairs with i < j by position
in group_a). mode: 0 = hard, 1 = clearance. Records carry GLOBAL
element indices.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ClashSession
impl !Sync for ClashSession
impl Freeze for ClashSession
impl Send for ClashSession
impl Unpin for ClashSession
impl UnsafeUnpin for ClashSession
impl UnwindSafe for ClashSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more