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

#include <ProjectileMovementParabolic.h>

UProjectileMovementParabolicInterp에 대한 상속 다이어그램 :
Inheritance graph
UProjectileMovementParabolicInterp에 대한 협력 다이어그램:
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
 
virtual bool SampleFlightPosition (float Progress, FVector &OutPosition) const override
 
- UProjectileMovementBase(으)로부터 상속된 Public 멤버 함수
FORCEINLINE float GetElapsedTime () const
 
FORCEINLINE FVector GetCurrentVelocity () const
 

Public 속성

TObjectPtr< UCurveFloat > PositionCurve
 
float Duration = 1.f
 
float ArcHeight = 300.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 ActiveArcHeight = 0.f
 

추가로 상속된 멤버들

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

멤버 함수 문서화

◆ Activate()

void UProjectileMovementParabolicInterp::Activate ( const FVector &  InStart,
const FVector &  InTarget 
)
overridevirtual
46{
47 StartLocation = InStart;
48 EndLocation = InTarget;
49 TotalTime = FMath::Max(Duration, KINDA_SMALL_NUMBER);
50 ElapsedTime = 0.f;
52 CurrentVelocity = FVector::ZeroVector;
53}
FVector CurrentVelocity
Definition ProjectileMovementBase.h:34
float ElapsedTime
Definition ProjectileMovementBase.h:35
float ArcHeight
Definition ProjectileMovementParabolic.h:59
float TotalTime
Definition ProjectileMovementParabolic.h:64
float ActiveArcHeight
Definition ProjectileMovementParabolic.h:65
FVector StartLocation
Definition ProjectileMovementParabolic.h:62
float Duration
Definition ProjectileMovementParabolic.h:56
FVector EndLocation
Definition ProjectileMovementParabolic.h:63

다음을 참조함 : ActiveArcHeight, ArcHeight, UProjectileMovementBase::CurrentVelocity, Duration, UProjectileMovementBase::ElapsedTime, EndLocation, StartLocation, TotalTime.

◆ GetProjectileDuration()

virtual float UProjectileMovementParabolicInterp::GetProjectileDuration ( ) const
inlineoverridevirtual

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

48{ return Duration; }

◆ SampleFlightPosition()

bool UProjectileMovementParabolicInterp::SampleFlightPosition ( float  Progress,
FVector &  OutPosition 
) const
overridevirtual

발사 전 경로 검사에 사용합니다. 목표 지점까지의 궤적을 제공하지 않는 이동은 false를 반환합니다.

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

82{
83 const float Alpha = FMath::Clamp(Progress, 0.0f, 1.0f);
84 const float CurveAlpha = PositionCurve ? PositionCurve->GetFloatValue(Alpha) : Alpha;
85 OutPosition = FMath::Lerp(StartLocation, EndLocation, CurveAlpha);
86 OutPosition.Z += FMath::Sin(CurveAlpha * PI) * ActiveArcHeight;
87 return OutPosition.ContainsNaN() == false;
88}
TObjectPtr< UCurveFloat > PositionCurve
Definition ProjectileMovementParabolic.h:53

다음을 참조함 : ActiveArcHeight, EndLocation, PositionCurve, StartLocation.

다음에 의해서 참조됨 : Simulate().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ Simulate()

bool UProjectileMovementParabolicInterp::Simulate ( float  InDeltaTime,
AActor *  InOwner 
)
overridevirtual
57{
58 ElapsedTime += InDeltaTime;
59 const float Alpha = FMath::Clamp(ElapsedTime / TotalTime, 0.f, 1.f);
60
61 if (Alpha > (1.0f - KINDA_SMALL_NUMBER))
62 {
63 CurrentVelocity = FVector::ZeroVector;
64 InOwner->SetActorLocation(EndLocation, false);
65 return true;
66 }
67
68 FVector NewLocation;
69 SampleFlightPosition(Alpha, NewLocation);
70
71 const FVector PrevLocation = InOwner->GetActorLocation();
72 InOwner->SetActorLocation(NewLocation, true);
73
74 const FVector TravelDir = NewLocation - PrevLocation;
75 CurrentVelocity = TravelDir / InDeltaTime;
76
77 return false;
78}
virtual bool SampleFlightPosition(float Progress, FVector &OutPosition) const override
Definition ProjectileMovementParabolic.cpp:81

다음을 참조함 : UProjectileMovementBase::CurrentVelocity, UProjectileMovementBase::ElapsedTime, EndLocation, SampleFlightPosition(), TotalTime.

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ ActiveArcHeight

float UProjectileMovementParabolicInterp::ActiveArcHeight = 0.f
private

다음에 의해서 참조됨 : Activate(), SampleFlightPosition().

◆ ArcHeight

float UProjectileMovementParabolicInterp::ArcHeight = 300.f

다음에 의해서 참조됨 : Activate().

◆ Duration

float UProjectileMovementParabolicInterp::Duration = 1.f

다음에 의해서 참조됨 : Activate().

◆ EndLocation

FVector UProjectileMovementParabolicInterp::EndLocation = FVector::ZeroVector
private

다음에 의해서 참조됨 : Activate(), SampleFlightPosition(), Simulate().

◆ PositionCurve

TObjectPtr<UCurveFloat> UProjectileMovementParabolicInterp::PositionCurve

다음에 의해서 참조됨 : SampleFlightPosition().

◆ StartLocation

FVector UProjectileMovementParabolicInterp::StartLocation = FVector::ZeroVector
private

다음에 의해서 참조됨 : Activate(), SampleFlightPosition().

◆ TotalTime

float UProjectileMovementParabolicInterp::TotalTime = 1.f
private

다음에 의해서 참조됨 : Activate(), Simulate().


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