Skip to main content

Scale

Struct Scale 

Source
pub struct Scale<T: Object> {
    pub object: T,
    pub scale: DVec3,
}

Fields§

§object: T§scale: DVec3

Implementations§

Source§

impl<O: Object> Scale<O>

Source

pub fn new<X: Number, Y: Number, Z: Number>(object: O, x: X, y: Y, z: Z) -> Self

Trait Implementations§

Source§

impl<T: Clone + Object> Clone for Scale<T>

Source§

fn clone(&self) -> Scale<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: Debug + Object> Debug for Scale<T>

Source§

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

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

impl<T: Default + Object> Default for Scale<T>

Source§

fn default() -> Scale<T>

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

impl<'de, T> Deserialize<'de> for Scale<T>
where T: Deserialize<'de> + Object,

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<T: Object> Object for Scale<T>

Source§

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

Source§

impl<T: PartialEq + Object> PartialEq for Scale<T>

Source§

fn eq(&self, other: &Scale<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Serialize for Scale<T>
where T: Serialize + Object,

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<T: Object + ToDynamic> ToDynamic for Scale<T>

Source§

impl<T: Copy + Object> Copy for Scale<T>

Source§

impl<T: Object> StructuralPartialEq for Scale<T>

Source§

impl<T: ThreeDimensional> ThreeDimensional for Scale<T>

Source§

impl<T: Object> Transformation for Scale<T>

Source§

impl<T: TwoDimensional> TwoDimensional for Scale<T>

Auto Trait Implementations§

§

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

§

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

§

impl<T> Send for Scale<T>
where T: Send,

§

impl<T> Sync for Scale<T>
where T: Sync,

§

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

§

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

§

impl<T> UnwindSafe for Scale<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> 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,