pub struct Node<I, G = DAffine3> {
pub id: Option<String>,
pub item: Option<I>,
pub children: Vec<Transformed<Node<I, G>, G>>,
}Expand description
A node of a scene-graph tree: pure structure — an external id, an optional payload, and a list of placed children.
Placement is not stored on the node: each child sits inside a
[Transformed] wrapper carrying its local-to-parent transform, so the
doctrine “placement lives in Transformed only” holds for trees too.
All pose algebra (composition, lerp, AABB corners, widening, root
posing) comes from [Transformed]’s own implementations instead of
being duplicated here, and a whole tree is placed by wrapping it:
Transformed::new(tree, pose) or tree.transformed(pose).
This is the same division as reading a glTF scene structurally: the
node’s name/mesh map to the payload and id, while its matrix|TRS
maps to the wrapper around the node.
§Examples
Build trees with Node::leaf, Node::group, Node::branch, and
the builders; place a child with transformed:
use ranim_core::transformed::TransformedExt;
use ranim_core::glam::dvec3;
use ranim_core::traits::Translation;
use ranim_items::hierarchy::Node;
let tree = Node {
id: Some("outer".into()),
item: None,
children: vec![
Node::leaf("geometry".to_string())
.transformed(Translation(dvec3(1.0, 0.0, 0.0))),
],
};
assert_eq!(tree.children[0].inner.item(), Some(&"geometry".to_string()));Fields§
§id: Option<String>External identifier carried from the source format (e.g. SVG element id, glTF node name). Ignored by rendering beyond being transported: alignment preserves it, and lerping switches ids at the mid-point exactly like other front-loaded fields in ranim.
item: Option<I>The payload carried by this node, in canonical local coordinates.
children: Vec<Transformed<Node<I, G>, G>>The placed child nodes, living in this node’s local space. Stored in source order; render extraction preserves that order depth-first so downstream consumers see painter’s-algorithm ordering, and a node’s own payload paints before its descendants.
Implementations§
Source§impl<I, G> Node<I, G>
impl<I, G> Node<I, G>
Sourcepub fn new(item: Option<I>, children: Vec<Transformed<Self, G>>) -> Self
pub fn new(item: Option<I>, children: Vec<Transformed<Self, G>>) -> Self
Pair a payload (if any) with placed children, without an external id.
Sourcepub fn with_id(self, id: impl Into<String>) -> Self
pub fn with_id(self, id: impl Into<String>) -> Self
Attach an external id, consuming and returning the node.
Sourcepub fn is_group(&self) -> bool
pub fn is_group(&self) -> bool
Whether this node is a pure frame: no payload, only (possibly empty) children.
Sourcepub fn children_mut(&mut self) -> &mut [Transformed<Self, G>]
pub fn children_mut(&mut self) -> &mut [Transformed<Self, G>]
The placed children mutably.
Sourcepub fn first_leaf(&self) -> Option<&I>
pub fn first_leaf(&self) -> Option<&I>
The first leaf payload in depth-first order, without composing any
transforms. This backs the color/stroke-width getters; None means
the tree has no payloads at all.
Sourcepub fn get(&self, path: &[usize]) -> Option<&Transformed<Self, G>>
pub fn get(&self, path: &[usize]) -> Option<&Transformed<Self, G>>
Look up a placement by walking child indices: [i] returns child
i (including its pose), [i, j] returns child j of child i’s
frame, and so on. Paths must be non-empty — the receiver is the
frame itself, not a placement — and None is returned when an index
is out of bounds.
Sourcepub fn get_mut(&mut self, path: &[usize]) -> Option<&mut Transformed<Self, G>>
pub fn get_mut(&mut self, path: &[usize]) -> Option<&mut Transformed<Self, G>>
Mutable variant of Node::get.
Sourcepub fn by_id(&self, id: &str) -> Option<&Transformed<Self, G>>
pub fn by_id(&self, id: &str) -> Option<&Transformed<Self, G>>
The first placement (depth-first preorder) whose id equals id.
Ids are external labels (SVG ids, glTF node names) and are not
guaranteed unique, so duplicates resolve to the preorder-first match;
see Node::by_ids for every match and Node::by_id_path for a
reusable address. Placements are searched, not the receiver — the
receiver is the frame they live in. None when no placement carries
the id.
Sourcepub fn by_id_mut(&mut self, id: &str) -> Option<&mut Transformed<Self, G>>
pub fn by_id_mut(&mut self, id: &str) -> Option<&mut Transformed<Self, G>>
Mutable variant of Node::by_id.
Sourcepub fn by_ids(&self, id: &str) -> Vec<&Transformed<Self, G>>
pub fn by_ids(&self, id: &str) -> Vec<&Transformed<Self, G>>
Every placement whose id equals id, in depth-first order.
fn collect_by_id<'a>( &'a self, id: &str, matches: &mut Vec<&'a Transformed<Self, G>>, )
Sourcepub fn by_id_path(&self, id: &str) -> Option<Vec<usize>>
pub fn by_id_path(&self, id: &str) -> Option<Vec<usize>>
The index path (see Node::get) of the first placement in
depth-first order whose id equals id. Useful to reuse an address
across frames without re-searching.
Sourcepub fn first_leaf_mut(&mut self) -> Option<&mut I>
pub fn first_leaf_mut(&mut self) -> Option<&mut I>
The first leaf payload in depth-first order, mutably.
Sourcepub fn leaves(&self) -> Leaves<'_, I, G> ⓘ
pub fn leaves(&self) -> Leaves<'_, I, G> ⓘ
Iterate over flattened leaf payloads with their accumulated world
affine, yielding (world_affine, &item) pairs in depth-first order —
i.e. painter’s-algorithm draw order.
The world affine composes top-down through every placement’s
transform, starting from the identity at the receiver: the receiver
is an unplaced frame, so wrapping the tree in [Transformed] places
it (see PlacedLeaves). Render extraction composes the same placement
into typed frame entries. Implemented with an explicit stack, so deep trees
cannot overflow the call stack.
Sourcepub fn leaves_mut(&mut self) -> LeavesMut<'_, I, G> ⓘ
pub fn leaves_mut(&mut self) -> LeavesMut<'_, I, G> ⓘ
Iterate over mutable references to all leaf payloads in depth-first
order. Unlike Node::leaves, no transforms are composed: callers
mutate canonical local data only.
Sourcepub fn map_inner<U>(self, f: impl FnMut(I) -> U) -> Node<U, G>
pub fn map_inner<U>(self, f: impl FnMut(I) -> U) -> Node<U, G>
Map every leaf payload to a new type, keeping ids, poses, and the
tree shape unchanged. This is the recursive analog of
[Transformed::map_inner].
Sourcepub fn map_transform<H>(self, f: impl FnMut(G) -> H) -> Node<I, H>
pub fn map_transform<H>(self, f: impl FnMut(G) -> H) -> Node<I, H>
Map the transform storage of every placement to a new type while
keeping everything else unchanged. This mirrors
[Transformed::map_transform] and is the general form of converting
between transform groups — including widening, which intentionally
has no blanket From impl on Node.
Source§impl<I, G: TransformGroup> Node<I, G>
impl<I, G: TransformGroup> Node<I, G>
Sourcepub fn group(
children: impl IntoIterator<Item = impl Into<Transformed<Self, G>>>,
) -> Self
pub fn group( children: impl IntoIterator<Item = impl Into<Transformed<Self, G>>>, ) -> Self
Create a pure frame — no payload — holding the placed children. Plain nodes passed in the iterator place with the identity pose.
Sourcepub fn branch(
item: I,
children: impl IntoIterator<Item = impl Into<Transformed<Self, G>>>,
) -> Self
pub fn branch( item: I, children: impl IntoIterator<Item = impl Into<Transformed<Self, G>>>, ) -> Self
Create a branch — a payload and placed children — without an id. The payload paints before the children. Plain nodes passed in the iterator place with the identity pose.
Trait Implementations§
Source§impl<I, G> Aabb for Node<I, G>
impl<I, G> Aabb for Node<I, G>
Source§fn aabb(&self) -> [DVec3; 2]
fn aabb(&self) -> [DVec3; 2]
Union of the payload’s and the placed children’s AABBs — each placement’s wrapper already applies its own pose, so the result is in the receiver’s local frame. A node with no payload and no children warns and reports a degenerate box, mirroring the slice impl in ranim-core.
§fn aabb_center(&self) -> DVec3
fn aabb_center(&self) -> DVec3
Source§impl<I, G> Alignable for Node<I, G>where
I: Alignable + Opacity,
G: Clone,
impl<I, G> Alignable for Node<I, G>where
I: Alignable + Opacity,
G: Clone,
Source§fn is_aligned(&self, other: &Self) -> bool
fn is_aligned(&self, other: &Self) -> bool
Whether both sides are already structurally compatible for direct
interpolation: payload presence must match positionally, sibling
counts must be equal, and every payload and child pair must satisfy
[Alignable::is_aligned]. This mirrors the Vec<T> blanket’s
pre-alignment contract; [Alignable::align_with] establishes this
state from mismatched trees.
Source§fn align_with(&mut self, other: &mut Self)
fn align_with(&mut self, other: &mut Self)
Align two trees for interpolation under one uniform rule: absence is filled with a transparent clone of the present side.
- Payload presence: when only one side carries an item, the
other side receives a transparent (
set_opacity(0.0)) clone of it, so lerping fades the payload in or out smoothly instead of jumping. - Payload pairs: when both sides carry items, they align with each other (vertex-level padding for point data).
- Children: unequal child counts are padded on both sides. A
non-empty list grows by repeating its own entries
(
resize_preserving_order_with_repeated_indices, matching theVec<T>: Alignableblanket); an empty list has nothing of its own to repeat, so it grows with transparent clones of the other side’s children — the same absence rule as payloads. Pairs recurse.
impl<I: Eq, G: Eq> Eq for Node<I, G>
Source§impl<I, G> FillColor for Node<I, G>where
I: FillColor,
impl<I, G> FillColor for Node<I, G>where
I: FillColor,
Source§fn fill_color(&self) -> AlphaColor<Srgb>
fn fill_color(&self) -> AlphaColor<Srgb>
The fill color of the first leaf in DFS order; an empty tree warns and reports white.
Source§fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self
Source§fn set_fill_opacity(&mut self, opacity: f32) -> &mut Self
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Self
Source§impl<I, G: TransformGroup> From<Node<I, G>> for Transformed<Node<I, G>, G>
A bare Node places with the identity pose, so plain and wrapped nodes
mix freely in the same vec![...] of children.
impl<I, G: TransformGroup> From<Node<I, G>> for Transformed<Node<I, G>, G>
A bare Node places with the identity pose, so plain and wrapped nodes
mix freely in the same vec![...] of children.
Source§impl<I, G> Interpolatable for Node<I, G>where
I: Interpolatable,
G: Interpolatable,
impl<I, G> Interpolatable for Node<I, G>where
I: Interpolatable,
G: Interpolatable,
Source§fn lerp(&self, target: &Self, t: f64) -> Self
fn lerp(&self, target: &Self, t: f64) -> Self
Structural lerp: nodes interpolate positionally, payloads and node
poses interpolate independently, and ids switch at the mid-point like
other front-loaded fields in ranim. Callers must have aligned
structures first (see [Alignable]): payload-presence mismatches
panic, and unequal sibling counts follow Vec’s truncating-zip
precedent.
Source§impl<I, G> Locate<Node<I, G>> for Centroid
The centroid of a tree weights every flattened leaf equally: sum each
leaf’s centroid mapped through its accumulated world affine and divide by
the leaf count — NOT per-child weighting. An empty tree warns and returns
zero instead of producing NaNs.
impl<I, G> Locate<Node<I, G>> for Centroid
The centroid of a tree weights every flattened leaf equally: sum each leaf’s centroid mapped through its accumulated world affine and divide by the leaf count — NOT per-child weighting. An empty tree warns and returns zero instead of producing NaNs.
Source§impl<I, G> Opacity for Node<I, G>where
I: Opacity,
impl<I, G> Opacity for Node<I, G>where
I: Opacity,
Source§fn set_opacity(&mut self, opacity: f32) -> &mut Self
fn set_opacity(&mut self, opacity: f32) -> &mut Self
Source§impl<I, G> Partial for Node<I, G>where
I: Partial,
G: Clone,
impl<I, G> Partial for Node<I, G>where
I: Partial,
G: Clone,
Source§fn get_partial(&self, range: Range<f64>) -> Self
fn get_partial(&self, range: Range<f64>) -> Self
Source§fn get_partial_closed(&self, range: Range<f64>) -> Self
fn get_partial_closed(&self, range: Range<f64>) -> Self
Source§impl<I, G> StrokeColor for Node<I, G>where
I: StrokeColor,
impl<I, G> StrokeColor for Node<I, G>where
I: StrokeColor,
Source§fn stroke_color(&self) -> AlphaColor<Srgb>
fn stroke_color(&self) -> AlphaColor<Srgb>
The stroke color of the first leaf in DFS order; an empty tree warns and reports white.
Source§fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self
Source§fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Self
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Self
Source§impl<I, G> StrokeWidth for Node<I, G>where
I: StrokeWidth,
impl<I, G> StrokeWidth for Node<I, G>where
I: StrokeWidth,
Source§fn stroke_width(&self) -> f32
fn stroke_width(&self) -> f32
The stroke width of the first leaf in DFS order; an empty tree warns
and reports 0.0.
Source§fn apply_stroke_func(
&mut self,
f: impl for<'a> Fn(&'a mut [Width]),
) -> &mut Self
fn apply_stroke_func( &mut self, f: impl for<'a> Fn(&'a mut [Width]), ) -> &mut Self
Forward the stroke-width function to every leaf independently.
§fn set_stroke_width(&mut self, width: f32) -> &mut Self
fn set_stroke_width(&mut self, width: f32) -> &mut Self
Auto Trait Implementations§
impl<I, G> Freeze for Node<I, G>
impl<I, G> RefUnwindSafe for Node<I, G>
impl<I, G> Send for Node<I, G>
impl<I, G> Sync for Node<I, G>
impl<I, G> Unpin for Node<I, G>
impl<I, G> UnsafeUnpin for Node<I, G>
impl<I, G> UnwindSafe for Node<I, G>
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
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) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
Source§type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
Source§fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<T, C> ComponentsInto<C> for T
impl<T, C> ComponentsInto<C> for T
Source§fn components_into(self) -> C
fn components_into(self) -> C
impl<T> ConditionalSend for Twhere
T: Send,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<T> StaticAnim for Twhere
T: StaticAnimRequirement + 'static,
impl<T> StaticAnim for Twhere
T: StaticAnimRequirement + 'static,
impl<T> StaticAnimRequirement for T
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.§impl<T> TransformedExt for T
impl<T> TransformedExt for T
§fn transformed<G>(self, transform: G) -> Transformed<Self, G>
fn transformed<G>(self, transform: G) -> Transformed<Self, G>
self wrapped with transform stored exactly as G.Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more