feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -34,10 +34,11 @@ public:
|
|||
return box;
|
||||
}
|
||||
|
||||
/// Get bounding box of size 2 * FLT_MAX
|
||||
/// Get bounding box of size FLT_MAX
|
||||
static AABox sBiggest()
|
||||
{
|
||||
return AABox(Vec3::sReplicate(-FLT_MAX), Vec3::sReplicate(FLT_MAX));
|
||||
/// Max half extent of AABox is 0.5 * FLT_MAX so that GetSize() remains finite
|
||||
return AABox(Vec3::sReplicate(-0.5f * FLT_MAX), Vec3::sReplicate(0.5f * FLT_MAX));
|
||||
}
|
||||
|
||||
/// Comparison operators
|
||||
|
|
|
|||
|
|
@ -540,9 +540,9 @@ public:
|
|||
|| contact_normal_invalid))
|
||||
{
|
||||
// If we're initially intersecting, we need to run the EPA algorithm in order to find the deepest contact point
|
||||
AddConvexRadius<A> add_convex_a(inA, inConvexRadiusA);
|
||||
AddConvexRadius<B> add_convex_b(inB, inConvexRadiusB);
|
||||
TransformedConvexObject<AddConvexRadius<A>> transformed_a(inStart, add_convex_a);
|
||||
AddConvexRadius add_convex_a(inA, inConvexRadiusA);
|
||||
AddConvexRadius add_convex_b(inB, inConvexRadiusB);
|
||||
TransformedConvexObject transformed_a(inStart, add_convex_a);
|
||||
if (!GetPenetrationDepthStepEPA(transformed_a, add_convex_b, inPenetrationTolerance, outContactNormal, outPointA, outPointB))
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <Jolt/Core/NonCopyable.h>
|
||||
#include <Jolt/Core/FPException.h>
|
||||
#include <Jolt/Geometry/ClosestPoint.h>
|
||||
#include <Jolt/Geometry/ConvexSupport.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ JPH_NAMESPACE_BEGIN
|
|||
class AABox;
|
||||
|
||||
/// Oriented box
|
||||
class [[nodiscard]] JPH_EXPORT_GCC_BUG_WORKAROUND OrientedBox
|
||||
class JPH_EXPORT_GCC_BUG_WORKAROUND [[nodiscard]] OrientedBox
|
||||
{
|
||||
public:
|
||||
JPH_OVERRIDE_NEW_DELETE
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public:
|
|||
mIsParallel = Vec3::sLessOrEqual(inDirection.Abs(), Vec3::sReplicate(1.0e-20f));
|
||||
|
||||
// Calculate 1 / direction while avoiding division by zero
|
||||
mInvDirection = Vec3::sSelect(inDirection, Vec3::sReplicate(1.0f), mIsParallel).Reciprocal();
|
||||
mInvDirection = Vec3::sSelect(inDirection, Vec3::sOne(), mIsParallel).Reciprocal();
|
||||
}
|
||||
|
||||
Vec3 mInvDirection; ///< 1 / ray direction
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ JPH_INLINE float RayTriangle(Vec3Arg inOrigin, Vec3Arg inDirection, Vec3Arg inV0
|
|||
|
||||
// Zero & one
|
||||
Vec3 zero = Vec3::sZero();
|
||||
Vec3 one = Vec3::sReplicate(1.0f);
|
||||
Vec3 one = Vec3::sOne();
|
||||
|
||||
// Find vectors for two edges sharing inV0
|
||||
Vec3 e1 = inV1 - inV0;
|
||||
|
|
@ -31,7 +31,7 @@ JPH_INLINE float RayTriangle(Vec3Arg inOrigin, Vec3Arg inDirection, Vec3Arg inV0
|
|||
UVec4 det_near_zero = Vec3::sLess(det.Abs(), epsilon);
|
||||
|
||||
// When the determinant is near zero, set it to one to avoid dividing by zero
|
||||
det = Vec3::sSelect(det, Vec3::sReplicate(1.0f), det_near_zero);
|
||||
det = Vec3::sSelect(det, Vec3::sOne(), det_near_zero);
|
||||
|
||||
// Calculate distance from inV0 to ray origin
|
||||
Vec3 s = inOrigin - inV0;
|
||||
|
|
@ -110,7 +110,7 @@ JPH_INLINE Vec4 RayTriangle4(Vec3Arg inOrigin, Vec3Arg inDirection, Vec4Arg inV0
|
|||
UVec4 det_near_zero = Vec4::sLess(det, epsilon);
|
||||
|
||||
// Set components of the determinant to 1 that are near zero to avoid dividing by zero
|
||||
det = Vec4::sSelect(det, Vec4::sReplicate(1.0f), det_near_zero);
|
||||
det = Vec4::sSelect(det, Vec4::sOne(), det_near_zero);
|
||||
|
||||
// Calculate distance from inV0 to ray origin
|
||||
Vec4 sx = inOrigin.SplatX() - inV0X;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue