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: f32Radius of the cylinder
height: f32Height 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,
§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