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

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

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. See PMut::rect

Associated Types

Required methods

Implementors