Navigation
API > API/Runtime > API/Runtime/Chaos
Generate contacts between a collision shape and the triangles from a mesh.
| Name | FMeshContactGenerator |
| Type | class |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Collision/MeshContactGenerator.h |
| Include Path | #include "Chaos/Collision/MeshContactGenerator.h" |
Syntax
class FMeshContactGenerator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMeshContactGenerator
(
const FMeshContactGeneratorSettings& InSettings |
Chaos/Collision/MeshContactGenerator.h |
Structs
| Name | Remarks |
|---|---|
| FEdgeTriangleIndices | The triangle indices that share an edge (assumes only 2) |
| FEdgeTriangleIndicesMapTraits | A map of EdgeID to the two triangles (indices) that use the Edge. |
| FVertexContactIndex | A contact index combined with a flag to indicate if the normal is roughly along the triangle face. |
| VertexContactIndicesMapTraits | A map of VertexID to contact index on that vertex - we only ever keep one contact per vertex. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FTriangleExt | FMeshContactGeneratorTriangle | Chaos/Collision/MeshContactGenerator.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ContactDatas | TArray< FTriangleContactPointData > | Chaos/Collision/MeshContactGenerator.h | ||
| Contacts | TArray< FContactPoint > | The contact data. | Chaos/Collision/MeshContactGenerator.h | |
| EdgeTriangleIndicesMap | THashMappedArray< FContactEdgeID, FEdgeTriangleIndices, FEdgeTriangleIndicesMapTraits > | Chaos/Collision/MeshContactGenerator.h | ||
| Settings | FMeshContactGeneratorSettings | Chaos/Collision/MeshContactGenerator.h | ||
| Triangles | TArray< FTriangleExt > | All the triangles we might collide with. | Chaos/Collision/MeshContactGenerator.h | |
| VertexContactIndicesMap | THashMappedArray< FContactVertexID, FVertexContactIndex, VertexContactIndicesMapTraits > | Chaos/Collision/MeshContactGenerator.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddTriangle
(
const FTriangle& MeshTriangle, |
Add a triangle that we might be overlapping. | Chaos/Collision/MeshContactGenerator.h | |
void AddTriangleContacts
(
const int32 LocalTriangleIndex, |
Chaos/Collision/MeshContactGenerator.h | ||
void BeginCollect
(
const int32 InNumTriangles |
Clear and initialize buffers. | Chaos/Collision/MeshContactGenerator.h | |
void EndCollect() |
Process all the added triangles to generate connectivity metadata etc. | Chaos/Collision/MeshContactGenerator.h | |
bool FixFeature
(
const int32 LocalTriangleIndex, |
Chaos/Collision/MeshContactGenerator.h | ||
void GenerateMeshContacts
(
const TriangleContactGeneratorType& TriangleContactGenerator |
Loop over (the required subset of) all triangles and call the TriangleContactGenerator to create a manifold for each. | Chaos/Collision/MeshContactGenerator.h | |
TArrayView< const FContactPoint > GetContactPoints() |
The results of contact generation (must call ProcessGeneratedContacts prior to GetContactPoints) | Chaos/Collision/MeshContactGenerator.h | |
int32 GetNumTriangles() |
Chaos/Collision/MeshContactGenerator.h | ||
const FTriangle & GetTriangle
(
const int32 LocalTriangleIndex |
Chaos/Collision/MeshContactGenerator.h | ||
const FVec3 & GetTriangleNormal
(
const int32 LocalTriangleIndex |
Chaos/Collision/MeshContactGenerator.h | ||
void ProcessGeneratedContacts
(
const FRigidTransform3& ConvexTransform, |
Process all the contact points generated by GenerateMeshContacts. | Chaos/Collision/MeshContactGenerator.h | |
void SetFixNormalsEnabled
(
const bool bInFixNormals |
Enable or disable the normal fixup. | Chaos/Collision/MeshContactGenerator.h |