pub struct Obb {
pub frame: Frame,
pub half_extent: Vector,
}Expand description
A box that has been turned to fit what it bounds.
An axis-aligned box around a long thin rod lying diagonally is mostly empty;
this one is not. The cost is that testing a point against it is a transform
and then a comparison, rather than six comparisons, so Aabb stays the
default and this is for when the emptiness matters, which is broad-phase
rejection and anything that quotes a shape’s real extent.
Fields§
§frame: FrameThe centre, and the axes the half-extents are measured along.
half_extent: VectorHalf the size along the frame’s x, y and z.
Implementations§
Trait Implementations§
impl Copy for Obb
impl StructuralPartialEq for Obb
Auto Trait Implementations§
impl Freeze for Obb
impl RefUnwindSafe for Obb
impl Send for Obb
impl Sync for Obb
impl Unpin for Obb
impl UnsafeUnpin for Obb
impl UnwindSafe for Obb
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.