rscad_core/boolean/
intersection.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 Intersection<This, Other> {
6 pub this: This,
7 pub other: Other,
8}
9
10pub trait IntersectionObject: Object + Sized {
11 fn intersection<Other: Object>(self, other: Other) -> Intersection<Self, Other> {
12 Intersection { this: self, other }
13 }
14}
15
16impl<T> IntersectionObject for T where T: Object {}
17
18impl<T: Object, O: Object> Object for Intersection<T, O> {}