Skip to main content

Circle

Struct Circle 

Source
pub struct Circle {
    pub radius: f64,
    pub fa: f64,
    pub fs: f64,
    pub fn_: usize,
}
Expand description

Creates a circle at origin

Fields§

§radius: f64

Circle radius

§fa: f64

minimum angle (in degrees) of each fragment

§fs: f64

minimum circumferential length of each fragment

§fn_: usize

fixed number of fragments in 360 degrees. Values of 3 or more override $fa and $fs

Implementations§

Source§

impl Circle

Source

pub fn new<T: Number>(radius: T, fa: T, fs: T, fn: usize) -> Self

Source

pub fn with_diameter<T: Number>(self, radius: T) -> Self

Source

pub fn with_radius<T: Number>(self, radius: T) -> Self

Source

pub fn with_fa<T: Number>(self, fa: T) -> Self

Source

pub fn with_fs<T: Number>(self, fs: T) -> Self

Source

pub fn with_fn(self, fn: usize) -> Self

Source

pub const fn center(&self) -> DVec2

Trait Implementations§

Source§

impl CircleExt for Circle

Source§

fn radius(&self) -> f64

Source§

fn diameter(&self) -> f64

Source§

fn area(&self) -> f64

Source§

fn circumference(&self) -> f64

Source§

impl Clone for Circle

Source§

fn clone(&self) -> Circle

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 Debug for Circle

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Circle

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Circle

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Object for Circle

Source§

fn name(&self) -> Option<&'static str>

Source§

impl Serialize for Circle

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ToDynamic for Circle

Source§

impl Copy for Circle

Source§

impl TwoDimensional for Circle

Auto Trait Implementations§

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> CenterObject for T
where T: Object,

Source§

fn centered(self, centered: bool) -> Centered<Self>
where Self: Object + Sized,

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> ColorObject for T
where T: Object,

Source§

fn colored(self, color: impl ColorFormat) -> Colored<T>

Source§

impl<T> DifferenceObject for T
where T: Object,

Source§

fn difference<Other: Object>(self, other: Other) -> Difference<Self, Other>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

§

const WITNESS: W = W::MAKE

A constant of the type witness
§

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

§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<T> IntersectionObject for T
where T: Object,

Source§

fn intersection<Other: Object>(self, other: Other) -> Intersection<Self, Other>

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> LinearExtrudeObject for T
where T: TwoDimensional,

Source§

fn linear_extrude<T: Number>(self, height: T) -> LinearExtrude<Self>
where Self: Sized,

Source§

impl<T> LinearPatternObject for T
where T: Object + Clone,

Source§

fn repeat<const N: usize>( self, offset: impl Number, direction: DVec3, ) -> Pattern<Self, N>
where Self: Sized,

Source§

fn repeated( self, offset: impl Number, direction: DVec3, times: usize, ) -> PatternRuntime<Self>
where Self: Sized,

Source§

impl<T> MirrorObject for T
where T: Object,

Source§

fn mirror<T: Number>(self, x: T, y: T, z: T) -> Mirror<Self>
where Self: Sized,

Source§

fn mirror_x<T: Number>(self, x: T) -> Mirror<Self>
where Self: Sized,

Source§

fn mirror_y<T: Number>(self, y: T) -> Mirror<Self>
where Self: Sized,

Source§

fn mirror_z<T: Number>(self, z: T) -> Mirror<Self>
where Self: Sized,

Source§

fn mirror_xy<T: Number>(self, x: T, y: T) -> Mirror<Self>
where Self: Sized,

Source§

fn mirror_xz<T: Number>(self, x: T, z: T) -> Mirror<Self>
where Self: Sized,

Source§

fn mirror_yz<T: Number>(self, y: T, z: T) -> Mirror<Self>
where Self: Sized,

Source§

impl<T> OffsetObject for T
where T: TwoDimensional,

Source§

fn offset<O: Number>(self, offset: O) -> Offset<Self>
where Self: Sized,

Source§

fn offset_rounded<O: Number>(self, offset: O) -> Offset<Self>
where Self: Sized,

Source§

impl<T> ProjectionObject<T> for T
where T: Object,

Source§

fn project(self) -> Projection<Self>

Source§

impl<T> RotateExtrudeObject for T
where T: TwoDimensional,

Source§

fn rotate_extrude(self) -> RotateExtrude<Self>
where Self: Sized,

Source§

impl<T> RotateObject for T
where T: Object,

Source§

fn rotate<T: Number>(self, x: T, y: T, z: T) -> Rotate<Self>
where Self: Sized,

Source§

fn rotate_x<T: Number>(self, x: T) -> Rotate<Self>
where Self: Sized,

Source§

fn rotate_y<T: Number>(self, y: T) -> Rotate<Self>
where Self: Sized,

Source§

fn rotate_z<T: Number>(self, z: T) -> Rotate<Self>
where Self: Sized,

Source§

fn rotate_xy<T: Number>(self, x: T, y: T) -> Rotate<Self>
where Self: Sized,

Source§

fn rotate_yz<T: Number>(self, y: T, z: T) -> Rotate<Self>
where Self: Sized,

Source§

fn rotate_xz<T: Number>(self, x: T, z: T) -> Rotate<Self>
where Self: Sized,

Source§

impl<T> ScaleObject for T
where T: Object,

Source§

fn scale_uniform<T: Number>(self, scaler: T) -> Scale<Self>
where Self: Sized,

Source§

fn scale<T: Number>(self, x: T, y: T, z: T) -> Scale<Self>
where Self: Sized,

Source§

fn scale_x<T: Number>(self, x: T) -> Scale<Self>
where Self: Sized,

Source§

fn scale_y<T: Number>(self, y: T) -> Scale<Self>
where Self: Sized,

Source§

fn scale_z<T: Number>(self, z: T) -> Scale<Self>
where Self: Sized,

Source§

fn scale_xy<T: Number>(self, x: T, y: T) -> Scale<Self>
where Self: Sized,

Source§

fn scale_xz<T: Number>(self, x: T, z: T) -> Scale<Self>
where Self: Sized,

Source§

fn scale_yz<T: Number>(self, y: T, z: T) -> Scale<Self>
where Self: Sized,

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> TranslateObject for T
where T: Object,

Source§

fn translate<T: Number>(self, x: T, y: T, z: T) -> Translate<Self>
where Self: Sized,

Source§

fn translate_x<T: Number>(self, x: T) -> Translate<Self>
where Self: Sized,

Source§

fn translate_y<T: Number>(self, y: T) -> Translate<Self>
where Self: Sized,

Source§

fn translate_z<T: Number>(self, z: T) -> Translate<Self>
where Self: Sized,

Source§

fn translate_xy<T: Number>(self, x: T, y: T) -> Translate<Self>
where Self: Sized,

Source§

fn translate_xz<T: Number>(self, x: T, z: T) -> Translate<Self>
where Self: Sized,

Source§

fn translate_yz<T: Number>(self, y: T, z: T) -> Translate<Self>
where Self: Sized,

Source§

fn translate_vector(self, vector: DVec3) -> Translate<Self>
where Self: Sized,

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.
Source§

impl<A, B> TwoContainerObject<B> for A
where A: Object, B: Object,

Source§

fn and(self, other: B) -> TwoContainer<Self, B>
where Self: Sized,

Source§

fn copy_and(self, process: impl FnOnce(Self) -> B) -> TwoContainer<Self, B>
where Self: Sized + Copy,

Source§

fn clone_and(self, process: impl FnOnce(Self) -> B) -> TwoContainer<Self, B>
where Self: Sized + Clone,

Source§

impl<T> UnionObject for T
where T: Object,

Source§

fn union<Other: Object>(self, other: Other) -> Union<Self, Other>

Source§

impl<T> XorObject for T
where T: Object,

Source§

fn xor<Other: Object>(self, other: Other) -> Xor<Self, Other>

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> OpaqueAttachment for T
where T: Send + Sync + 'static,