Skip to main content

Arc3

Struct Arc3 

Source
pub struct Arc3<T: Number> {
    pub s: Vector3<T>,
    pub m: Vector3<T>,
    pub e: Vector3<T>,
}
Expand description

The circular arc from s through m to e.

Fields§

§s: Vector3<T>§m: Vector3<T>§e: Vector3<T>

Implementations§

Source§

impl<T: Number> Arc3<T>

Source

pub fn normal(&self) -> GeopResult<Vector3<T>>

The unit normal of its plane, the way it turns: from s to e it runs counter-clockwise about it.

Source

pub fn half_sweep(&self) -> GeopResult<(T, T)>

cos and sin of half its sweep.

Source

pub fn radius(&self) -> GeopResult<T>

Its radius: |a| |b| |e - s| / (2 |a x b|).

Source

pub fn center(&self) -> GeopResult<Vector3<T>>

Its center: m + (|a|^2 b - |b|^2 a) x (a x b) / (2 |a x b|^2).

Source

pub fn half_sweep_between( &self, p: &Vector3<T>, q: &Vector3<T>, ) -> GeopResult<(T, T)>

cos and sin of half the sweep from p to q along its circle, the way it turns — two points of the arc, q after p: the part of the arc between two of its points. The sine is the chord over the diameter, |q - p| / (2 r); the cosine is the sine of the whole sweep over twice the sine of half of it, n . ((p - c) x (q - c)) / (r |q - p|), which carries the sign of a sweep past a half turn without a case.

Source

pub fn tangent(&self, at_end: bool) -> GeopResult<Vector3<T>>

Its unit tangent at end, in its own direction — from s to e: the chord’s direction turned back (at the start) or on (at the end) by half the sweep, in the arc’s plane.

Trait Implementations§

Source§

impl<T: Clone + Number> Clone for Arc3<T>

Source§

fn clone(&self) -> Arc3<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Copy + Number> Copy for Arc3<T>

Source§

impl<T: Debug + Number> Debug for Arc3<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Arc3<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Arc3<T>
where T: RefUnwindSafe,

§

impl<T> Send for Arc3<T>

§

impl<T> Sync for Arc3<T>

§

impl<T> Unpin for Arc3<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Arc3<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Arc3<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.