UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VectorUtil.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "MathUtil.h"
6#include "VectorTypes.h"
7#include "Math/Transform.h"
8
16
18{
19 Empty,
20 Point,
21 Segment,
22 Line,
23 Polygon,
24 Plane,
27};
28
29namespace UE
30{
31namespace Geometry
32{
33 using namespace UE::Math;
34
35namespace VectorUtil
36{
37
41 template <typename RealType>
46
50 template <typename RealType>
55
56
60 template <typename RealType>
61 inline RealType Clamp(RealType Value, RealType MinValue, RealType MaxValue)
62 {
63 return (Value < MinValue) ? MinValue : ((Value > MaxValue) ? MaxValue : Value);
64 }
65
69 template <typename RealType>
71 {
72 TVector<RealType> edge1(V1 - V0);
73 TVector<RealType> edge2(V2 - V0);
74 // Unreal has Left-Hand Coordinate System so we need to reverse this cross-product to get proper triangle normal
76 return Normalized(vCross);
77 }
78
82 template <typename RealType>
84 {
85 // Unreal has Left-Hand Coordinate System so we need to reverse this cross-product to get proper triangle normal
86 return (V2 - V0).Cross(V1 - V0);
87 }
88
92 template <typename RealType>
93 inline RealType Area(const TVector<RealType>& V0, const TVector<RealType>& V1, const TVector<RealType>& V2)
94 {
95 TVector<RealType> Edge1(V1 - V0);
96 TVector<RealType> Edge2(V2 - V0);
98 return (RealType)0.5 * Cross.Length();
99 }
100
104 template <typename RealType>
105 inline RealType Area(const TVector2<RealType>& V0, const TVector2<RealType>& V1, const TVector2<RealType>& V2)
106 {
107 TVector2<RealType> Edge1(V1 - V0);
108 TVector2<RealType> Edge2(V2 - V0);
109 RealType CrossZ = DotPerp(Edge1, Edge2);
110 return (RealType)0.5 * TMathUtil<RealType>::Abs(CrossZ);
111 }
112
116 template <typename RealType>
117 inline RealType SignedArea(const TVector2<RealType>& V0, const TVector2<RealType>& V1, const TVector2<RealType>& V2)
118 {
119 return ((RealType)0.5) * ((V0.X * V1.Y - V0.Y * V1.X) + (V1.X * V2.Y - V1.Y * V2.X) + (V2.X * V0.Y - V2.Y * V0.X));
120 }
121
125 template <typename RealType>
126 inline bool IsObtuse(const TVector<RealType>& V1, const TVector<RealType>& V2, const TVector<RealType>& V3)
127 {
128 RealType a2 = DistanceSquared(V1, V2);
129 RealType b2 = DistanceSquared(V1, V3);
130 RealType c2 = DistanceSquared(V2, V3);
131 return (a2 + b2 < c2) || (b2 + c2 < a2) || (c2 + a2 < b2);
132 }
133
138 template <typename RealType>
140 {
141 TVector<RealType> edge1(V1 - V0);
142 TVector<RealType> edge2(V2 - V0);
143 // Unreal has Left-Hand Coordinate System so we need to reverse this cross-product to get proper triangle normal
145 AreaOut = RealType(0.5) * Normalize(vCross);
146 return vCross;
147 }
148
150 template <typename RealType>
151 inline bool EpsilonEqual(RealType A, RealType B, RealType Epsilon)
152 {
153 return TMathUtil<RealType>::Abs(A - B) <= Epsilon;
154 }
155
157 template <typename RealType>
158 inline bool EpsilonEqual(const TVector2<RealType>& V0, const TVector2<RealType>& V1, RealType Epsilon)
159 {
160 return EpsilonEqual(V0.X, V1.X, Epsilon) && EpsilonEqual(V0.Y, V1.Y, Epsilon);
161 }
162
164 template <typename RealType>
165 inline bool EpsilonEqual(const TVector<RealType>& V0, const TVector<RealType>& V1, RealType Epsilon)
166 {
167 return EpsilonEqual(V0.X, V1.X, Epsilon) && EpsilonEqual(V0.Y, V1.Y, Epsilon) && EpsilonEqual(V0.Z, V1.Z, Epsilon);
168 }
169
171 template <typename RealType>
172 inline bool EpsilonEqual(const TVector4<RealType>& V0, const TVector4<RealType>& V1, RealType Epsilon)
173 {
174 return EpsilonEqual(V0.X, V1.X, Epsilon) && EpsilonEqual(V0.Y, V1.Y, Epsilon) && EpsilonEqual(V0.Z, V1.Z, Epsilon) && EpsilonEqual(V0.W, V1.W, Epsilon);
175 }
176
177
179 template <typename ValueVecType>
180 inline int Min3Index(const ValueVecType& Vector3)
181 {
182 if (Vector3[0] <= Vector3[1])
183 {
184 return Vector3[0] <= Vector3[2] ? 0 : 2;
185 }
186 else
187 {
188 return (Vector3[1] <= Vector3[2]) ? 1 : 2;
189 }
190 }
191
193 template <typename ValueVecType>
194 inline int Max3Index(const ValueVecType& Vector3)
195 {
196 if (Vector3[0] >= Vector3[1])
197 {
198 return Vector3[0] >= Vector3[2] ? 0 : 2;
199 }
200 else
201 {
202 return (Vector3[1] >= Vector3[2]) ? 1 : 2;
203 }
204 }
205
206
210 template <typename RealType>
212 {
213 // Duff et al method, from https://graphics.pixar.com/library/OrthonormalB/paper.pdf
214 if (Normal.Z < (RealType)0)
215 {
216 RealType A = (RealType)1 / ((RealType)1 - Normal.Z);
217 RealType B = Normal.X * Normal.Y * A;
218 OutPerp1.X = (RealType)1 - Normal.X * Normal.X * A;
219 OutPerp1.Y = -B;
220 OutPerp1.Z = Normal.X;
221 OutPerp2.X = B;
222 OutPerp2.Y = Normal.Y * Normal.Y * A - (RealType)1;
223 OutPerp2.Z = -Normal.Y;
224 }
225 else
226 {
227 RealType A = (RealType)1 / ((RealType)1 + Normal.Z);
228 RealType B = -Normal.X * Normal.Y * A;
229 OutPerp1.X = (RealType)1 - Normal.X * Normal.X * A;
230 OutPerp1.Y = B;
231 OutPerp1.Z = -Normal.X;
232 OutPerp2.X = B;
233 OutPerp2.Y = (RealType)1 - Normal.Y * Normal.Y * A;
234 OutPerp2.Z = -Normal.Y;
235 }
236 }
237
241 template <typename RealType>
243 {
244 // Duff et al method, from https://graphics.pixar.com/library/OrthonormalB/paper.pdf
246 if (Normal.Z < (RealType)0)
247 {
248 RealType A = (RealType)1 / ((RealType)1 - Normal.Z);
249 RealType B = Normal.X * Normal.Y * A;
250 OutPerp1.X = (RealType)1 - Normal.X * Normal.X * A;
251 OutPerp1.Y = -B;
252 OutPerp1.Z = Normal.X;
253 }
254 else
255 {
256 RealType A = (RealType)1 / ((RealType)1 + Normal.Z);
257 RealType B = -Normal.X * Normal.Y * A;
258 OutPerp1.X = (RealType)1 - Normal.X * Normal.X * A;
259 OutPerp1.Y = B;
260 OutPerp1.Z = -Normal.X;
261 }
262 return OutPerp1;
263 }
264
268 template <typename RealType>
273
274
279 template <typename RealType>
281 {
285 Normalize(vTo);
287 if (C.SquaredLength() < TMathUtil<RealType>::ZeroTolerance)
288 { // vectors are parallel
289 return vFrom.Dot(vTo) < 0 ? (RealType)180 : (RealType)0;
290 }
291 RealType fSign = C.Dot(PlaneN) < 0 ? (RealType)-1 : (RealType)1;
292 return (RealType)(fSign * AngleD(vFrom, vTo));
293 }
294
299 template <typename RealType>
301 {
305 Normalize(vTo);
307 if (C.SquaredLength() < TMathUtil<RealType>::ZeroTolerance)
308 { // vectors are parallel
309 return vFrom.Dot(vTo) < 0 ? TMathUtil<RealType>::Pi : (RealType)0;
310 }
311 RealType fSign = C.Dot(PlaneN) < 0 ? (RealType)-1 : (RealType)1;
312 return (RealType)(fSign * AngleR(vFrom, vTo));
313 }
314
319 template <typename RealType>
321 {
322 RealType cosAngle = A.Dot(B);
323 RealType sqr = ((RealType)1 - cosAngle) / ((RealType)1 + cosAngle);
324 sqr = Clamp(sqr, (RealType)0, TMathUtil<RealType>::MaxReal);
326 }
327
332 template <typename RealType>
334 {
335 RealType cosAngle = A.Dot(B);
336 RealType sqr = ((RealType)1 - cosAngle) / ((RealType)1 + cosAngle);
337 sqr = Clamp(sqr, (RealType)0, TMathUtil<RealType>::MaxReal);
339 }
340
346 template <typename RealType>
347 RealType VectorCot(const TVector<RealType>& V1, const TVector<RealType>& V2)
348 {
349 // formula from http://www.geometry.caltech.edu/pubs/DMSB_III.pdf
350 RealType fDot = V1.Dot(V2);
351 RealType lensqr1 = V1.SquaredLength();
352 RealType lensqr2 = V2.SquaredLength();
353 RealType d = Clamp(lensqr1 * lensqr2 - fDot * fDot, (RealType)0.0, TMathUtil<RealType>::MaxReal);
355 {
356 return (RealType)0;
357 }
358 else
359 {
361 }
362 }
363
370 template <typename RealType>
372 {
373 TVector<RealType> kV02 = V0 - V2;
374 TVector<RealType> kV12 = V1 - V2;
376 RealType fM00 = kV02.Dot(kV02);
377 RealType fM01 = kV02.Dot(kV12);
378 RealType fM11 = kV12.Dot(kV12);
379 RealType fR0 = kV02.Dot(kPV2);
380 RealType fR1 = kV12.Dot(kPV2);
381 RealType fDet = fM00 * fM11 - fM01 * fM01;
382 RealType fInvDet = 1.0 / fDet;
383 RealType fBary1 = (fM11 * fR0 - fM01 * fR1) * fInvDet;
384 RealType fBary2 = (fM00 * fR1 - fM01 * fR0) * fInvDet;
385 RealType fBary3 = 1.0 - fBary1 - fBary2;
387 }
388
395 template <typename RealType>
397 {
398 TVector2<RealType> kV02 = V0 - V2;
399 TVector2<RealType> kV12 = V1 - V2;
401 RealType fM00 = kV02.Dot(kV02);
402 RealType fM01 = kV02.Dot(kV12);
403 RealType fM11 = kV12.Dot(kV12);
404 RealType fR0 = kV02.Dot(kPV2);
405 RealType fR1 = kV12.Dot(kPV2);
406 RealType fDet = fM00 * fM11 - fM01 * fM01;
407 RealType fInvDet = (RealType)1.0 / fDet;
408 RealType fBary1 = (fM11 * fR0 - fM01 * fR1) * fInvDet;
409 RealType fBary2 = (fM00 * fR1 - fM01 * fR0) * fInvDet;
410 RealType fBary3 = (RealType)1.0 - fBary1 - fBary2;
412 }
413
420 template<typename RealType>
422 {
423 checkSlow(R1 >= 0);
424 RealType SqrtR1 = FMath::Sqrt(R1);
425 return TVector<RealType>(1 - SqrtR1, SqrtR1 * (1 - R2), SqrtR1 * R2);
426 }
427
434 template<typename RealType>
436 {
437 // reflect samples that would go outside the triangle
438 if (R1 + R2 > (RealType)1)
439 {
440 R1 = (RealType)1 - R1;
441 R2 = (RealType)1 - R2;
442 }
443 return A + R1 * (B - A) + R2 * (C - A);
444 }
445
452 template<typename RealType>
454 {
455 // reflect samples that would go outside the triangle
456 if (R1 + R2 > (RealType)1)
457 {
458 R1 = (RealType)1 - R1;
459 R2 = (RealType)1 - R2;
460 }
461 return A + R1 * (B - A) + R2 * (C - A);
462 }
463
467 template <typename RealType>
469 {
470 // Formula from https://igl.ethz.ch/projects/winding-number/
471 A -= P;
472 B -= P;
473 C -= P;
474 RealType la = A.Length(), lb = B.Length(), lc = C.Length();
475 RealType top = (la * lb * lc) + A.Dot(B) * lc + B.Dot(C) * la + C.Dot(A) * lb;
476 RealType bottom = A.X * (B.Y * C.Z - C.Y * B.Z) - A.Y * (B.X * C.Z - C.X * B.Z) + A.Z * (B.X * C.Y - C.X * B.Y);
477 // -2 instead of 2 to account for UE winding
478 return RealType(-2.0) * atan2(bottom, top);
479 }
480
481
487 template <typename RealType>
489 {
490 // recenter (better for precision)
491 TVector<RealType> Centroid = (Vi + Vj + Vk) / (RealType)3;
492 Vi -= Centroid; Vj -= Centroid; Vk -= Centroid;
493 // calculate tangent-normal frame
494 TVector<RealType> Normal = VectorUtil::Normal<RealType>(Vi, Vj, Vk);
496 VectorUtil::MakePerpVectors<RealType>(Normal, Perp0, Perp1);
497 // project points to triangle plane coordinates
498 TVector2<RealType> vi(Vi.Dot(Perp0), Vi.Dot(Perp1));
499 TVector2<RealType> vj(Vj.Dot(Perp0), Vj.Dot(Perp1));
500 TVector2<RealType> vk(Vk.Dot(Perp0), Vk.Dot(Perp1));
501 // calculate gradient
503 // map back to 3D vector in triangle plane
504 RealType AreaScale = (RealType)1 / ((RealType)2 * VectorUtil::Area<RealType>(Vi, Vj, Vk));
505 return AreaScale * (GradX.X * Perp0 + GradX.Y * Perp1);
506 }
507
508
509
513 template<typename RealType>
515 {
516 A -= P;
517 Normalize(A);
518 B -= P;
519 Normalize(B);
520 return AngleD(A, B);
521 }
522
529 template <typename RealType>
531 {
532 return FMath::Atan2( Edge | (Normal0 ^ Normal1), Normal0 | Normal1 );
533 }
534
538 template<typename RealType>
540 {
541 // Compute in offset space w/ A translated to origin
542 TVector2<RealType> AB = B - A;
544
545 RealType Denom = 2 * DotPerp(AB,AC);
546 if (FMath::Abs(Denom) <= Epsilon)
547 {
548 // degenerate (flat) triangle does not have a (finite) circumcenter ...
549 // we'll just fall back to the centroid in this case
550 return A + (AB + AC) * RealType(1.0/3.0);
551 }
552 RealType ABLenSq = AB.SquaredLength();
553 RealType ACLenSq = AC.SquaredLength();
555 A.X + (AC.Y * ABLenSq - AB.Y * ACLenSq) / Denom,
556 A.Y + (AB.X * ACLenSq - AC.X * ABLenSq) / Denom
557 );
558 return Center;
559 }
560
561
562 /*
563 * @return incircle / circumcircle radii ratio of triangle ABC
564 */
565 template <typename RealType>
567 {
568 const RealType EAB = (A - B).Length();
569 const RealType EBC = (B - C).Length();
570 const RealType ECA = (C - A).Length();
571
572 const RealType SP = RealType(0.5) * (EAB + EBC + ECA); // Semiperimeter
573 const RealType Area = FMath::Sqrt(FMath::Max(RealType(0.), SP * (SP - EAB) * (SP - EBC) * (SP - ECA))); // Heron
574 const RealType IncircleRadius = Area / SP;
575 const RealType CircumcircleRadius = EAB * EBC * ECA / (RealType(4.) * Area);
576
578 }
579
583 template<typename RealType>
585 {
586 // following math from RenderUtils.h::GetBasisDeterminantSign()
587 RealType Cross00 = BitangentIn.Y*NormalIn.Z - BitangentIn.Z*NormalIn.Y;
588 RealType Cross10 = BitangentIn.Z*NormalIn.X - BitangentIn.X*NormalIn.Z;
589 RealType Cross20 = BitangentIn.X*NormalIn.Y - BitangentIn.Y*NormalIn.X;
590 RealType Determinant = TangentIn.X*Cross00 + TangentIn.Y*Cross10 + TangentIn.Z*Cross20;
591 return (Determinant < 0) ? (RealType)-1 : (RealType)1;
592 }
593
597 template<typename RealType>
599 {
601 NormalIn.Y*TangentIn.Z - NormalIn.Z*TangentIn.Y,
602 NormalIn.Z*TangentIn.X - NormalIn.X*TangentIn.Z,
603 NormalIn.X*TangentIn.Y - NormalIn.Y*TangentIn.X);
604 }
605
609 template<typename RealType>
614
618 template<typename RealType>
620 {
621 return NormalIn.Cross(TangentIn);
622 }
623
625 inline double AspectRatio(const FVector3d& v1, const FVector3d& v2, const FVector3d& v3)
626 {
627 double a = Distance(v1, v2), b = Distance(v2, v3), c = Distance(v3, v1);
628 double s = (a + b + c) / 2.0;
629 return (a * b * c) / (8.0 * (s - a) * (s - b) * (s - c));
630 }
631
632
633 template<typename RealType>
635 {
636 const TVector<RealType>& S = Transform.GetScale3D();
637 RealType DetSign = FMathd::SignNonZero(S.X * S.Y * S.Z); // we only need to multiply by the sign of the determinant, rather than divide by it, since we normalize later anyway
638 TVector<RealType> SafeInvS(S.Y * S.Z * DetSign, S.X * S.Z * DetSign, S.X * S.Y * DetSign);
639 return Transform.TransformVectorNoScale(Normalized(SafeInvS * Normal));
640 }
641
642
643 template<typename RealType>
645 {
646 return Normalized(Transform.GetScale3D() * Transform.InverseTransformVectorNoScale(Normal));
647 }
648
649}; // namespace VectorUtil
650
651
652
657template<typename RealType>
658RealType SnapToIncrement(RealType Value, RealType Increment, RealType Offset = 0)
659{
660 if (!FMath::IsFinite(Value))
661 {
662 return (RealType)0;
663 }
664 Value -= Offset;
665 RealType ValueSign = FMath::Sign(Value);
666 Value = FMath::Abs(Value);
667 int64 IntegerIncrement = (int64)(Value / Increment);
668 RealType Remainder = (RealType)fmod(Value, Increment);
669 if (Remainder > Increment / 2.0)
670 {
672 }
673 return ValueSign * (RealType)IntegerIncrement * Increment + Offset;
674}
675
676
677
678} // end namespace Geometry
679} // end namespace UE
@ Normal
Definition AndroidInputInterface.h:116
#define checkSlow(expr)
Definition AssertionMacros.h:332
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EIntersectionResult
Definition VectorUtil.h:10
EIntersectionType
Definition VectorUtil.h:18
uint32 Offset
Definition VulkanMemory.cpp:4033
Definition MathUtil.h:150
static bool IsFinite(const RealType Value)
Definition MathUtil.h:208
static RealType Sqrt(const RealType Value)
Definition MathUtil.h:342
static RealType Abs(const RealType Value)
Definition MathUtil.h:215
static RealType SignNonZero(const RealType Value)
Definition MathUtil.h:240
TVector< RealType > TransformNormal(const TTransform< RealType > &Transform, const TVector< RealType > &Normal)
Definition VectorUtil.h:634
RealType BitangentSign(const TVector< RealType > &NormalIn, const TVector< RealType > &TangentIn, const TVector< RealType > &BitangentIn)
Definition VectorUtil.h:584
TVector< RealType > BitangentFromTangent(const TVector< RealType > &NormalIn, const TVector< RealType > &TangentIn)
Definition VectorUtil.h:619
double AspectRatio(const FVector3d &v1, const FVector3d &v2, const FVector3d &v3)
Definition VectorUtil.h:625
TVector< RealType > BarycentricCoords(const TVector< RealType > &Point, const TVector< RealType > &V0, const TVector< RealType > &V1, const TVector< RealType > &V2)
Definition VectorUtil.h:371
RealType TriangleRegularity(const TVector< RealType > &A, const TVector< RealType > &B, const TVector< RealType > &C)
Definition VectorUtil.h:566
RealType VectorCot(const TVector< RealType > &V1, const TVector< RealType > &V2)
Definition VectorUtil.h:347
RealType PlaneAngleSignedD(const TVector< RealType > &VFrom, const TVector< RealType > &VTo, const TVector< RealType > &PlaneN)
Definition VectorUtil.h:280
TVector< RealType > UniformSampleTriangleBarycentricCoords(RealType R1, RealType R2)
Definition VectorUtil.h:421
RealType TriSolidAngle(TVector< RealType > A, TVector< RealType > B, TVector< RealType > C, const TVector< RealType > &P)
Definition VectorUtil.h:468
TVector< RealType > Bitangent(const TVector< RealType > &NormalIn, const TVector< RealType > &TangentIn, RealType BitangentSign)
Definition VectorUtil.h:598
RealType VectorTanHalfAngle(const TVector< RealType > &A, const TVector< RealType > &B)
Definition VectorUtil.h:320
bool EpsilonEqual(RealType A, RealType B, RealType Epsilon)
Definition VectorUtil.h:151
RealType PlaneAngleSignedR(const TVector< RealType > &VFrom, const TVector< RealType > &VTo, const TVector< RealType > &PlaneN)
Definition VectorUtil.h:300
RealType SignedArea(const TVector2< RealType > &V0, const TVector2< RealType > &V1, const TVector2< RealType > &V2)
Definition VectorUtil.h:117
TVector< RealType > MakePerpVector(const TVector< RealType > &Normal)
Definition VectorUtil.h:242
int Min3Index(const ValueVecType &Vector3)
Definition VectorUtil.h:180
void MakePerpVectors(const TVector< RealType > &Normal, TVector< RealType > &OutPerp1, TVector< RealType > &OutPerp2)
Definition VectorUtil.h:211
TVector< RealType > UniformSampleTrianglePoint(RealType R1, RealType R2, const TVector< RealType > &A, const TVector< RealType > &B, const TVector< RealType > &C)
Definition VectorUtil.h:435
TVector< RealType > NormalDirection(const TVector< RealType > &V0, const TVector< RealType > &V1, const TVector< RealType > &V2)
Definition VectorUtil.h:83
TVector< RealType > TangentFromBitangent(const TVector< RealType > &NormalIn, const TVector< RealType > &BitangentIn)
Definition VectorUtil.h:610
TVector2< RealType > Circumcenter(TVector2< RealType > A, TVector2< RealType > B, const TVector2< RealType > &C, RealType Epsilon=TMathUtilConstants< RealType >::Epsilon)
Definition VectorUtil.h:539
TVector< RealType > NormalArea(const TVector< RealType > &V0, const TVector< RealType > &V1, const TVector< RealType > &V2, RealType &AreaOut)
Definition VectorUtil.h:139
RealType OpeningAngleD(TVector< RealType > A, TVector< RealType > B, const TVector< RealType > &P)
Definition VectorUtil.h:514
RealType OrientedDihedralAngle(const TVector< RealType > &Normal0, const TVector< RealType > &Normal1, const TVector< RealType > &Edge)
Definition VectorUtil.h:530
bool IsObtuse(const TVector< RealType > &V1, const TVector< RealType > &V2, const TVector< RealType > &V3)
Definition VectorUtil.h:126
TVector< RealType > InverseTransformNormal(const TTransform< RealType > &Transform, const TVector< RealType > &Normal)
Definition VectorUtil.h:644
int Max3Index(const ValueVecType &Vector3)
Definition VectorUtil.h:194
TVector< RealType > TriGradient(TVector< RealType > Vi, TVector< RealType > Vj, TVector< RealType > Vk, RealType fi, RealType fj, RealType fk)
Definition VectorUtil.h:488
RealType SnapToIncrement(RealType Value, RealType Increment, RealType Offset=0)
Definition VectorUtil.h:658
T AngleR(const UE::Math::TVector2< T > &V1, const UE::Math::TVector2< T > &V2)
Definition VectorTypes.h:101
constexpr UE::Math::TVector2< T > PerpCW(const UE::Math::TVector2< T > &V)
Definition VectorTypes.h:26
T AngleD(const UE::Math::TVector2< T > &V1, const UE::Math::TVector2< T > &V2)
Definition VectorTypes.h:92
constexpr T DotPerp(const UE::Math::TVector2< T > &V1, const UE::Math::TVector2< T > &V2)
Definition VectorTypes.h:19
T DistanceSquared(const UE::Math::TVector2< T > &V1, const UE::Math::TVector2< T > &V2)
Definition VectorTypes.h:82
@ Area
Definition FitOrientedBox2.h:17
T Normalize(UE::Math::TVector2< T > &Vector, const T Epsilon=0)
Definition VectorTypes.h:46
Definition Sphere.cpp:10
Definition AdvancedWidgetsModule.cpp:13
Definition MathUtil.h:16
Definition TransformNonVectorized.h:39
Definition Vector2D.h:38
UE_FORCEINLINE_HINT T SquaredLength() const
Definition Vector2D.h:516
T Y
Definition Vector2D.h:52
T X
Definition Vector2D.h:49
Definition Vector4.h:30
Definition Vector.h:51
T Z
Definition Vector.h:68
T Y
Definition Vector.h:65
UE_FORCEINLINE_HINT TVector< T > Cross(const TVector< T > &V2) const
Definition Vector.h:1535
T X
Definition Vector.h:62
UE_FORCEINLINE_HINT T Dot(const TVector< T > &V) const
Definition Vector.h:1553