Struct veloren_common::util::find_dist::Cube
source · pub struct Cube {
pub min: Vec3<f32>,
pub side_length: f32,
}
Expand description
An axis aligned cube
Fields§
§min: Vec3<f32>
The position of min corner of the cube
side_length: f32
The side length of the cube
Trait Implementations§
source§impl FindDist<Cube> for Cylinder
impl FindDist<Cube> for Cylinder
source§fn approx_in_range(self, other: Cube, range: f32) -> bool
fn approx_in_range(self, other: Cube, range: f32) -> bool
Compute roughly whether the other shape is out of range
Meant to be a cheap method for initial filtering
Must return true if the shape could be within the supplied distance but
is allowed to return true if the shape is actually just out of
range
source§fn min_distance(self, other: Cube) -> f32
fn min_distance(self, other: Cube) -> f32
Find the smallest distance between the two shapes
source§impl FindDist<Cylinder> for Cube
impl FindDist<Cylinder> for Cube
source§fn approx_in_range(self, other: Cylinder, range: f32) -> bool
fn approx_in_range(self, other: Cylinder, range: f32) -> bool
Compute roughly whether the other shape is out of range
Meant to be a cheap method for initial filtering
Must return true if the shape could be within the supplied distance but
is allowed to return true if the shape is actually just out of
range
source§fn min_distance(self, other: Cylinder) -> f32
fn min_distance(self, other: Cylinder) -> f32
Find the smallest distance between the two shapes
impl Copy for Cube
Auto Trait Implementations§
impl RefUnwindSafe for Cube
impl Send for Cube
impl Sync for Cube
impl Unpin for Cube
impl UnwindSafe for Cube
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