Struct veloren_common::util::find_dist::Cylinder
source · pub struct Cylinder {
pub center: Vec3<f32>,
pub radius: f32,
pub height: f32,
}
Expand description
A z-axis aligned cylinder
Fields§
§center: Vec3<f32>
Center of the cylinder
radius: f32
Radius of the cylinder
height: f32
Height of the cylinder
Implementations§
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
source§impl FindDist<Cylinder> for Cylinder
impl FindDist<Cylinder> for Cylinder
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
source§impl FindDist<Cylinder> for Vec3<f32>
impl FindDist<Cylinder> for Vec3<f32>
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
source§impl FindDist<Vec3<f32>> for Cylinder
impl FindDist<Vec3<f32>> for Cylinder
source§fn approx_in_range(self, other: Vec3<f32>, range: f32) -> bool
fn approx_in_range(self, other: Vec3<f32>, 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
impl Copy for Cylinder
Auto Trait Implementations§
impl Freeze for Cylinder
impl RefUnwindSafe for Cylinder
impl Send for Cylinder
impl Sync for Cylinder
impl Unpin for Cylinder
impl UnwindSafe for Cylinder
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