UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::FConvexBuilder Class Reference

#include <CollisionConvexMesh.h>

Classes

class  Params
 

Public Types

enum  EBuildMethod { Default = 0 , Original = 1 , ConvexHull3 = 2 , ConvexHull3Simplified = 3 }
 
using FRealType = FRealSingle
 
using FVec3Type = TVec3< FRealType >
 
using FPlaneType = TPlaneConcrete< FRealType, 3 >
 
using FAABB3Type = TAABB< FRealType, 3 >
 

Static Public Member Functions

static FRealType SuggestEpsilon (const TArray< FVec3Type > &InVertices)
 
static bool IsValidTriangle (const FVec3Type &A, const FVec3Type &B, const FVec3Type &C, FVec3Type &OutNormal)
 
static bool IsValidTriangle (const FVec3Type &A, const FVec3Type &B, const FVec3Type &C)
 
static bool IsValidQuad (const FVec3Type &A, const FVec3Type &B, const FVec3Type &C, const FVec3Type &D, FVec3Type &OutNormal)
 
static bool IsPlanarShape (const TArray< FVec3Type > &InVertices, FVec3Type &OutNormal)
 
static CHAOS_API void Build (const TArray< FVec3Type > &InVertices, TArray< FPlaneType > &OutPlanes, TArray< TArray< int32 > > &OutFaceIndices, TArray< FVec3Type > &OutVertices, FAABB3Type &OutLocalBounds, EBuildMethod BuildMethod=EBuildMethod::Default)
 
static bool UseConvexHull3 (EBuildMethod BuildMethod)
 
static bool UseConvexHull3Simplifier (EBuildMethod BuildMethod)
 
static CHAOS_API void BuildIndices (const TArray< FVec3Type > &InVertices, TArray< int32 > &OutResultIndexData, EBuildMethod BuildMethod=EBuildMethod::Default)
 
static void BuildConvexHull (const TArray< FVec3Type > &InVertices, TArray< TVec3< int32 > > &OutIndices, const Params &InParams=Params())
 
static FTriangleMesh BuildConvexHullTriMesh (const TArray< FVec3Type > &InVertices)
 
static bool IsPerformanceWarning (int32 NumPlanes, int32 NumVertices)
 
static bool IsGeometryReductionEnabled ()
 
static FString PerformanceWarningString (int32 NumPlanes, int32 NumVertices)
 
static void Simplify (TArray< FPlaneType > &InOutPlanes, TArray< TArray< int32 > > &InOutFaces, TArray< FVec3Type > &InOutVertices, FAABB3Type &InOutLocalBounds)
 
static bool IsFaceOutlineConvex (const FPlaneType &Plane, const TArray< int32 > &Indices, const TArray< FVec3Type > &Vertices)
 
static void RemoveInvalidFaces (TArray< FPlaneType > &InOutPlanes, TArray< TArray< int32 > > &InOutFaceVertexIndices)
 
static void MergeFaces (TArray< FPlaneType > &InOutPlanes, TArray< TArray< int32 > > &InOutFaceVertexIndices, const TArray< FVec3Type > &Vertices, FRealType DistanceThreshold)
 
static void MergeColinearEdges (TArray< FPlaneType > &InOutPlanes, TArray< TArray< int32 > > &InOutFaceVertexIndices, TArray< FVec3Type > &InOutVertices, FRealType AngleToleranceCos)
 
static void RemoveInsideFaceVertices (const FPlaneType &Face, TArray< int32 > &InOutFaceVertexIndices, const TArray< FVec3Type > &Vertices, const FVec3Type &Centroid)
 
static void SortFaceVerticesCCW (const FPlaneType &Face, TArray< int32 > &InOutFaceVertexIndices, const TArray< FVec3Type > &Vertices, const FVec3Type &Centroid)
 
static void FinalizeFaces (const FPlaneType &Face, TArray< int32 > &InOutFaceVertexIndices, const TArray< FVec3Type > &Vertices)
 
static void BuildPlaneVertexIndices (TArray< FPlaneType > &InPlanes, const TArray< FVec3Type > &Vertices, TArray< TArray< int32 > > &OutFaceVertexIndices, const FRealType DistanceTolerance=1.e-3f)
 

Static Public Attributes

static CHAOS_API int32 PerformGeometryCheck = 0
 
static CHAOS_API int32 PerformGeometryReduction = 0
 
static CHAOS_API int32 VerticesThreshold = 50
 
static CHAOS_API int32 ComputeHorizonEpsilonFromMeshExtends = 1
 
static CHAOS_API bool bUseGeometryTConvexHull3 = true
 
static CHAOS_API bool bUseSimplifierForTConvexHull3 = false
 

Member Typedef Documentation

◆ FAABB3Type

◆ FPlaneType

◆ FRealType

◆ FVec3Type

Member Enumeration Documentation

◆ EBuildMethod

Enumerator
Default 
Original 
ConvexHull3 
ConvexHull3Simplified 

Member Function Documentation

◆ Build()

void Chaos::FConvexBuilder::Build ( const TArray< FVec3Type > &  InVertices,
TArray< FPlaneType > &  OutPlanes,
TArray< TArray< int32 > > &  OutFaceIndices,
TArray< FVec3Type > &  OutVertices,
FAABB3Type OutLocalBounds,
EBuildMethod  BuildMethod = EBuildMethod::Default 
)
static

◆ BuildConvexHull()

static void Chaos::FConvexBuilder::BuildConvexHull ( const TArray< FVec3Type > &  InVertices,
TArray< TVec3< int32 > > &  OutIndices,
const Params InParams = Params() 
)
inlinestatic

◆ BuildConvexHullTriMesh()

static FTriangleMesh Chaos::FConvexBuilder::BuildConvexHullTriMesh ( const TArray< FVec3Type > &  InVertices)
inlinestatic

◆ BuildIndices()

void Chaos::FConvexBuilder::BuildIndices ( const TArray< FVec3Type > &  InVertices,
TArray< int32 > &  OutResultIndexData,
EBuildMethod  BuildMethod = EBuildMethod::Default 
)
static

◆ BuildPlaneVertexIndices()

static void Chaos::FConvexBuilder::BuildPlaneVertexIndices ( TArray< FPlaneType > &  InPlanes,
const TArray< FVec3Type > &  Vertices,
TArray< TArray< int32 > > &  OutFaceVertexIndices,
const FRealType  DistanceTolerance = 1.e-3f 
)
inlinestatic

◆ FinalizeFaces()

static void Chaos::FConvexBuilder::FinalizeFaces ( const FPlaneType Face,
TArray< int32 > &  InOutFaceVertexIndices,
const TArray< FVec3Type > &  Vertices 
)
inlinestatic

◆ IsFaceOutlineConvex()

static bool Chaos::FConvexBuilder::IsFaceOutlineConvex ( const FPlaneType Plane,
const TArray< int32 > &  Indices,
const TArray< FVec3Type > &  Vertices 
)
inlinestatic

◆ IsGeometryReductionEnabled()

static bool Chaos::FConvexBuilder::IsGeometryReductionEnabled ( )
inlinestatic

◆ IsPerformanceWarning()

static bool Chaos::FConvexBuilder::IsPerformanceWarning ( int32  NumPlanes,
int32  NumVertices 
)
inlinestatic

◆ IsPlanarShape()

static bool Chaos::FConvexBuilder::IsPlanarShape ( const TArray< FVec3Type > &  InVertices,
FVec3Type OutNormal 
)
inlinestatic

◆ IsValidQuad()

static bool Chaos::FConvexBuilder::IsValidQuad ( const FVec3Type A,
const FVec3Type B,
const FVec3Type C,
const FVec3Type D,
FVec3Type OutNormal 
)
inlinestatic

◆ IsValidTriangle() [1/2]

static bool Chaos::FConvexBuilder::IsValidTriangle ( const FVec3Type A,
const FVec3Type B,
const FVec3Type C 
)
inlinestatic

◆ IsValidTriangle() [2/2]

static bool Chaos::FConvexBuilder::IsValidTriangle ( const FVec3Type A,
const FVec3Type B,
const FVec3Type C,
FVec3Type OutNormal 
)
inlinestatic

◆ MergeColinearEdges()

static void Chaos::FConvexBuilder::MergeColinearEdges ( TArray< FPlaneType > &  InOutPlanes,
TArray< TArray< int32 > > &  InOutFaceVertexIndices,
TArray< FVec3Type > &  InOutVertices,
FRealType  AngleToleranceCos 
)
inlinestatic

◆ MergeFaces()

static void Chaos::FConvexBuilder::MergeFaces ( TArray< FPlaneType > &  InOutPlanes,
TArray< TArray< int32 > > &  InOutFaceVertexIndices,
const TArray< FVec3Type > &  Vertices,
FRealType  DistanceThreshold 
)
inlinestatic

◆ PerformanceWarningString()

static FString Chaos::FConvexBuilder::PerformanceWarningString ( int32  NumPlanes,
int32  NumVertices 
)
inlinestatic

◆ RemoveInsideFaceVertices()

static void Chaos::FConvexBuilder::RemoveInsideFaceVertices ( const FPlaneType Face,
TArray< int32 > &  InOutFaceVertexIndices,
const TArray< FVec3Type > &  Vertices,
const FVec3Type Centroid 
)
inlinestatic

◆ RemoveInvalidFaces()

static void Chaos::FConvexBuilder::RemoveInvalidFaces ( TArray< FPlaneType > &  InOutPlanes,
TArray< TArray< int32 > > &  InOutFaceVertexIndices 
)
inlinestatic

◆ Simplify()

static void Chaos::FConvexBuilder::Simplify ( TArray< FPlaneType > &  InOutPlanes,
TArray< TArray< int32 > > &  InOutFaces,
TArray< FVec3Type > &  InOutVertices,
FAABB3Type InOutLocalBounds 
)
inlinestatic

◆ SortFaceVerticesCCW()

static void Chaos::FConvexBuilder::SortFaceVerticesCCW ( const FPlaneType Face,
TArray< int32 > &  InOutFaceVertexIndices,
const TArray< FVec3Type > &  Vertices,
const FVec3Type Centroid 
)
inlinestatic

◆ SuggestEpsilon()

static FRealType Chaos::FConvexBuilder::SuggestEpsilon ( const TArray< FVec3Type > &  InVertices)
inlinestatic

◆ UseConvexHull3()

bool Chaos::FConvexBuilder::UseConvexHull3 ( FConvexBuilder::EBuildMethod  BuildMethod)
static

◆ UseConvexHull3Simplifier()

bool Chaos::FConvexBuilder::UseConvexHull3Simplifier ( EBuildMethod  BuildMethod)
static

Member Data Documentation

◆ bUseGeometryTConvexHull3

bool Chaos::FConvexBuilder::bUseGeometryTConvexHull3 = true
static

◆ bUseSimplifierForTConvexHull3

bool Chaos::FConvexBuilder::bUseSimplifierForTConvexHull3 = false
static

◆ ComputeHorizonEpsilonFromMeshExtends

int32 Chaos::FConvexBuilder::ComputeHorizonEpsilonFromMeshExtends = 1
static

◆ PerformGeometryCheck

int32 Chaos::FConvexBuilder::PerformGeometryCheck = 0
static

◆ PerformGeometryReduction

int32 Chaos::FConvexBuilder::PerformGeometryReduction = 0
static

◆ VerticesThreshold

int32 Chaos::FConvexBuilder::VerticesThreshold = 50
static

The documentation for this class was generated from the following files: