[][src]Trait broccoli::Aabb

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

Trait to signify that this object has an axis aligned bounding box. get() must return a aabb with the same value in it while the element is in the dinotree. This is hard for the user not to do, this the user does not have &mut self, and the aabb is implied to belong to self. But it is still possible through the use of static objects or RefCell/ Mutex, etc. Using this 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

type Num: Num

Loading content...

Required methods

fn get(&self) -> &Rect<Self::Num>

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...