Skip to main content

oxiphysics_geometry/implicit_geometry/
sdftranslate_traits.rs

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