[][src]Trait broccoli::node::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. Multiple calls to Aabb::get() must return a aabb with the same value. This is hard for the user not to do since 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

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 &mut BBox<N, T>[src]

type Num = N

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

type Num = N

Loading content...