Skip to main content

Transformed

Struct Transformed 

Source
pub struct Transformed<T, G> {
    pub inner: T,
    pub transform: G,
}
Expand description

An item paired with an external transform represented by G.

inner retains its own representation while transform controls the extracted geometry. Composition is explicit about order:

Applying an H through ApplyTransform is outer composition and is only available when H embeds into the existing storage type (G: From<H>). Operations never widen the wrapper automatically. Widen explicitly with Into::into when a more general storage type is required.

ⓘ
use ranim_core::{glam::DVec3, prelude::*};

let mut item = ().transformed(Similarity::IDENTITY);
// `Diag` does not embed into `Similarity`; choose `DAffine3` storage first.
item.scale(DVec3::new(2.0, 1.0, 1.0));

Extraction and Aabb calculation convert G to [DAffine3] only at the geometry boundary. Projective transforms remain outside the model-transform system.

Fields§

§inner: T

The item expressed in its own coordinates.

§transform: G

The external transform applied to inner.

Implementations§

Source§

impl<T, G> Transformed<T, G>

Source

pub fn new(inner: T, transform: G) -> Transformed<T, G>

Pair inner with transform without converting either value.

Source

pub fn map_inner<U, F>(self, f: F) -> Transformed<U, G>
where F: FnOnce(T) -> U,

Map the wrapped item to a new type, keeping transform unchanged.

Source

pub fn map_transform<H, F>(self, f: F) -> Transformed<T, H>
where F: FnOnce(G) -> H,

Map the transform storage to a new type while keeping inner unchanged.

This is the general form of converting between transform groups — for example widening a placement or checked-narrowing an affine storage back to a subgroup. Lossless upward conversions need no closure at all: Transformed implements From<Transformed<T, X>> for Transformed<T, Y> whenever X embeds into Y, so prefer plain .into() there.

Source

pub fn compose_outer<H>(&mut self, outer: H) -> &mut Transformed<T, G>
where G: TransformGroup + From<H>,

Compose outer on the left: transform = outer * transform.

Source

pub fn compose_inner<H>(&mut self, inner: H) -> &mut Transformed<T, G>
where G: TransformGroup + From<H>,

Compose inner on the right: transform = transform * inner.

Source

pub fn bake(self) -> T
where T: ApplyTransform<G>,

Bake the stored transform into inner and remove the wrapper.

This method exists only when T directly supports the wrapper’s exact transform representation G.

Trait Implementations§

Source§

impl<T, G> Aabb for Transformed<T, G>
where T: Aabb, G: Clone + Into<DAffine3>,

Source§

fn aabb(&self) -> [DVec3; 2]

Get the Axis-aligned bounding box represent in [<min>, <max>].
Source§

fn aabb_size(&self) -> DVec3

Get the size of the Aabb.
Source§

fn aabb_center(&self) -> DVec3

Get the center of the Aabb.
Source§

impl<T, G> Alignable for Transformed<T, G>
where T: Alignable, G: Clone,

Source§

fn is_aligned(&self, other: &Transformed<T, G>) -> bool

Checking if two items are aligned
Source§

fn align_with(&mut self, other: &mut Transformed<T, G>)

Aligning two items
Source§

impl<T, G, H> ApplyTransform<H> for Transformed<T, G>
where G: TransformGroup + From<H>,

Source§

fn apply(&mut self, transform: H) -> &mut Transformed<T, G>

Bake transform (expressed in world coordinates) into the item’s data, in place.
Source§

impl<T, G> Clone for Transformed<T, G>
where T: Clone, G: Clone,

Source§

fn clone(&self) -> Transformed<T, G>

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, G> Debug for Transformed<T, G>
where T: Debug, G: Debug,

Source§

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

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

impl<T, G> Empty for Transformed<T, G>
where T: Empty, G: TransformGroup,

Source§

fn empty() -> Transformed<T, G>

Create an empty placeholder of a wrapped item.

The inner item contributes T::empty() while the pose is G::identity(): an empty placeholder carries no geometry, so there is no meaningful placement to preserve — identity keeps it neutral for composition until real content is placed on it.

Source§

impl<T, G> Extract for Transformed<T, G>
where T: Extract<Target = CoreItem>, G: Clone + Into<DAffine3>,

Source§

type Target = CoreItem

Extraction target.
Source§

fn extract_into(&self, buf: &mut Vec<<Transformed<T, G> as Extract>::Target>)

Append extracted values to buf.
Source§

fn extract(&self) -> Vec<Self::Target>

Extract into a newly allocated vector.
Source§

impl<T, G> FillColor for Transformed<T, G>
where T: FillColor,

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Getting fill color of an item
Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Transformed<T, G>

Setting fill color(rgba) of an item
Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Transformed<T, G>

Setting fill opacity of an item
Source§

impl<I, G> From<Node<I, G>> for Transformed<Node<I, G>, G>
where G: TransformGroup,

A bare Node places with the identity pose, so plain and wrapped nodes mix freely in the same vec![...] of children.

Source§

fn from(inner: Node<I, G>) -> Transformed<Node<I, G>, G>

Converts to this type from the input type.
Source§

impl<T> From<Transformed<T, Diag>> for Transformed<T, DAffine3>

Source§

fn from(value: Transformed<T, Diag>) -> Transformed<T, DAffine3>

Converts to this type from the input type.
Source§

impl<T> From<Transformed<T, Rigid>> for Transformed<T, Similarity>

Source§

fn from(value: Transformed<T, Rigid>) -> Transformed<T, Similarity>

Converts to this type from the input type.
Source§

impl<T> From<Transformed<T, Rigid>> for Transformed<T, DAffine3>

Source§

fn from(value: Transformed<T, Rigid>) -> Transformed<T, DAffine3>

Converts to this type from the input type.
Source§

impl<T> From<Transformed<T, Similarity>> for Transformed<T, DAffine3>

Source§

fn from(value: Transformed<T, Similarity>) -> Transformed<T, DAffine3>

Converts to this type from the input type.
Source§

impl<T> From<Transformed<T, Translation>> for Transformed<T, Rigid>

Source§

fn from(value: Transformed<T, Translation>) -> Transformed<T, Rigid>

Converts to this type from the input type.
Source§

impl<T> From<Transformed<T, Translation>> for Transformed<T, Similarity>

Source§

fn from(value: Transformed<T, Translation>) -> Transformed<T, Similarity>

Converts to this type from the input type.
Source§

impl<T> From<Transformed<T, Translation>> for Transformed<T, DAffine3>

Source§

fn from(value: Transformed<T, Translation>) -> Transformed<T, DAffine3>

Converts to this type from the input type.
Source§

impl<T, G> Interpolatable for Transformed<T, G>

Source§

fn lerp(&self, target: &Transformed<T, G>, t: f64) -> Transformed<T, G>

Lerping between values
Source§

impl<T, G> Locate<Transformed<T, G>> for Centroid
where Centroid: Locate<T>, G: Clone + Into<DAffine3>,

Source§

fn locate(&self, target: &Transformed<T, G>) -> DVec3

Locate self on the target
Source§

impl<T, G> Locate<Transformed<T, G>> for Origin
where Origin: Locate<T>, G: Clone + Into<DAffine3>,

Source§

fn locate(&self, target: &Transformed<T, G>) -> DVec3

Locate self on the target
Source§

impl<T, G> Locate<Transformed<T, G>> for Focus
where Focus: Locate<T>, G: Clone + Into<DAffine3>,

Source§

fn locate(&self, target: &Transformed<T, G>) -> DVec3

Locate self on the target
Source§

impl<T, G> Opacity for Transformed<T, G>
where T: Opacity,

Source§

fn set_opacity(&mut self, opacity: f32) -> &mut Transformed<T, G>

Setting opacity of an item
Source§

impl<T, G> Partial for Transformed<T, G>
where T: Partial, G: Clone,

Source§

fn get_partial(&self, range: Range<f64>) -> Transformed<T, G>

Take a partial slice of the wrapped item, keeping the pose.

The range is forwarded to inner, so the partial geometry is taken in the item’s own coordinates, while the stored transform G is cloned unchanged. The wrapper therefore keeps its placement while the visible geometry grows from the slice, which is what create-style animations expect.

Source§

fn get_partial_closed(&self, range: Range<f64>) -> Transformed<T, G>

Take a closed partial slice of the wrapped item, keeping the pose.

Like get_partial, but the inner slice is closed so partially shown curves have caps at both ends; the wrapper’s transform is preserved.

Source§

impl<T, G> PartialEq for Transformed<T, G>
where T: PartialEq, G: PartialEq,

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl<I, G> PlacedLeaves<I, G> for Transformed<Node<I, G>, G>
where G: Clone + Into<DAffine3>,

Source§

fn leaves(&self) -> Leaves<'_, I, G> ⓘ

Iterate the placed tree’s leaf payloads with accumulated world affines (see Node::leaves).
Source§

fn leaves_mut(&mut self) -> LeavesMut<'_, I, G> ⓘ

Mutable variant (no transforms are composed).
Source§

impl<T, G> StrokeColor for Transformed<T, G>
where T: StrokeColor,

Source§

fn stroke_color(&self) -> AlphaColor<Srgb>

Getting stroke color of an item
Source§

fn set_stroke_color( &mut self, color: AlphaColor<Srgb>, ) -> &mut Transformed<T, G>

Setting stroke color(rgba) of an item
Source§

fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Transformed<T, G>

Setting stroke opacity of an item
Source§

impl<T, G> StrokeWidth for Transformed<T, G>
where T: StrokeWidth,

Source§

fn stroke_width(&self) -> f32

Get the stroke width
Source§

fn apply_stroke_func( &mut self, f: impl for<'a> Fn(&'a mut [Width]), ) -> &mut Transformed<T, G>

Applying stroke width function to an item
Source§

fn set_stroke_width(&mut self, width: f32) -> &mut Self

Setting stroke width of an item
Source§

impl<T, G> StructuralPartialEq for Transformed<T, G>
where T: PartialEq, G: PartialEq,

Auto Trait Implementations§

§

impl<T, G> Freeze for Transformed<T, G>
where T: Freeze, G: Freeze,

§

impl<T, G> RefUnwindSafe for Transformed<T, G>

§

impl<T, G> Send for Transformed<T, G>
where T: Send, G: Send,

§

impl<T, G> Sync for Transformed<T, G>
where T: Sync, G: Sync,

§

impl<T, G> Unpin for Transformed<T, G>
where T: Unpin, G: Unpin,

§

impl<T, G> UnsafeUnpin for Transformed<T, G>
where T: UnsafeUnpin, G: UnsafeUnpin,

§

impl<T, G> UnwindSafe for Transformed<T, G>
where T: UnwindSafe, G: UnwindSafe,

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
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> AnyExtractCoreItem for T
where T: Extract<Target = CoreItem> + Any + DynClone,

Source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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> Color for T
where T: FillColor + StrokeColor + ?Sized,

Source§

fn set_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self

Setting color(rgba) of an item
Source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
§

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

Source§

impl<T> CreationAnim<T> for T
where T: CreationRequirement + 'static,

Source§

fn create(&mut self) -> Create<T>

Create a Create anim for T.
Source§

fn uncreate(&mut self) -> UnCreate<T>

Create an UnCreate anim for T.
Source§

impl<T> CreationRequirement for T

Source§

impl<T> Discard for T

Source§

fn discard(&self)

Simply returns ()
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

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

§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> FadingAnim for T
where T: FadingRequirement + 'static,

Source§

fn fade_in(&mut self) -> FadeIn<T>

Create a FadeIn anim.
Source§

fn fade_out(&mut self) -> FadeOut<T>

Create a FadeOut anim.
Source§

impl<T> FadingRequirement for T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
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
§

impl<T> IntoResult<T> for T

§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> MorphAnim for T
where T: MorphRequirement + 'static,

Source§

fn morph<F>(&mut self, f: F) -> Morph<T>
where F: Fn(&mut T),

Create a Morph anim with a func.
Source§

fn morph_from(&mut self, s: T) -> Morph<T>

Create a Morph anim from src.
Source§

fn morph_to(&mut self, d: T) -> Morph<T>

Create a Morph anim to dst.
Source§

impl<T> MorphRequirement for T

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> RotateTransform for T
where T: ApplyTransform<Rigid> + ?Sized,

Source§

fn rotate_on_axis(&mut self, axis: DVec3, angle: f64) -> &mut T

Rotate the item by a given angle about a given axis.
Source§

fn rotate_on_x(&mut self, angle: f64) -> &mut Self

Rotate the item by a given angle about the X axis.
Source§

fn rotate_on_y(&mut self, angle: f64) -> &mut Self

Rotate the item by a given angle about the Y axis.
Source§

fn rotate_on_z(&mut self, angle: f64) -> &mut Self

Rotate the item by a given angle about the Z axis.
Source§

impl<T> RotatingAnim for T
where T: RotatingRequirement + 'static,

Source§

fn rotating(&mut self, angle: f64, axis: DVec3) -> RotatingAnimation<Self>
where Self: Aabb,

Rotate by a given angle about a given axis at center.
Source§

fn rotating_at<A>( &mut self, angle: f64, axis: DVec3, anchor: A, ) -> RotatingAnimation<Self>
where A: Locate<Self>,

Rotate by a given angle about a given axis at the given anchor.
Source§

impl<T> RotatingRequirement for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ScaleTransform for T
where T: ApplyTransform<Diag> + ?Sized,

Source§

fn scale(&mut self, scale: DVec3) -> &mut T

Scale at the origin.
Source§

impl<T> ScaleTransformExt for T
where T: ScaleTransform + ?Sized,

Source§

fn calc_scale_ratio(&self, hint: ScaleHint) -> DVec3
where Self: Aabb,

Calculate the scale ratio for a given hint. Read more
Source§

fn scale_to(&mut self, hint: ScaleHint) -> &mut Self
where Self: Aabb,

Scale the item to a given hint (at origin). Read more
Source§

fn scale_to_min(&mut self, hints: &[ScaleHint]) -> &mut Self
where Self: Aabb,

Scale the item to the minimum scale ratio of each axis from the given hints. Read more
Source§

fn scale_to_max(&mut self, hints: &[ScaleHint]) -> &mut Self
where Self: Aabb,

Scale the item to the maximum scale ratio of each axis from the given hints. Read more
Source§

impl<T> ScaleTransformStrokeExt for T

Source§

fn scale_with_stroke(&mut self, scale: DVec3) -> &mut Self

Scale the item with stroke width (at origin).
Source§

fn scale_to_with_stroke(&mut self, hint: ScaleHint) -> &mut Self
where Self: Aabb,

Scale the item to a given hint with stroke width. Read more
§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

Source§

impl<T> ShiftTransform for T

Source§

fn shift(&mut self, offset: DVec3) -> &mut T

Shift the item by a given vector.
Source§

impl<T> ShiftTransformExt for T
where T: ShiftTransform + ?Sized,

Source§

fn with_origin( &mut self, p: impl Locate<Self>, f: impl FnOnce(&mut Self), ) -> &mut Self

Do something with the origin of the item. Read more
Source§

fn move_anchor_to<A>(&mut self, anchor: A, point: DVec3) -> &mut Self
where A: Locate<Self>,

Put anchor at a given point. Read more
Source§

fn move_to(&mut self, point: DVec3) -> &mut Self
where AabbPoint: Locate<Self>,

Put pivot at a given point.
Source§

fn move_next_to<T>(&mut self, target: &T, anchor: AabbPoint) -> &mut Self
where T: Aabb + ?Sized, AabbPoint: Locate<Self>,

Put negative anchor of self on anchor of target
Source§

fn move_next_to_padded<T>( &mut self, target: &T, anchor: AabbPoint, padding: f64, ) -> &mut Self
where T: Aabb + ?Sized, AabbPoint: Locate<Self>,

Put negative anchor of self on anchor of target, with a distance of padding
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T> StaticAnim for T
where T: StaticAnimRequirement + 'static,

Source§

fn show(&self) -> Paramed<Static<T>>

Show this value.
Source§

fn hide(&self) -> Paramed<Static<T>>

Hide this value.
Source§

impl<T> StaticAnimRequirement for T

Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
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
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T> TransformedExt for T

Source§

fn transformed<G>(self, transform: G) -> Transformed<Self, G>

Return self wrapped with transform stored exactly as G.
Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. 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.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
Source§

impl<T> UniformScaleTransform for T

Source§

fn scale_uniform(&mut self, s: f64) -> &mut T

Scale the item uniformly by s (at origin).
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

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

Source§

impl<T> With for T

Source§

fn with(self, f: impl Fn(&mut Self)) -> Self
where Self: Sized,

Mutating a value in place
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WritingAnim for T
where T: WritingRequirement + 'static,

Source§

fn write(&mut self) -> Write<T>

Create a Write anim for T.
Source§

fn unwrite(&mut self) -> Unwrite<T>

Create a Unwrite anim for T.
Source§

impl<T> WritingRequirement for T