pub struct NormalCone { /* private fields */ }Expand description
A direction and an angular reach about it.
The axis is stored normalised, so the stored value does not depend on the length the caller passed.
Implementations§
Source§impl NormalCone
impl NormalCone
Sourcepub fn new(
axis: DVec3,
half_angle: f64,
) -> Result<NormalCone, FaceSelectionError>
pub fn new( axis: DVec3, half_angle: f64, ) -> Result<NormalCone, FaceSelectionError>
A cone about axis reaching half_angle radians.
§Errors
FaceSelectionError::InvalidAxis when axis is not finite or has
no direction; FaceSelectionError::InvalidHalfAngle when
half_angle is not finite or outside [0, pi].
Sourcepub fn half_angle(self) -> f64
pub fn half_angle(self) -> f64
The half-angle in radians.
Trait Implementations§
Source§impl Clone for NormalCone
impl Clone for NormalCone
Source§fn clone(&self) -> NormalCone
fn clone(&self) -> NormalCone
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NormalCone
Source§impl Debug for NormalCone
impl Debug for NormalCone
Source§impl PartialEq for NormalCone
impl PartialEq for NormalCone
impl StructuralPartialEq for NormalCone
Auto Trait Implementations§
impl Freeze for NormalCone
impl RefUnwindSafe for NormalCone
impl Send for NormalCone
impl Sync for NormalCone
impl Unpin for NormalCone
impl UnsafeUnpin for NormalCone
impl UnwindSafe for NormalCone
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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