[][src]Trait broccoli::node::Aabb

pub unsafe trait Aabb {
    type Num: Num;
    pub fn get(&self) -> &Rect<Self::Num>;
}

Trait to signify that this object has an axis aligned bounding box. Aabb::get() must return a aabb with the same value in it while the element is in the tree. This is hard for the user not to do, this the user does not have &mut self, but it is still possible through the use of static objects or RefCell / Mutex, etc. Using these type of methods the user could make different calls to get() return different aabbs. This is unsafe since we allow query algorithms to assume the following: If two object's aabb's don't intersect, then they can be mutated at the same time.

Associated Types

Loading content...

Required methods

pub fn get(&self) -> &Rect<Self::Num>[src]

Loading content...

Implementors

impl<'a, T: Aabb> Aabb for PMut<'a, T>[src]

type Num = T::Num

impl<N: Num> Aabb for Rect<N>[src]

type Num = N

impl<N: Num, T> Aabb for BBox<N, T>[src]

type Num = N

impl<N: Num, T, '_> Aabb for &'_ mut BBox<N, T>[src]

type Num = N

Loading content...