F의 의미
F는 언리얼 엔진에서 **"Framework" 또는 "Float 기반"**을 나타냅니다.
FVector는 3D 벡터를 표현하는 구조체로, 내부적으로 X, Y, Z 좌표를 float 타입으로 저장합니다.
FVector의 F가 float의 f겠거니 하면서 GPT한테 물어봤다.
- FVector::ForwardVector : (1, 0, 0)
- FVector::BackwardVector : (-1, 0, 0)
- FVector::UpVector : (0, 0, 1)
- FVector::DownVector : (0, 0, -1)
- FVector::RightVector : (0, 1, 0)
- FVector::LeftVector : (0, -1, 0)
- FVector::ZeroVector : (0, 0, 0)
- FVector::OneVector : (1, 1, 1)
- FVector::XAxisVector : (1, 0, 0)
- FVector::YAxisVector : (0, 1, 0)
- FVector::ZAxisVector : (0, 0, 1)
사실 이런건 문서를 안봐도 찍어서 맞출 법도 하다. 그러나 굉장히 중요하다.
FVector(float InX, float InY, float InZ);
FVector(float InValue); // 모든 축을 동일한 값으로 초기화
FVector의 생성자
FVector();
FVector(float InX, float InY, float InZ);
FVector(float InValue);
FVector(const FVector& Other);
거리 계산
Dist(const TVector<T> &V1, const TVector<T> &V2);
Distance(const TVector<T> &V1, const TVector<T> &V2) { return Dist(V1, V2); }
Length();
SquaredLength();