UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TransformNoScale.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "CoreTypes.h"
7#include "Math/MathFwd.h"
8#include "Math/Quat.h"
9#include "Math/Transform.h"
10#include "Math/Vector.h"
12
13#include "TransformNoScale.generated.h"
14
15USTRUCT(BlueprintType)
17{
19
20
24
30
32 : Location(InLocation)
34 {
35 }
36
38 : Location(InTransform.GetLocation())
39 , Rotation(InTransform.GetRotation())
40 {
41 }
42
43 inline FTransformNoScale& operator =(const FTransform& InTransform)
44 {
45 FromFTransform(InTransform);
46 return *this;
47 }
48
49 inline operator FTransform() const
50 {
51 return ToFTransform();
52 }
53
55 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Transform")
56 FVector Location;
57
59 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Transform")
61
63 inline FTransform ToFTransform() const
64 {
65 return FTransform(Rotation, Location, FVector::OneVector);
66 }
67
70 {
71 Location = InTransform.GetLocation();
72 Rotation = InTransform.GetRotation();
73 }
74};
@ ForceInitToZero
Definition CoreMiscDefines.h:156
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::Math::TTransform< double > FTransform
Definition MathFwd.h:53
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
Definition TransformNoScale.h:17
FTransformNoScale(const FTransform &InTransform)
Definition TransformNoScale.h:37
void FromFTransform(const FTransform &InTransform)
Definition TransformNoScale.h:69
FTransformNoScale(const FVector &InLocation, const FQuat &InRotation)
Definition TransformNoScale.h:31
static CORE_API const TVector< double > OneVector
Definition Vector.h:82