KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
FParabolaBallisticTrack 구조체 참조

물리 기반(초기 속도/중력) 포물선을 계산하는 트랙. 더 자세히 ...

#include <UParabolaComponent.h>

+ FParabolaBallisticTrack에 대한 협력 다이어그램:

Public 멤버 함수

FORCEINLINE void Advance (float DeltaTime)
 지정한 델타만큼 시간을 진행한다.
 
void ApplyArcSolution (const FVector &InStart, const FVector &InEnd, float t)
 시작/도착점과 시간으로 트랙 파라미터를 초기화한다.
 
FORCEINLINE FVector EvaluateAtAlpha (const AActor *Owner, float Alpha) const
 알파값 기반 위치를 계산한다.
 
FORCEINLINE FVector EvaluateAtCurrent (const AActor *Owner) const
 현재 시간 기준 위치를 계산한다.
 
FVector EvaluateAtTime (const AActor *, float TimeSec) const
 시간값을 받아 포물선 위치를 계산한다.
 
FORCEINLINE float GetAlpha () const
 현재 경과 시간의 알파를 반환한다.
 
FORCEINLINE FVector GetInitialVelocity () const
 방향/파워 조합으로부터 초기 속도를 계산한다.
 
 UPROPERTY (EditAnywhere, BlueprintReadWrite) FVector Start
 

정적 Public 멤버 함수

static FVector SolveV0ForArc (const FVector &InStart, const FVector &InEnd, float t, float InGravityZ=-980.f)
 목표 위치와 비행 시간으로 초기 속도를 역산한다.
 
static void SplitVelocity (const FVector &V0, FVector &OutDir, float &OutPow)
 속도를 방향과 크기로 분해한다.
 

상세한 설명

물리 기반(초기 속도/중력) 포물선을 계산하는 트랙.

UParabolaComponent.h 파일의 29 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ Advance()

FORCEINLINE void FParabolaBallisticTrack::Advance ( float  DeltaTime)
inline

지정한 델타만큼 시간을 진행한다.

UParabolaComponent.h 파일의 53 번째 라인에서 정의되었습니다.

54 {
55 CurrentTime = FMath::Min(CurrentTime + FMath::Max(0.f, DeltaTime), FMath::Max(0.001f, Duration));
56 }

◆ ApplyArcSolution()

void FParabolaBallisticTrack::ApplyArcSolution ( const FVector &  InStart,
const FVector &  InEnd,
float  t 
)
inline

시작/도착점과 시간으로 트랙 파라미터를 초기화한다.

UParabolaComponent.h 파일의 105 번째 라인에서 정의되었습니다.

106 {
107 Start = InStart;
108 Duration = FMath::Max(0.001f, t);
109 const FVector V0 = SolveV0ForArc(InStart, InEnd, Duration, GravityZ);
110 SplitVelocity(V0, Direction, Power);
111 ResetTime();
112 }
static void SplitVelocity(const FVector &V0, FVector &OutDir, float &OutPow)
속도를 방향과 크기로 분해한다.
static FVector SolveV0ForArc(const FVector &InStart, const FVector &InEnd, float t, float InGravityZ=-980.f)
목표 위치와 비행 시간으로 초기 속도를 역산한다.

◆ EvaluateAtAlpha()

FORCEINLINE FVector FParabolaBallisticTrack::EvaluateAtAlpha ( const AActor *  Owner,
float  Alpha 
) const
inline

알파값 기반 위치를 계산한다.

UParabolaComponent.h 파일의 79 번째 라인에서 정의되었습니다.

80 {
81 return EvaluateAtTime(Owner, Alpha * FMath::Max(0.001f, Duration));
82 }
FVector EvaluateAtTime(const AActor *, float TimeSec) const
시간값을 받아 포물선 위치를 계산한다.

◆ EvaluateAtCurrent()

FORCEINLINE FVector FParabolaBallisticTrack::EvaluateAtCurrent ( const AActor *  Owner) const
inline

현재 시간 기준 위치를 계산한다.

UParabolaComponent.h 파일의 85 번째 라인에서 정의되었습니다.

86 {
87 return EvaluateAtTime(Owner, CurrentTime);
88 }

◆ EvaluateAtTime()

FVector FParabolaBallisticTrack::EvaluateAtTime ( const AActor *  ,
float  TimeSec 
) const
inline

시간값을 받아 포물선 위치를 계산한다.

UParabolaComponent.h 파일의 66 번째 라인에서 정의되었습니다.

67 {
68 const float t = FMath::Clamp(TimeSec, 0.f, FMath::Max(0.001f, Duration));
69 const FVector g(0,0,GravityZ);
70 const FVector V0 = GetInitialVelocity();
71
72 FVector P = Start + V0 * t + 0.5f * g * t * t;
73 if (bLockZ)
74 P.Z = LockedZ;
75 return P;
76 }
FORCEINLINE FVector GetInitialVelocity() const
방향/파워 조합으로부터 초기 속도를 계산한다.

◆ GetAlpha()

FORCEINLINE float FParabolaBallisticTrack::GetAlpha ( ) const
inline

현재 경과 시간의 알파를 반환한다.

UParabolaComponent.h 파일의 51 번째 라인에서 정의되었습니다.

51{ return FMath::Clamp(CurrentTime / FMath::Max(0.001f, Duration), 0.f, 1.f); }

◆ GetInitialVelocity()

FORCEINLINE FVector FParabolaBallisticTrack::GetInitialVelocity ( ) const
inline

방향/파워 조합으로부터 초기 속도를 계산한다.

UParabolaComponent.h 파일의 60 번째 라인에서 정의되었습니다.

61 {
62 return Direction.GetSafeNormal() * Power;
63 }

◆ SolveV0ForArc()

static FVector FParabolaBallisticTrack::SolveV0ForArc ( const FVector &  InStart,
const FVector &  InEnd,
float  t,
float  InGravityZ = -980.f 
)
inlinestatic

목표 위치와 비행 시간으로 초기 속도를 역산한다.

UParabolaComponent.h 파일의 92 번째 라인에서 정의되었습니다.

93 {
94 return FMathHelper::SolveV0ForProjectile( InStart, InEnd, t, InGravityZ );
95 }
static FVector SolveV0ForProjectile(const FVector &Start, const FVector &End, float Time, float GravityZ=-980.f)
주어진 시간 안에 목표 지점에 도달하기 위한 초기 속도를 계산합니다.
Definition FMathHelper.h:24

다음을 참조함 : FMathHelper::SolveV0ForProjectile().

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

◆ SplitVelocity()

static void FParabolaBallisticTrack::SplitVelocity ( const FVector &  V0,
FVector &  OutDir,
float &  OutPow 
)
inlinestatic

속도를 방향과 크기로 분해한다.

UParabolaComponent.h 파일의 98 번째 라인에서 정의되었습니다.

99 {
100 OutPow = V0.Length();
101 OutDir = (OutPow > SMALL_NUMBER) ? V0 / OutPow : FVector(1,0,0);
102 }

◆ UPROPERTY()

FParabolaBallisticTrack::UPROPERTY ( EditAnywhere  ,
BlueprintReadWrite   
)
inline

UParabolaComponent.h 파일의 34 번째 라인에서 정의되었습니다.

49 { CurrentTime = 0.f; }

이 구조체에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: