MCPcopy Create free account
hub / github.com/carbonengine/trinity / SampleAnimation

Method SampleAnimation

trinity/Tr2GrannyAnimationLayer.cpp:628–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626}
627
628void Tr2GrannyAnimationLayer::SampleAnimation( float animationTime, cmf::SkeletonPose* resultPose, IBlueEventListener* listener, std::unordered_map<std::string, float>& morphAnimations )
629{
630 SampleMorphTracks( morphAnimations );
631 FreeCompletedControls();
632 if( m_controlParamEnabled )
633 {
634 UpdateControlParam( animationTime );
635
636 cmf::RestPose( *resultPose, m_sequencer->GetSkeleton() );
637 m_sequencer->EnumerateAnimations( [&]( const std::shared_ptr<cmf::AnimationPlayer>& player ) {
638 player->SampleAtLocalTime( *resultPose, m_controlParam * player->GetLoopDuration() );
639 } );
640 }
641 else
642 {
643 m_sequencer->Sample( *resultPose, animationTime );
644 }
645}
646
647void Tr2GrannyAnimationLayer::SampleAnimation( float animationTime, cmf::SkeletonPose* compositePose, cmf::SkeletonPose* resultPose, IBlueEventListener* listener, std::unordered_map<std::string, float>& morphAnimations, bool additive )
648{

Callers 1

PrePhysicsAnimationMethod · 0.80

Calls 2

GetSkeletonMethod · 0.45
IsActiveMethod · 0.45

Tested by

no test coverage detected