pub struct Circle { /* private fields */ }Expand description
A circle in space.
Implementations§
Source§impl Circle
impl Circle
Sourcepub fn new(frame: Frame, radius: f64, tol: Tolerances) -> OgeomResult<Self>
pub fn new(frame: Frame, radius: f64, tol: Tolerances) -> OgeomResult<Self>
A circle of radius in the xy plane of frame.
§Errors
OgeomError::Construction if radius is
not finite and positive.
Sourcepub fn through(
a: Point,
b: Point,
c: Point,
tol: Tolerances,
) -> OgeomResult<Self>
pub fn through( a: Point, b: Point, c: Point, tol: Tolerances, ) -> OgeomResult<Self>
The circle through three points.
§Errors
OgeomError::Construction if the points
are collinear or any two coincide; no circle passes through them.
Sourcepub fn distance_to(&self, p: Point) -> f64
pub fn distance_to(&self, p: Point) -> f64
The shortest distance from p to the circle.
Zero on the circle, and positive both inside and outside; this is the distance to the curve, not to the disc it bounds.
Sourcepub fn contains(&self, p: Point, tol: Tolerances) -> bool
pub fn contains(&self, p: Point, tol: Tolerances) -> bool
Whether p lies on the circle within tol.confusion().
Sourcepub fn transformed(&self, t: &Transform, tol: Tolerances) -> OgeomResult<Self>
pub fn transformed(&self, t: &Transform, tol: Tolerances) -> OgeomResult<Self>
Trait Implementations§
impl Copy for Circle
impl StructuralPartialEq for Circle
Auto Trait Implementations§
impl Freeze for Circle
impl RefUnwindSafe for Circle
impl Send for Circle
impl Sync for Circle
impl Unpin for Circle
impl UnsafeUnpin for Circle
impl UnwindSafe for Circle
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> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.