Files
UnrealEngineUWP/Engine/Source/Runtime/MovieScene/Public/TransformData.h
Marc Audy a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00

50 lines
1.2 KiB
C

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Components/SceneComponent.h"
/**
* Stores information about a transform for the purpose of adding keys to a transform section
*/
struct MOVIESCENE_API FTransformData
{
/** Translation component */
FVector Translation;
/** Rotation component */
FRotator Rotation;
/** Scale component */
FVector Scale;
FTransformData()
: Translation(ForceInitToZero)
, Rotation(ForceInitToZero)
, Scale(ForceInitToZero)
{}
/**
* Constructor. Builds the data from a scene component
* Uses relative transform only
*
* @param InComponent The component to build from
*/
FTransformData(const USceneComponent* InComponent)
: Translation(InComponent->GetRelativeLocation())
, Rotation(InComponent->GetRelativeRotation())
, Scale(InComponent->GetRelativeScale3D())
{}
FTransformData(const FTransform& InTransform)
: Translation(InTransform.GetTranslation())
, Rotation(InTransform.GetRotation().Rotator())
, Scale(InTransform.GetScale3D())
{}
FTransformData(const FVector& InTranslation, const FRotator& InRotation, const FVector& InScale)
: Translation(InTranslation)
, Rotation(InRotation)
, Scale(InScale)
{}
};