oxiphysics-geometry 0.1.0

Geometric shape types for the OxiPhysics engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! # SdfSmoothIntersection - Trait Implementations
//!
//! This module contains trait implementations for `SdfSmoothIntersection`.
//!
//! ## Implemented Traits
//!
//! - `Sdf`
//!
//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)

use super::functions::*;
use super::types::SdfSmoothIntersection;

impl<A: Sdf, B: Sdf> Sdf for SdfSmoothIntersection<A, B> {
    fn dist(&self, p: [f64; 3]) -> f64 {
        sdf_smooth_intersection(self.a.dist(p), self.b.dist(p), self.k)
    }
}