69 const FVec3 Vertices[],
75 Vertices[0], Vertices[1], Vertices[2],
207 return ::GetTypeHash(V.
EdgeID);
326 , ContactNormalDotTriangleNormal(0)
373 return ContactTriangleIndex;
383 return EdgeOrVertexID.
IsEdge();
398 return ContactNormalDotTriangleNormal;
403 int32 ContactTriangleIndex;
415 UE_DEPRECATED(5.3,
"Use the constructor below which take PhiTolerance etc")
418 , DistanceTolerance(0.1)
419 , NumDisabledTriangleContactPoints(0)
432 , NumDisabledTriangleContactPoints(0)
456 if (ContactPoint.Phi < CullDistance)
458 const FReal ContactNormalDotTriangleNormal = FVec3::DotProduct(ContactPoint.ShapeContactNormal, ContactTriangles[ContactTriangleIndex].FaceNormal);
460 const int32 ContactIndex = TriangleContactPoints.Add(ContactPoint);
461 TriangleContactPointDatas.AddDefaulted();
463 TriangleContactPoints[ContactIndex].FaceIndex = TriangleIndex;
464 TriangleContactPointDatas[ContactIndex].SetTriangleIndex(ContactTriangleIndex);
465 TriangleContactPointDatas[ContactIndex].SetContactNormalDotTriangleNormal(
FRealSingle(ContactNormalDotTriangleNormal));
466 TriangleContactPointDatas[ContactIndex].SetEnabled();
476 void SetNumContacts(
const int32 Num);
477 void DisableContact(
const int32 ContactIndex);
478 void RemoveDisabledContacts();
480 void BuildContactFeatureSets();
481 void SortContactPointsForPruning();
482 void SortContactPointsForSolving();
484 void FixInvalidNormalContactPoints();
485 void PruneInfacingContactPoints();
486 void PruneUnnecessaryContactPoints();
487 void ReduceManifoldContactPointsTriangeMesh();
494 void DebugDrawContactPoints(
const FColor&
Color,
const FReal LineThickness);
513 FReal DistanceTolerance;
516 int32 NumDisabledTriangleContactPoints;
519 bool bOneSidedCollision;
constexpr auto MakeArrayView(OtherRangeType &&Other)
Definition ArrayView.h:873
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_KINDA_SMALL_NUMBER
Definition UnrealMathUtility.h:131
Definition ArrayView.h:139
Definition SkeletalMeshComponent.h:307
FRealDouble FReal
Definition Real.h:22
TVec3< RealType > ToBarycentric(const TVec3< RealType > &Point, const TVec3< RealType > &V0, const TVec3< RealType > &V1, const TVec3< RealType > &V2)
Convert the cartesian coordinate into a barycentric corrdinate. Compute barycentric coordinates/weigh...
Definition Triangle.h:25
float FRealSingle
Definition Real.h:14
int32 FContactVertexID
Definition ContactTriangles.h:159
bool GetTriangleEdgeVerticesAtPosition(const FVec3 &Position, const FVec3 VertexA, const FVec3 VertexB, const FVec3 VertexC, int32 &OutEdgeVertexIndexA, int32 &OutEdgeVertexIndexB, const FReal BaryCentricTolerance=UE_KINDA_SMALL_NUMBER)
Definition ContactTriangles.h:16
@ false
Definition radaudio_common.h:23
static UE_FORCEINLINE_HINT bool IsNearlyEqual(float A, float B, float ErrorTolerance=UE_SMALL_NUMBER)
Definition UnrealMathUtility.h:388