Skip to main content

oxiphysics_geometry/implicit_geometry/
sdfdifference_traits.rs

1//! # SdfDifference - Trait Implementations
2//!
3//! This module contains trait implementations for `SdfDifference`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Sdf`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11#[allow(unused_imports)]
12use super::functions::*;
13#[allow(unused_imports)]
14use super::functions::*;
15use super::types::SdfDifference;
16
17impl<A: Sdf, B: Sdf> Sdf for SdfDifference<A, B> {
18    fn dist(&self, p: [f64; 3]) -> f64 {
19        self.a.dist(p).max(-self.b.dist(p))
20    }
21}