rscad_core/boolean/
difference.rs1use crate::prelude_::*;
2#[derive(Clone, Copy, Debug)]
3#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4#[cfg_attr(feature = "reflect", derive(bevy_reflect::Reflect))]
5pub struct Difference<This, Other> {
6 pub this: This,
7 pub other: Other,
8}
9
10pub trait DifferenceObject: Object + Sized {
11 fn difference<Other: Object>(self, other: Other) -> Difference<Self, Other> {
12 Difference { this: self, other }
13 }
14}
15
16impl<T> DifferenceObject for T where T: Object {}
17impl<T: Object, O: Object> Object for Difference<T, O> {}