UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimSubsystem_NodeRelevancy.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
7#include "AnimSubsystem_NodeRelevancy.generated.h"
8
10struct FAnimNode_Base;
11class UAnimInstance;
12
13// Relevancy status of a animation node tracked by this subsystem
15{
16public:
17 // Get the current weight
18 ENGINE_API float GetCurrentWeight() const;
19
20 // Get the previous weight
21 ENGINE_API float GetPreviousWeight() const;
22
23 // Node has zero weight
24 ENGINE_API bool HasFullyBlendedOut() const;
25
26 // Node has just become relevant
28
29 // Node has weight and had zero weight last update
31
32 // Node has full weight and had non-full weight last update
34
35 // Node has full weight and had full weight last update
36 ENGINE_API bool HasFullyBlendedIn() const;
37
38 // Node has non-full weight and had full weight last update
40
41 // Node has zero weight and had non-zero weight last update
43
44private:
46
47 // Previous weight
48 float PreviousWeight = 0.0f;
49
50 // Current weight
51 float CurrentWeight = 0.0f;
52};
53
54// Initialization status of a node
56{
57 NotUpdated = 0,
58
60
61 Updated,
62};
63
65USTRUCT()
67{
69
70 // FAnimSubsystemInstance interface
71 ENGINE_API virtual void Initialize_WorkerThread() override;
72
73 // Update the relevancy of the passed-in node using the supplied context
75
76 // Get the tracked relevancy of the passed-in node. If the node is not tracked the relevancy will be default (zero weighted).
78
79 // Update the initialization state of the passed-in node using the supplied context
81
82 // Get the tracked initialization state of the passed-in node. If the node is not tracked the initialization state will be default (NotUpdated)
84
85private:
86 // Tracks the relevancy of a node
87 struct FTracker
88 {
89 // Counter used to determine relevancy
91
92 // Status of the node's relevancy
94 };
95
96private:
97 // Map of tracked anim nodes
99
100 // Map of tracked anim nodes initialization
102};
EAnimNodeInitializationStatus
Definition AnimSubsystem_NodeRelevancy.h:56
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
Definition UnrealString.h.inl:34
Definition AnimInstance.h:353
Definition AnimSubsystem_NodeRelevancy.h:15
ENGINE_API bool IsFinishingBlendingIn() const
Definition AnimSubsystem_NodeRelevancy.cpp:29
ENGINE_API bool IsFinishingBlendingOut() const
Definition AnimSubsystem_NodeRelevancy.cpp:34
bool HasJustBecomeRelevant() const
Definition AnimSubsystem_NodeRelevancy.h:27
ENGINE_API bool HasFullyBlendedIn() const
Definition AnimSubsystem_NodeRelevancy.cpp:39
ENGINE_API bool HasFullyBlendedOut() const
Definition AnimSubsystem_NodeRelevancy.cpp:44
ENGINE_API float GetPreviousWeight() const
Definition AnimSubsystem_NodeRelevancy.cpp:14
ENGINE_API bool IsStartingBlendingOut() const
Definition AnimSubsystem_NodeRelevancy.cpp:19
ENGINE_API float GetCurrentWeight() const
Definition AnimSubsystem_NodeRelevancy.cpp:9
ENGINE_API bool IsStartingBlendingIn() const
Definition AnimSubsystem_NodeRelevancy.cpp:24
Definition AnimNodeBase.h:853
Definition AnimSubsystem_NodeRelevancy.h:67
virtual ENGINE_API void Initialize_WorkerThread() override
Definition AnimSubsystem_NodeRelevancy.cpp:49
ENGINE_API EAnimNodeInitializationStatus UpdateNodeInitializationStatus(const FAnimationUpdateContext &InContext, const FAnimNode_Base &InNode)
Definition AnimSubsystem_NodeRelevancy.cpp:83
ENGINE_API FAnimNodeRelevancyStatus UpdateNodeRelevancy(const FAnimationUpdateContext &InContext, const FAnimNode_Base &InNode)
Definition AnimSubsystem_NodeRelevancy.cpp:54
ENGINE_API EAnimNodeInitializationStatus GetNodeInitializationStatus(const FAnimNode_Base &InNode) const
Definition AnimSubsystem_NodeRelevancy.cpp:101
ENGINE_API FAnimNodeRelevancyStatus GetNodeRelevancy(const FAnimNode_Base &InNode) const
Definition AnimSubsystem_NodeRelevancy.cpp:73
Definition AnimSubsystemInstance.h:10
Definition AnimNodeBase.h:354
Definition AnimTypes.h:144