![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <InfoTypes.h>
Public Member Functions | |
| FMeshTriEdgeID () | |
| FMeshTriEdgeID (int32 TriangleIDIn, int32 EdgeIndexIn) | |
| FMeshTriEdgeID (uint32 EncodedEdgeKey) | |
| uint32 | Encoded () const |
Public Attributes | |
| unsigned | TriEdgeIndex: 2 |
| unsigned | TriangleID: 30 |
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.
|
inline |
Construct a FMeshTriEdgeID for the given TriangleID and Edge Index in range
| EdgeIndexIn | index in range 0,1,2 |
|
inlineexplicit |
Decode an encoded FMeshTriEdgeID from a packed uint32 created by the Encoded() function
|
inline |
| unsigned UE::Geometry::FMeshTriEdgeID::TriangleID |
The index of the mesh Triangle
| unsigned UE::Geometry::FMeshTriEdgeID::TriEdgeIndex |
The 0/1/2 index of the edge in the triangle's tuple of edges