Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UProjectileMovementLinearInterp 클래스 참조

#include <ProjectileMovementLinear.h>

UProjectileMovementLinearInterp에 대한 상속 다이어그램 :
Inheritance graph
UProjectileMovementLinearInterp에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

virtual void Activate (const FVector &InStart, const FVector &InTarget) override
 
virtual bool Simulate (float InDeltaTime, AActor *InOwner) override
 
virtual float GetProjectileDuration () const override
 
- UProjectileMovementBase(으)로부터 상속된 Public 멤버 함수
FORCEINLINE FVector GetCurrentVelocity () const
 

Public 속성

TObjectPtr< UCurveFloat > PositionCurve
 
float Duration = 1.f
 
- UProjectileMovementBase(으)로부터 상속된 Public 속성
virtual void virtual Activate(const FVector &InStart, const FVector &InDirectionOrTarget) PURE_VIRTUAL(UProjectileMovementBase bool Simulate (float InDeltaTime, AActor *InOwner) PURE_VIRTUAL(UProjectileMovementBase
 

Private 속성

FVector StartLocation = FVector::ZeroVector
 
FVector EndLocation = FVector::ZeroVector
 
float TotalTime = 1.f
 
float ElapsedTime = 0.f
 

추가로 상속된 멤버들

- UProjectileMovementBase(으)로부터 상속된 Protected 속성
FVector CurrentVelocity = FVector::ZeroVector
 

멤버 함수 문서화

◆ Activate()

void UProjectileMovementLinearInterp::Activate ( const FVector &  InStart,
const FVector &  InTarget 
)
overridevirtual
25{
26 StartLocation = InStart;
27 EndLocation = InTarget;
28 TotalTime = FMath::Max(Duration, KINDA_SMALL_NUMBER);
29 ElapsedTime = 0.f;
30 CurrentVelocity = FVector::ZeroVector;
31}
FVector CurrentVelocity
Definition ProjectileMovementBase.h:28
float Duration
Definition ProjectileMovementLinear.h:46
FVector StartLocation
Definition ProjectileMovementLinear.h:49
float TotalTime
Definition ProjectileMovementLinear.h:51
FVector EndLocation
Definition ProjectileMovementLinear.h:50
float ElapsedTime
Definition ProjectileMovementLinear.h:52

◆ GetProjectileDuration()

virtual float UProjectileMovementLinearInterp::GetProjectileDuration ( ) const
inlineoverridevirtual

UProjectileMovementBase(으)로부터 재구현되었습니다.

39{ return Duration; }

◆ Simulate()

bool UProjectileMovementLinearInterp::Simulate ( float  InDeltaTime,
AActor *  InOwner 
)
overridevirtual
35{
36 ElapsedTime += InDeltaTime;
37 const float Alpha = FMath::Clamp(ElapsedTime / TotalTime, 0.f, 1.f);
38
39 if (Alpha > (1.0f - KINDA_SMALL_NUMBER))
40 {
41 CurrentVelocity = FVector::ZeroVector;
42 InOwner->SetActorLocation(EndLocation, false);
43 return true;
44 }
45
46 const float CurveAlpha = PositionCurve ? PositionCurve->GetFloatValue(Alpha) : Alpha;
47 const FVector NewLocation = FMath::Lerp(StartLocation, EndLocation, CurveAlpha);
48 const FVector PrevLocation = InOwner->GetActorLocation();
49 InOwner->SetActorLocation(NewLocation, true);
50
51 const FVector TravelDir = NewLocation - PrevLocation;
52 CurrentVelocity = TravelDir / InDeltaTime;
53
54 return false;
55}
TObjectPtr< UCurveFloat > PositionCurve
Definition ProjectileMovementLinear.h:43

멤버 데이터 문서화

◆ Duration

float UProjectileMovementLinearInterp::Duration = 1.f

◆ ElapsedTime

float UProjectileMovementLinearInterp::ElapsedTime = 0.f
private

◆ EndLocation

FVector UProjectileMovementLinearInterp::EndLocation = FVector::ZeroVector
private

◆ PositionCurve

TObjectPtr<UCurveFloat> UProjectileMovementLinearInterp::PositionCurve

◆ StartLocation

FVector UProjectileMovementLinearInterp::StartLocation = FVector::ZeroVector
private

◆ TotalTime

float UProjectileMovementLinearInterp::TotalTime = 1.f
private

이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: