pub struct Aabb {
pub min: Vec3,
pub max: Vec3,
}Fields§
§min: Vec3§max: Vec3Implementations§
Source§impl Aabb
impl Aabb
pub fn new(min: Vec3, max: Vec3) -> Self
pub fn from_points(points: &[Vec3]) -> Self
pub fn center(&self) -> Vec3
pub fn half_extents(&self) -> Vec3
pub fn size(&self) -> Vec3
pub fn contains(&self, p: Vec3) -> bool
pub fn union(&self, other: &Self) -> Self
pub fn expand(&self, by: f32) -> Self
Trait Implementations§
impl Copy for Aabb
Source§impl<'de> Deserialize<'de> for Aabb
impl<'de> Deserialize<'de> for Aabb
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Aabb
Auto Trait Implementations§
impl Freeze for Aabb
impl RefUnwindSafe for Aabb
impl Send for Aabb
impl Sync for Aabb
impl Unpin for Aabb
impl UnsafeUnpin for Aabb
impl UnwindSafe for Aabb
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