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 Freeze for Cube
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more