Navigation
API > API/Runtime > API/Runtime/GeometryCore
FMeshTriEdgeID identifies an edge in a triangle mesh based on the triangle ID/Index and the "edge index" 0/1/2 in the triangle. If the ordered triangle vertices are [A,B,C], then [A,B]=0, [B,C]=1, and [C,A]=2.
This type of edge identifier is applicable on any indexed mesh, even if the mesh does not store explicit edge IDs.
Values are stored unsigned, so it is currently not possible to store an "invalid" edge identifier as a FMeshTriEdgeID (0xFFFFFFFF could potentially be used as such an identifier).
The TriangleID is stored in 30 bits, while FDynamicMesh3 stores (valid) triangle IDs in 31 bits. So, only ~1 billion triangles are allowed in a mesh when using FMeshTriEdgeID, vs ~2 billion in FDynamicMesh3. This limit has not been encountered in practice, to date.
Note that cycling or permuting the vertices of a triangle will change these indices.
| Name | FMeshTriEdgeID |
| Type | struct |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/InfoTypes.h |
| Include Path | #include "DynamicMesh/InfoTypes.h" |
Syntax
struct FMeshTriEdgeID
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| DynamicMesh/InfoTypes.h | |||
FMeshTriEdgeID
(
uint32 EncodedEdgeKey |
Decode an encoded FMeshTriEdgeID from a packed uint32 created by the Encoded() function | DynamicMesh/InfoTypes.h | |
FMeshTriEdgeID
(
int32 TriangleIDIn, |
Construct a FMeshTriEdgeID for the given TriangleID and Edge Index in range | DynamicMesh/InfoTypes.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| TriangleID | unsigned | The index of the mesh Triangle | DynamicMesh/InfoTypes.h | |
| TriEdgeIndex | unsigned | The 0/1/2 index of the edge in the triangle's tuple of edges | DynamicMesh/InfoTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
uint32 Encoded() |
DynamicMesh/InfoTypes.h |