10 template <
typename T,
int d = 3>
34 else if (NumZeros == 1)
38 (
ZeroX) ? 1.0f : 0.0f,
39 (
ZeroY) ? 1.0f : 0.0f,
40 (
ZeroZ) ? 1.0f : 0.0f);
42 else if (NumZeros == 2)
113 template <
typename U>
125 static_assert(d == 3,
"Only dimension 3 is supported");
131 template <
typename U>
143 return FVec3::DotProduct(x - (
FVec3)MX, (
FVec3)MNormal);
148 auto Dist = FVec3::DotProduct(x - (
FVec3)MX, (
FVec3)MNormal) - Thickness;
149 return x -
FVec3(Dist * MNormal);
160 OutPosition =
FVec3(0);
161 OutNormal =
FVec3(0);
176 const FReal Epsilon = 1e-7f;
201 FVec3 Direction = EndPoint - StartPoint;
203 Direction = Direction.GetSafeNormal();
208 FReal Denominator = FVec3::DotProduct(Direction, MNormal);
209 if (Denominator == 0)
245 template <
typename T>
252 template <
typename T,
int d = 3>
#define ensure( InExpression)
Definition AssertionMacros.h:464
#define CHAOS_ENSURE(Condition)
Definition ChaosCheck.h:22
@ INDEX_NONE
Definition CoreMiscDefines.h:150
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
constexpr uint32 HashCombine(uint32 A, uint32 C)
Definition TypeHash.h:36
#define UE_SMALL_NUMBER
Definition UnrealMathUtility.h:130
#define UE_KINDA_SMALL_NUMBER
Definition UnrealMathUtility.h:131
uint32 Size
Definition VulkanMemory.cpp:4034
Definition CorePlane.h:12
const TVec3< T > & X() const
Definition CorePlane.h:225
FVec3 FindClosestPoint(const FVec3 &x, const FReal Thickness=(FReal) 0) const
Definition CorePlane.h:146
const TVec3< T > & Normal() const
Definition CorePlane.h:226
static FORCEINLINE TCorePlane< T > MakeScaledUnsafe(const TCorePlane< U > &Plane, const TVec3< T > &Scale, const TVec3< T > &InvScale)
Definition CorePlane.h:72
bool Raycast(const FVec3 &StartPoint, const FVec3 &Dir, const FReal Length, const FReal Thickness, FReal &OutTime, FVec3 &OutPosition, FVec3 &OutNormal, int32 &OutFaceIndex) const
Definition CorePlane.h:152
FORCEINLINE void Serialize(FArchive &Ar)
Definition CorePlane.h:229
uint32 GetTypeHash() const
Definition CorePlane.h:234
const TVec3< T > & Normal(const TVec3< T > &) const
Definition CorePlane.h:227
static FORCEINLINE void MakeScaledUnsafe(const TVec3< U > &PlaneN, const TVec3< U > &PlaneX, const TVec3< T > &Scale, const TVec3< T > &InvScale, TVec3< T > &OutN, TVec3< T > &OutX)
Definition CorePlane.h:92
TCorePlane(const TVec3< T > &InX, const TVec3< T > &InNormal)
Definition CorePlane.h:121
U SignedDistance(const TVec3< U > &x) const
Definition CorePlane.h:132
FReal PhiWithNormal(const FVec3 &x, FVec3 &Normal) const
Definition CorePlane.h:140
static TCorePlane< T > MakeScaledSafe(const TCorePlane< T > &Plane, const TVec3< T > &Scale)
Definition CorePlane.h:16
Pair< FVec3, bool > FindClosestIntersection(const FVec3 &StartPoint, const FVec3 &EndPoint, const FReal Thickness) const
Definition CorePlane.h:199
static FORCEINLINE TCorePlane< T > MakeFrom(const TCorePlane< U > &Plane)
Definition CorePlane.h:114
FORCEINLINE T SizeSquared() const
Definition Vector.h:1067
Definition Archive.h:1208
Definition SkeletalMeshComponent.h:307
FChaosArchive & operator<<(FChaosArchive &Ar, FRigidParticleControlFlags &Flags)
Definition RigidParticleControlFlags.cpp:15
FRealDouble FReal
Definition Real.h:22
Pair< T1, T2 > MakePair(const T1 &First, const T2 &Second)
Definition Pair.h:45
TVector< FReal, 3 > FVec3
Definition Core.h:17
uint32 GetTypeHash(const TBox< T > &Box)
Definition Box.h:1008
static UE_FORCEINLINE_HINT bool IsNearlyEqual(float A, float B, float ErrorTolerance=UE_SMALL_NUMBER)
Definition UnrealMathUtility.h:388
static UE_FORCEINLINE_HINT bool IsNearlyZero(float Value, float ErrorTolerance=UE_SMALL_NUMBER)
Definition UnrealMathUtility.h:407