UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TriangleCollisionPoint.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
6
7#include "Chaos/Core.h"
8
9
10namespace Chaos
11{
15 template<typename T>
17 {
18 // Type of contact (determines meaning of some properties below such as Indices and BarycentricCoordinates)
19 enum struct EContactType : uint8
20 {
21 Invalid = 0,
26
27 // Index into Point and Face arrays or Edge arrays
29
30 // Barycentric coordinates for contacts
31 // Point-Face: Bary[0] = 1.0 (Point), Bary[1:3] correspond with coordinates on Face
32 // Edge-Edge: Bary[0:1] = coordinates on first edge, [2:3] coordinates on second edge
33 // Edge-Face: Bary[0] = second coordinate on edge (first can be calculated as 1-Bary[0], Bary[1:3] correspond with coordinates on Face
35
36 // World space location (which point depends on query type)
38
39 // World space normal (which normal depends on query type)
41
42 // Contact separation (negative for overlap)
43 T Phi;
44
50
51 // Whether the contact point has been set up with contact data
52 bool IsSet() const { return ContactType != EContactType::Invalid; }
53 };
54}
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition Vector.h:1000
Definition Vector.h:41
Definition SkeletalMeshComponent.h:307
Data returned by TriangleMesh point-triangle and edge-edge queries.
Definition TriangleCollisionPoint.h:17
TVec3< T > Normal
Definition TriangleCollisionPoint.h:40
T Phi
Definition TriangleCollisionPoint.h:43
TTriangleCollisionPoint()
Definition TriangleCollisionPoint.h:45
EContactType
Definition TriangleCollisionPoint.h:20
bool IsSet() const
Definition TriangleCollisionPoint.h:52
enum Chaos::TTriangleCollisionPoint::EContactType ContactType
TVec4< T > Bary
Definition TriangleCollisionPoint.h:34
TVec3< T > Location
Definition TriangleCollisionPoint.h:37
int32 Indices[2]
Definition TriangleCollisionPoint.h:28
Definition NumericLimits.h:41