Navigation
API > API/Runtime > API/Runtime/Chaos
| Name | FTriangleMesh |
| Type | class |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/TriangleMesh.h |
| Include Path | #include "Chaos/TriangleMesh.h" |
Syntax
class FTriangleMesh
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTriangleMesh
(
TArray< TVec3< int32 > >&& Elements, |
Chaos/TriangleMesh.h | ||
FTriangleMesh
(
FTriangleMesh&& Other |
Chaos/TriangleMesh.h | ||
FTriangleMesh
(
const FTriangleMesh& Other |
Chaos/TriangleMesh.h | ||
| Chaos/TriangleMesh.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FTriangleMesh() |
Chaos/TriangleMesh.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| TBVHType | TAABBTree< int32, TAABBTreeLeafArray< int32, false, T >, true, T > | BVH-based collision queries. | Chaos/TriangleMesh.h |
| TSpatialHashType | THierarchicalSpatialHash< int32, T > | Chaos/TriangleMesh.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MEdgeToFaces | TArray< TVec2< int32 > > | Chaos/TriangleMesh.h | ||
| MElements | TArray< TVec3< int32 > > | Chaos/TriangleMesh.h | ||
| MFaceToEdges | TArray< TVec3< int32 > > | Chaos/TriangleMesh.h | ||
| MNumIndices | int32 | Chaos/TriangleMesh.h | ||
| MPointToNeighborsMap | TMap< int32, TSet< int32 > > | Chaos/TriangleMesh.h | ||
| MPointToTriangleMap | TArray< TArray< int32 > > | Chaos/TriangleMesh.h | ||
| MSegmentMesh | FSegmentMesh | Chaos/TriangleMesh.h | ||
| MStartIdx | int32 | Chaos/TriangleMesh.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BuildBVH
(
const TConstArrayView< TVec3< T > >& Points, |
Chaos/TriangleMesh.h | ||
void BuildSpatialHash
(
const TConstArrayView< TVec3< T > >& Points, |
Hierarchy will only go down to lods as small as MinSpatialLodSize. | Chaos/TriangleMesh.h | |
void BuildSpatialHash
(
const TConstArrayView< TVec3< FRealSingle > >& Points, |
Chaos/TriangleMesh.h | ||
bool EdgeIntersectionQuery
(
const TSpatialHashType< T >& SpatialHash, |
Chaos/TriangleMesh.h | ||
bool EdgeIntersectionQuery
(
const TBVHType< T >& BVH, |
Chaos/TriangleMesh.h | ||
void ExpandVertexRange
(
const int32 StartIdx, |
Extends the vertex range. | Chaos/TriangleMesh.h | |
| Find vertices that are coincident within the subset | Chaos/TriangleMesh.h | ||
TSet< int32 > GetBoundaryPoints() |
Get the set of point indices that live on the boundary (an edge with only 1 coincident face). | Chaos/TriangleMesh.h | |
const TArray< int32 > & GetCoincidentTriangles
(
const int32 Element |
Chaos/TriangleMesh.h | ||
TArray< FReal > GetCurvatureOnEdges
(
const TArray< FVec3 >& faceNormals |
@ret Curvature between adjacent faces, specified on edges in radians. | Chaos/TriangleMesh.h | |
TArray< FReal > GetCurvatureOnEdges
(
const TConstArrayView< FVec3 >& points |
Helper that generates face normals on the fly. | Chaos/TriangleMesh.h | |
TArray< FReal > GetCurvatureOnPoints
(
const TArray< FReal >& edgeCurvatures |
@ret The maximum curvature at points from connected edges, specified in radians. | Chaos/TriangleMesh.h | |
TArray< FReal > GetCurvatureOnPoints
(
const TConstArrayView< FVec3 >& points |
Helper that generates edge curvatures on the fly. | Chaos/TriangleMesh.h | |
const TArray< TVec2< int32 > > & GetEdgeToFaces() |
Note that this data is lazily calculated with the SegmentMesh (this method is not threadsafe unless it is known that the SegmentMesh is already up to date) @ret A map from all edge indices, to the indices of their containing faces. | Chaos/TriangleMesh.h | |
TArray< TVec3< int32 > > GetElements () |
Move accessor for topology array. | Chaos/TriangleMesh.h | |
const TArray< TVec3< int32 > > & GetElements () |
Chaos/TriangleMesh.h | ||
void GetFaceNormals
(
TArray< TVec3< T > >& Normals, |
Chaos/TriangleMesh.h | ||
TArray< FVec3 > GetFaceNormals
(
const FParticles& InParticles, |
Chaos/TriangleMesh.h | ||
TArray< TVec3< T > > GetFaceNormals
(
const TConstArrayView< TVec3< T > >& Points, |
The GetFaceNormals functions assume Counter Clockwise triangle windings in a Left Handed coordinate system If this is not the case the returned face normals may be inverted | Chaos/TriangleMesh.h | |
const TArray< TVec3< int32 > > & GetFaceToEdges() |
Note that this data is lazily calculated with the SegmentMesh (this method is not threadsafe unless it is known that the SegmentMesh is already up to date) @ret A map from all face indices, to the indices of their associated edges. | Chaos/TriangleMesh.h | |
const TSet< int32 > & GetNeighbors
(
const int32 Element |
Chaos/TriangleMesh.h | ||
TSet< int32 > GetNRing
(
const int32 Element, |
Chaos/TriangleMesh.h | ||
int32 GetNumElements() |
Chaos/TriangleMesh.h | ||
int32 GetNumIndices() |
Chaos/TriangleMesh.h | ||
TArray< FVec3 > GetPointNormals
(
const FParticles& InParticles, |
Chaos/TriangleMesh.h | ||
void GetPointNormals
(
TArrayView< TVec3< FRealSingle > > PointNormals, |
Chaos/TriangleMesh.h | ||
void GetPointNormals
(
TArrayView< TVec3< FRealSingle > > PointNormals, |
|||
TArray< FVec3 > GetPointNormals
(
const TConstArrayView< FVec3 >& points, |
Chaos/TriangleMesh.h | ||
void GetPointNormals
(
TArrayView< FVec3 > PointNormals, |
Chaos/TriangleMesh.h | ||
void GetPointNormals
(
TArrayView< TVec3< T > > PointNormals, |
Get per-point normals. This const version of this function requires `GetPointToTriangleMap()_ to be called prior to invoking this function. | Chaos/TriangleMesh.h | |
const TMap< int32, TSet< int32 > > & GetPointToNeighborsMap() |
Chaos/TriangleMesh.h | ||
TConstArrayView< TArray< int32 > > GetPointToTriangleMap() |
Chaos/TriangleMesh.h | ||
const FSegmentMesh & GetSegmentMesh() |
Note that the SegmentMesh is lazily calculated (this method is not threadsafe unless it is known that the SegmentMesh is already up to date) @ret The connectivity of this mesh represented as a collection of unique segments. | Chaos/TriangleMesh.h | |
int32 GetStartIndex() |
Chaos/TriangleMesh.h | ||
TArray< TVec3< int32 > > GetSurfaceElements () |
Move accessor for topology array. | Chaos/TriangleMesh.h | |
const TArray< TVec3< int32 > > & GetSurfaceElements () |
Chaos/TriangleMesh.h | ||
TArray< Chaos::TVec4< int32 > > GetUniqueAdjacentElements() |
Return the array of bending element indices {i0, i1, i2, i3}, with {i0, i1} the segment indices and {i2, i3} the cross segment indices. | Chaos/TriangleMesh.h | |
TArray< Chaos::TVec2< int32 > > GetUniqueAdjacentPoints() |
Return the array of all cross segment indices for all pairs of adjacent triangles. | Chaos/TriangleMesh.h | |
TArray< int32 > GetVertexImportanceOrdering
(
const TConstArrayView< FVec3 >& Points, |
@ret An array of vertex indices ordered from most important to least. | Chaos/TriangleMesh.h | |
TArray< int32 > GetVertexImportanceOrdering
(
const TConstArrayView< FVec3 >& Points, |
Helper that generates point curvatures on the fly. | Chaos/TriangleMesh.h | |
TVec2< int32 > GetVertexRange () |
Returns the closed interval of the smallest vertex index used by this class, to the largest. | Chaos/TriangleMesh.h | |
void GetVertexSet
(
TSet< int32 >& VertexSet |
Returns the unique set of vertices used by this triangle mesh. | Chaos/TriangleMesh.h | |
void GetVertexSetAsArray
(
TArray< int32 >& VertexSet |
Returns the unique set of vertices used by this triangle mesh. | Chaos/TriangleMesh.h | |
TSet< int32 > GetVertices() |
Returns the set of vertices used by triangles. | Chaos/TriangleMesh.h | |
| Initialize the `FTriangleMesh_. | Chaos/TriangleMesh.h | ||
void Init
(
const TConstArrayView< TVec3< int32 > >& Elements, |
Chaos/TriangleMesh.h | ||
bool PointClosestTriangleQuery
(
const TSpatialHashType< T >& SpatialHash, |
Chaos/TriangleMesh.h | ||
bool PointProximityQuery
(
const TBVHType< T >& BVH, |
NOTE: This method assumes the BVH has already been built/fitted to Points. | Chaos/TriangleMesh.h | |
bool PointProximityQuery
(
const TSpatialHashType< T >& SpatialHash, |
Chaos/TriangleMesh.h | ||
bool PointProximityQuery
(
const TSpatialHashType< FRealSingle >& SpatialHash, |
Chaos/TriangleMesh.h | ||
void RemapVertices
(
const TMap< int32, int32 >& Remapping |
Chaos/TriangleMesh.h | ||
void RemapVertices
(
const TArray< int32 >& Order |
Reorder vertices according to. | Chaos/TriangleMesh.h | |
void RemoveDegenerateElements() |
Chaos/TriangleMesh.h | ||
void RemoveDuplicateElements() |
Chaos/TriangleMesh.h | ||
void ResetAuxiliaryStructures() |
Chaos/TriangleMesh.h | ||
void Serialize
(
FArchive& Ar |
Chaos/TriangleMesh.h | ||
bool SmoothProject
(
const TBVHType< T >& BVH, |
Returns false_ if Point_ is outside of the smooth normal cone, where a smooth projection doesn't exist. |
Chaos/TriangleMesh.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FTriangleMesh GetConvexHullFromParticles
(
const TConstArrayView< FVec3 >& points |
Chaos/TriangleMesh.h | ||
static FTriangleMesh GetConvexHullFromParticles
(
const FParticles& InParticles |
Deprecated. Use TArrayView version. | Chaos/TriangleMesh.h | |
static void InitEquilateralTriangleXY
(
FTriangleMesh& TriMesh, |
Chaos/TriangleMesh.h | ||
static void InitEquilateralTriangleYZ
(
FTriangleMesh& TriMesh, |
Chaos/TriangleMesh.h |