UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CommonAnimTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 AnimationTypes.h: Render core module definitions.
5=============================================================================*/
6
7#pragma once
8#include "CoreMinimal.h"
9#include "CommonAnimTypes.generated.h"
10
12USTRUCT()
14{
16
17 UPROPERTY(EditAnywhere, Category = "FAxis")
19
20 UPROPERTY(EditAnywhere, Category = "FAxis")
21 bool bInLocalSpace;
22
23 FAxis(const FVector& InAxis = FVector::ForwardVector)
24 : bInLocalSpace(true)
25 {
26 Axis = InAxis.GetSafeNormal();
27 };
28
31 {
32 if (bInLocalSpace)
33 {
34 return ComponentSpaceTransform.TransformVectorNoScale(Axis);
35 }
36
37 // if world transform, we don't have to transform
38 return Axis;
39 }
40
43 {
44 Axis = Axis.GetSafeNormal();
45 }
46
48 bool IsValid() const
49 {
50 return Axis.IsNormalized();
51 }
52
54 {
55 Ar << D.Axis;
56 Ar << D.bInLocalSpace;
57
58 return Ar;
59 }
60};
61
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
Definition Archive.h:1208
Definition CommonAnimTypes.h:14
FVector GetTransformedAxis(const FTransform &ComponentSpaceTransform) const
Definition CommonAnimTypes.h:30
friend FArchive & operator<<(FArchive &Ar, FAxis &D)
Definition CommonAnimTypes.h:53
bool IsValid() const
Definition CommonAnimTypes.h:48
void Initialize()
Definition CommonAnimTypes.h:42