pub enum PoseNode<T>where
T: EntityId,{
PlayAnimation(PlayAnimation<T>),
BlendAnimations(BlendAnimations<T>),
BlendAnimationsByIndex(BlendAnimationsByIndex<T>),
BlendSpace(BlendSpace<T>),
}
Expand description
Specialized node that provides animation pose. See documentation for each variant.
Variants§
PlayAnimation(PlayAnimation<T>)
See docs for PlayAnimation
.
BlendAnimations(BlendAnimations<T>)
See docs for BlendAnimations
.
BlendAnimationsByIndex(BlendAnimationsByIndex<T>)
See docs for BlendAnimationsByIndex
.
BlendSpace(BlendSpace<T>)
See doc for BlendSpace
Implementations§
Source§impl<T> PoseNode<T>where
T: EntityId,
impl<T> PoseNode<T>where
T: EntityId,
pub const PLAY_ANIMATION_F_0: &'static str = "PlayAnimation@0"
pub const BLEND_ANIMATIONS_F_0: &'static str = "BlendAnimations@0"
pub const BLEND_ANIMATIONS_BY_INDEX_F_0: &'static str = "BlendAnimationsByIndex@0"
pub const BLEND_SPACE_F_0: &'static str = "BlendSpace@0"
Source§impl<T> PoseNode<T>where
T: EntityId,
impl<T> PoseNode<T>where
T: EntityId,
Sourcepub fn make_play_animation(animation: Handle<Animation<T>>) -> PoseNode<T>
pub fn make_play_animation(animation: Handle<Animation<T>>) -> PoseNode<T>
Creates new node that plays an animation.
Sourcepub fn make_blend_animations(poses: Vec<BlendPose<T>>) -> PoseNode<T>
pub fn make_blend_animations(poses: Vec<BlendPose<T>>) -> PoseNode<T>
Creates new node that blends multiple poses into one.
Sourcepub fn make_blend_animations_by_index(
index_parameter: String,
inputs: Vec<IndexedBlendInput<T>>,
) -> PoseNode<T>
pub fn make_blend_animations_by_index( index_parameter: String, inputs: Vec<IndexedBlendInput<T>>, ) -> PoseNode<T>
Creates new node that switches between given animations using index and smoothly blends from one animation to another while switching.
Sourcepub fn children(&self) -> Vec<Handle<PoseNode<T>>>
pub fn children(&self) -> Vec<Handle<PoseNode<T>>>
Returns a set of handles to children pose nodes.
Sourcepub fn collect_animations(
&self,
nodes: &Pool<PoseNode<T>>,
animations: &mut HashSet<Handle<Animation<T>>, BuildHasherDefault<FxHasher>>,
)
pub fn collect_animations( &self, nodes: &Pool<PoseNode<T>>, animations: &mut HashSet<Handle<Animation<T>>, BuildHasherDefault<FxHasher>>, )
Collects all animation handles used by this node and its descendants.
Trait Implementations§
Source§impl<T> AnimationPoseSource<T> for PoseNode<T>where
T: EntityId,
impl<T> AnimationPoseSource<T> for PoseNode<T>where
T: EntityId,
Source§fn eval_pose(
&self,
nodes: &Pool<PoseNode<T>>,
params: &ParameterContainer,
animations: &AnimationContainer<T>,
dt: f32,
) -> Ref<'_, AnimationPose<T>>
fn eval_pose( &self, nodes: &Pool<PoseNode<T>>, params: &ParameterContainer, animations: &AnimationContainer<T>, dt: f32, ) -> Ref<'_, AnimationPose<T>>
Evaluates animation pose and returns a reference to it.
Source§fn pose(&self) -> Ref<'_, AnimationPose<T>>
fn pose(&self) -> Ref<'_, AnimationPose<T>>
Returns a reference to inner pose of a node.
Source§fn collect_animation_events(
&self,
nodes: &Pool<PoseNode<T>>,
params: &ParameterContainer,
animations: &AnimationContainer<T>,
strategy: AnimationEventCollectionStrategy,
) -> Vec<(Handle<Animation<T>>, AnimationEvent)>
fn collect_animation_events( &self, nodes: &Pool<PoseNode<T>>, params: &ParameterContainer, animations: &AnimationContainer<T>, strategy: AnimationEventCollectionStrategy, ) -> Vec<(Handle<Animation<T>>, AnimationEvent)>
Collects animation events from internals.
Source§impl<T> Reflect for PoseNode<T>where
T: EntityId,
PoseNode<T>: 'static,
PlayAnimation<T>: Reflect,
BlendAnimations<T>: Reflect,
BlendAnimationsByIndex<T>: Reflect,
BlendSpace<T>: Reflect,
impl<T> Reflect for PoseNode<T>where
T: EntityId,
PoseNode<T>: 'static,
PlayAnimation<T>: Reflect,
BlendAnimations<T>: Reflect,
BlendAnimationsByIndex<T>: Reflect,
BlendSpace<T>: Reflect,
fn source_path() -> &'static str
fn type_name(&self) -> &'static str
fn doc(&self) -> &'static str
Source§fn assembly_name(&self) -> &'static str
fn assembly_name(&self) -> &'static str
Returns a parent assembly name of the type that implements this trait. WARNING: You should use
proc-macro (
#[derive(Reflect)]
) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.Source§fn type_assembly_name() -> &'static str
fn type_assembly_name() -> &'static str
Returns a parent assembly name of the type that implements this trait. WARNING: You should use
proc-macro (
#[derive(Reflect)]
) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.fn fields_info(&self, func: &mut dyn FnMut(&[FieldInfo<'_, '_>]))
fn into_any(self: Box<PoseNode<T>>) -> Box<dyn Any>
fn set( &mut self, value: Box<dyn Reflect>, ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>
fn as_any(&self, func: &mut dyn FnMut(&(dyn Any + 'static)))
fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Any + 'static)))
fn as_reflect(&self, func: &mut dyn FnMut(&(dyn Reflect + 'static)))
fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Reflect + 'static)))
fn fields(&self, func: &mut dyn FnMut(&[&(dyn Reflect + 'static)]))
fn fields_mut( &mut self, func: &mut dyn FnMut(&mut [&mut (dyn Reflect + 'static)]), )
fn field( &self, name: &str, func: &mut dyn FnMut(Option<&(dyn Reflect + 'static)>), )
fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut (dyn Reflect + 'static)>), )
Source§fn set_field(
&mut self,
field: &str,
value: Box<dyn Reflect>,
func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>),
)
fn set_field( &mut self, field: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>), )
Calls user method specified with
#[reflect(setter = ..)]
or falls back to
Reflect::field_mut
fn as_array(&self, func: &mut dyn FnMut(Option<&(dyn ReflectArray + 'static)>))
fn as_array_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectArray + 'static)>), )
fn as_list(&self, func: &mut dyn FnMut(Option<&(dyn ReflectList + 'static)>))
fn as_list_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectList + 'static)>), )
fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&(dyn ReflectInheritableVariable + 'static)>), )
fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectInheritableVariable + 'static)>), )
fn as_hash_map( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHashMap + 'static)>), )
fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHashMap + 'static)>), )
Source§impl<T> Visit for PoseNode<T>where
T: EntityId,
PlayAnimation<T>: Visit,
BlendAnimations<T>: Visit,
BlendAnimationsByIndex<T>: Visit,
BlendSpace<T>: Visit,
impl<T> Visit for PoseNode<T>where
T: EntityId,
PlayAnimation<T>: Visit,
BlendAnimations<T>: Visit,
BlendAnimationsByIndex<T>: Visit,
BlendSpace<T>: Visit,
Source§fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>
Read or write this value, depending on whether Visitor::is_reading() is true or false. Read more
impl<T> StructuralPartialEq for PoseNode<T>where
T: EntityId,
Auto Trait Implementations§
impl<T> !Freeze for PoseNode<T>
impl<T> !RefUnwindSafe for PoseNode<T>
impl<T> Send for PoseNode<T>
impl<T> !Sync for PoseNode<T>
impl<T> Unpin for PoseNode<T>where
T: Unpin,
impl<T> !UnwindSafe for PoseNode<T>
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn 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
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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
.Source§fn as_any(&self) -> &(dyn Any + 'static)
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.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts self reference as a reference to
Any
. Could be used to downcast a trait object
to a particular type.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts self reference as a reference to
Any
. Could be used to downcast a trait object
to a particular type.fn into_any(self: Box<T>) -> Box<dyn Any>
Source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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 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> ⓘ
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 moreSource§impl<T> MessageData for T
impl<T> MessageData for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.Source§impl<T> ReflectBase for Twhere
T: Reflect,
impl<T> ReflectBase for Twhere
T: Reflect,
fn as_any_raw(&self) -> &(dyn Any + 'static)
fn as_any_raw_mut(&mut self) -> &mut (dyn Any + 'static)
Source§impl<T> ResolvePath for Twhere
T: Reflect,
impl<T> ResolvePath for Twhere
T: Reflect,
fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>), )
fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>), )
fn get_resolve_path<'p, T>(
&self,
path: &'p str,
func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>),
)where
T: Reflect,
fn get_resolve_path_mut<'p, T>(
&mut self,
path: &'p str,
func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>),
)where
T: Reflect,
Source§impl<T> ScriptMessagePayload for T
impl<T> ScriptMessagePayload for T
Source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns
self
as &dyn Any
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Returns
self
as &dyn Any
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.