Navigation
API > API/Runtime > API/Runtime/GeometryCore
FDynamicMesh3 is a dynamic triangle mesh class. The mesh has has connectivity, is an indexed mesh, and allows for gaps in the index space.
internally, all data is stored in POD-type buffers, except for the vertex->edge links, which are stored as List
Reference counts for verts/tris/edges are stored as separate FRefCountVector instances.
Vertices are stored as doubles, although this should be easily changed if necessary, as the internal data structure is not exposed
Per-vertex Vertex Normals, Colors, and UVs are optional and stored as floats. Note that in practice, these are generally only used as scratch space, in limited circumstances, usually when needed for performance reasons. Most of our geometry code instead prefers to read attributes from the per-triangle AttributeSet accessed via Attributes() (see TDynamicMeshOverlay for a description of the structure). For instance, an empty (but existing) attribute set will take precedence over non-empty vertex normals in much of our processing code.
For each vertex, VertexEdgeLists[i] is the unordered list of connected edges. The elements of the list are indices into the edges list. This list is unsorted but can be traversed in-order (ie cw/ccw) at some additional cost.
Triangles are stored as 3 ints, with optionally a per-triangle integer group id. The group IDs stored here DO get widely used and preserved in our geometry code (unlike the per-vertex attributes described earlier), even though the AttributeSet can store group IDs as well (potentially in multiple layers).
The edges of a triangle are similarly stored as 3 ints, in triangle_edes. If the triangle is [v1,v2,v3], then the triangle edges [e1,e2,e3] are e1=edge(v1,v2), e2=edge(v2,v3), e3=edge(v3,v1), where the e# are indexes into edges.
Edges are stored as tuples of 4 ints. If the edge is between v1 and v2, with neighbour tris t1 and t2, then the edge is [min(v1,v2), max(v1,v2), t1, t2]. For a boundary edge, t2 is InvalidID. t1 is never InvalidID.
Most of the class assumes that the mesh is manifold. Many functions will work if the topology is non-manifold, but behavior of operators like Split/Flip/Collapse edge is untested.
The function CheckValidity() does extensive sanity checking on the mesh data structure. Use this to test your code, both for mesh construction and editing!!
| Name | FDynamicMesh3 |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/DynamicMesh3.h |
| Include Path | #include "DynamicMesh/DynamicMesh3.h" |
Syntax
class FDynamicMesh3
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDynamicMesh3
(
bool bWantNormals, |
Construct an empty mesh with specified attributes | DynamicMesh/DynamicMesh3.h | |
FDynamicMesh3
(
const FMeshShapeGenerator* Generator |
Construction from Mesh Generator | DynamicMesh/DynamicMesh3.h | |
FDynamicMesh3
(
EMeshComponents flags |
DynamicMesh/DynamicMesh3.h | ||
FDynamicMesh3
(
FDynamicMesh3&& MoveMesh |
DynamicMesh/DynamicMesh3.h | ||
FDynamicMesh3
(
const FDynamicMesh3& CopyMesh |
Copy/Move construction | DynamicMesh/DynamicMesh3.h | |
| Default constructor | DynamicMesh/DynamicMesh3.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FDynamicMesh3() |
Destructor | DynamicMesh/DynamicMesh3.h |
Structs
| Name | Remarks |
|---|---|
| FAppendInfo | Tracks how IDs are offset and number of elements appended by a mesh append operation. |
| FCollapseEdgeOptions | |
| FEdge | |
| FMergeVerticesOptions | |
| FMeshDifferenceInfo | |
| FSameAsOptions | Options for the IsSameAs check |
| FValidityOptions | Options for what the validity check will permit |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| edge_iterator | FRefCountVector::IndexEnumerable | DynamicMesh/DynamicMesh3.h | |
| FEdgeCollapseInfo | DynamicMeshInfo::FEdgeCollapseInfo | DynamicMesh/DynamicMesh3.h | |
| FEdgeFlipInfo | DynamicMeshInfo::FEdgeFlipInfo | TODO: | DynamicMesh/DynamicMesh3.h |
| FEdgeSplitInfo | DynamicMeshInfo::FEdgeSplitInfo | DynamicMesh/DynamicMesh3.h | |
| FMergeEdgesInfo | DynamicMeshInfo::FMergeEdgesInfo | DynamicMesh/DynamicMesh3.h | |
| FMergeVerticesInfo | DynamicMeshInfo::FMergeVerticesInfo | DynamicMesh/DynamicMesh3.h | |
| FPokeTriangleInfo | DynamicMeshInfo::FPokeTriangleInfo | DynamicMesh/DynamicMesh3.h | |
| FVertexSplitInfo | DynamicMeshInfo::FVertexSplitInfo | DynamicMesh/DynamicMesh3.h | |
| triangle_iterator | FRefCountVector::IndexEnumerable | DynamicMesh/DynamicMesh3.h | |
| value_iteration | FRefCountVector::MappedEnumerable< T > | DynamicMesh/DynamicMesh3.h | |
| vertex_iterator | FRefCountVector::IndexEnumerable | Simplify names for iterations | DynamicMesh/DynamicMesh3.h |
| vtx_triangles_enumerable | TPairExpandEnumerable< FSmallListSet::ValueIterator > | DynamicMesh/DynamicMesh3.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DuplicateTriangleID | int | DuplicateTriangleID is returned by AppendTriangle() to indicate that the added triangle already exists in the mesh, and was ignored because we do not support duplicate triangles | DynamicMesh/DynamicMesh3.h |
| InvalidEdge | FIndex2i | DynamicMesh/DynamicMesh3.h | |
| InvalidID | int | InvalidID indicates that a vertex/edge/triangle ID is invalid | DynamicMesh/DynamicMesh3.h |
| InvalidTriangle | FIndex3i | DynamicMesh/DynamicMesh3.h | |
| InvalidVertex | const FVector3d | DynamicMesh/DynamicMesh3.h | |
| NonManifoldID | int | NonManifoldID is returned by AppendTriangle() to indicate that the added triangle would result in nonmanifold geometry and hence was ignored | DynamicMesh/DynamicMesh3.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int AllocateTriangleGroup() |
DynamicMesh/DynamicMesh3.h | ||
int AppendTriangle
(
int Vertex0, |
Vertex0, Vertex1, and Vertex2 must be distinct and refer to existing, valid vertices | DynamicMesh/DynamicMesh3.h | |
int AppendTriangle
(
const FIndex3i& TriVertices, |
TriVertices must be distinct and refer to existing, valid vertices | DynamicMesh/DynamicMesh3.h | |
int AppendVertex
(
const FDynamicMesh3& SourceMesh, |
Copy vertex SourceVertexID from existing SourceMesh, returns new vertex id | DynamicMesh/DynamicMesh3.h | |
int AppendVertex
(
const FVector3d& Position |
Append vertex at position, returns vid | DynamicMesh/DynamicMesh3.h | |
int AppendVertex
(
const FVertexInfo& VertInfo |
Mesh Construction Append vertex at position and other fields, returns vid | DynamicMesh/DynamicMesh3.h | |
void AppendWithOffsets
(
const FDynamicMesh3& ToAppend, |
Append the ToAppend mesh geometry to this mesh, preserving element IDs aside from a constant offset. | DynamicMesh/DynamicMesh3.h | |
| DynamicMesh/DynamicMesh3.h | |||
const FDynamicMeshAttributeSet * Attributes () |
DynamicMesh/DynamicMesh3.h | ||
virtual void BeginUnsafeTrianglesInsert() |
Call this before a set of unsafe InsertTriangle() calls | DynamicMesh/DynamicMesh3.h | |
virtual void BeginUnsafeVerticesInsert () |
Support for inserting vertex and triangle at specific IDs. | DynamicMesh/DynamicMesh3.h | |
FRefCountVector::FilteredEnumerable BoundaryEdgeIndicesItr() |
DynamicMesh/DynamicMesh3.h | ||
double CalculateWindingNumber
(
const FVector3d& QueryPoint |
Compute mesh winding number, from Jacobson et. | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult CanCollapseEdge
(
int vKeep, |
DynamicMesh/DynamicMesh3.h | ||
virtual EMeshResult CanCollapseEdge
(
int vKeep, |
Tests whether collapsing the specified edge using the CollapseEdge function would succeed. | DynamicMesh/DynamicMesh3.h | |
virtual bool CheckValidity
(
FValidityOptions ValidityOptions, |
Checks that the mesh is well-formed, ie all internal data structures are consistent | DynamicMesh/DynamicMesh3.h | |
void Clear() |
Discard all data | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult CollapseEdge
(
int KeepVertID, |
Collapse the edge between the two vertices, if topologically possible. | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult CollapseEdge
(
int KeepVertID, |
Collapse the edge between the two vertices, if topologically possible. | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult CollapseEdge
(
int KeepVertID, |
Collapse the edge between the two vertices, if topologically possible. | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult CollapseEdge
(
int KeepVertID, |
Collapse the edge between the two vertices, if topologically possible. | DynamicMesh/DynamicMesh3.h | |
void CompactCopy
(
const FDynamicMesh3& CopyMesh, |
Copy input mesh while compacting, i.e. removing unused vertices/triangles/edges. | DynamicMesh/DynamicMesh3.h | |
void CompactInPlace
(
FCompactMaps* CompactInfo |
Mesh Edit operations Compact mesh in-place, by moving vertices around and rewriting indices. | DynamicMesh/DynamicMesh3.h | |
double CompactMetric() |
Returns measure of compactness in range [0,1], where 1 is fully compacted | DynamicMesh/DynamicMesh3.h | |
void Copy
(
const FDynamicMesh3& CopyMesh, |
Set internal data structures to be a copy of input mesh using the specified attributes | DynamicMesh/DynamicMesh3.h | |
bool Copy
(
const FMeshShapeGenerator* Generator |
Initialize mesh from the output of a MeshShapeGenerator (assumes Generate() was already called) | DynamicMesh/DynamicMesh3.h | |
void DiscardAttributes() |
DynamicMesh/DynamicMesh3.h | ||
void DiscardTriangleGroups() |
DynamicMesh/DynamicMesh3.h | ||
void DiscardVertexColors() |
DynamicMesh/DynamicMesh3.h | ||
void DiscardVertexNormals() |
DynamicMesh/DynamicMesh3.h | ||
void DiscardVertexUVs() |
DynamicMesh/DynamicMesh3.h | ||
int EdgeCount() |
DynamicMesh/DynamicMesh3.h | ||
edge_iterator EdgeIndicesItr() |
DynamicMesh/DynamicMesh3.h | ||
| Enumerate edges. | DynamicMesh/DynamicMesh3.h | ||
void EnableAttributes() |
DynamicMesh/DynamicMesh3.h | ||
void EnableMatchingAttributes
(
const FDynamicMesh3& ToMatch, |
Ensure that all the same extended attributes available in ToMatch are also enabled. | DynamicMesh/DynamicMesh3.h | |
void EnableMeshComponents
(
int MeshComponentsFlags |
Vertex and Triangle attribute arrays Enable requested set of mesh components (triangle groups and vertex normals/colors/UVs) and discard any that are not requested | DynamicMesh/DynamicMesh3.h | |
void EnableTriangleGroups
(
int InitialGroupID |
DynamicMesh/DynamicMesh3.h | ||
void EnableVertexColors
(
const FVector3f& InitialColor |
DynamicMesh/DynamicMesh3.h | ||
void EnableVertexNormals
(
const FVector3f& InitialNormal |
DynamicMesh/DynamicMesh3.h | ||
void EnableVertexUVs
(
const FVector2f& InitialUV |
DynamicMesh/DynamicMesh3.h | ||
virtual void EndUnsafeTrianglesInsert() |
Call after a set of unsafe InsertTriangle() calls to rebuild free list | DynamicMesh/DynamicMesh3.h | |
virtual void EndUnsafeVerticesInsert() |
Call after a set of unsafe InsertVertex() calls to rebuild free list | DynamicMesh/DynamicMesh3.h | |
void EnumerateEdgeTriangles
(
int32 EdgeID, |
Call ApplyFunc for each triangle connected to an Edge (1 or 2 triangles) | DynamicMesh/DynamicMesh3.h | |
void EnumerateTriEdgeIDsFromEdgeID
(
const int32 EdgeID, |
Applies a given function to both TriEdgeIDs which a given EdgeID is associated with | DynamicMesh/DynamicMesh3.h | |
void EnumerateTriEdgeIDsFromTriID
(
const int TriID, |
Applies a given function to both TriEdgeIDs which each EdgeID in a given Triangle is associated with | DynamicMesh/DynamicMesh3.h | |
void EnumerateVertexEdges
(
int32 VertexID, |
Call EdgeFunc for each one-ring edge of a vertex. | DynamicMesh/DynamicMesh3.h | |
void EnumerateVertexTriangles
(
int32 VertexID, |
Call ApplyFunc for each one-ring triangle of a vertex. | DynamicMesh/DynamicMesh3.h | |
void EnumerateVertexVertices
(
int32 VertexID, |
Call VertexFunc for each one-ring vertex neighbour of a vertex. | DynamicMesh/DynamicMesh3.h | |
int FindEdge
(
int VertexA, |
Find id of edge connecting A and B | DynamicMesh/DynamicMesh3.h | |
int FindEdgeFromTri
(
int VertexA, |
Find edgeid for edge [a,b] from triangle that contains the edge. | DynamicMesh/DynamicMesh3.h | |
int FindEdgeFromTriPair
(
int TriangleA, |
Find edgeid for edge connecting two triangles | DynamicMesh/DynamicMesh3.h | |
int FindTriangle
(
int A, |
Find triangle made up of any permutation of vertices [a,b,c] | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult FlipEdge
(
int EdgeVertA, |
Calls FlipEdge() on the edge between two vertices, if it exists | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult FlipEdge
(
int EdgeAB, |
Flip/Rotate an edge of the mesh. | DynamicMesh/DynamicMesh3.h | |
bool GetAllVertexGroups
(
int VertexID, |
Returns all group IDs at vertex | DynamicMesh/DynamicMesh3.h | |
int GetAllVtxBoundaryEdges
(
int VertexID, |
Find edge ids of boundary edges connected to vertex. | DynamicMesh/DynamicMesh3.h | |
FAxisAlignedBox3d GetBounds
(
bool bParallel |
Geometric queries Returns bounding box of all mesh vertices (including unreferenced vertices) | DynamicMesh/DynamicMesh3.h | |
SIZE_T GetByteCount() |
DynamicMesh/DynamicMesh3.h | ||
uint64 GetChangeStamp() |
ChangeStamp is a combination of the Shape and Topology ChangeStamps | DynamicMesh/DynamicMesh3.h | |
const TDynamicVector< FVector3f > * GetColorsBuffer() |
DynamicMesh/DynamicMesh3.h | ||
int GetComponentsFlags() |
DynamicMesh/DynamicMesh3.h | ||
FEdge GetEdge
(
int EdgeID |
Get the vertices and triangles of an edge, returned as [v0,v1,t0,t1], where t1 may be InvalidID | DynamicMesh/DynamicMesh3.h | |
FVector3d GetEdgeNormal
(
int EdgeID |
Returns average normal of connected face normals | DynamicMesh/DynamicMesh3.h | |
FIndex2i GetEdgeOpposingV
(
int EdgeID |
If edge has vertices [a,b], and is connected two triangles [a,b,c] and [a,b,d], this returns [c,d], or [c,InvalidID] for a boundary edge | DynamicMesh/DynamicMesh3.h | |
FVector3d GetEdgePoint
(
int EdgeID, |
Get point along edge, t clamped to range [0,1] | DynamicMesh/DynamicMesh3.h | |
const FEdge & GetEdgeRef
(
int EdgeID |
Get the vertices and triangles of an edge, returned as [v0,v1,t0,t1], where t1 may be InvalidID | DynamicMesh/DynamicMesh3.h | |
const TDynamicVector< FEdge > & GetEdgesBuffer() |
DynamicMesh/DynamicMesh3.h | ||
const FRefCountVector & GetEdgesRefCounts() |
DynamicMesh/DynamicMesh3.h | ||
FIndex2i GetEdgeT
(
int EdgeID |
Get the triangle pair for an edge. The second triangle may be InvalidID | DynamicMesh/DynamicMesh3.h | |
| Get the vertex pair for an edge | DynamicMesh/DynamicMesh3.h | ||
bool GetEdgeV
(
int EdgeID, |
Get the vertex positions of an edge | DynamicMesh/DynamicMesh3.h | |
int GetMaxVtxEdgeCount() |
DynamicMesh/DynamicMesh3.h | ||
const TDynamicVector< FVector3f > * GetNormalsBuffer() |
DynamicMesh/DynamicMesh3.h | ||
FIndex2i GetOrientedBoundaryEdgeV
(
int EdgeID |
Return edge vertex indices, but oriented based on attached triangle (rather than min-sorted) | DynamicMesh/DynamicMesh3.h | |
uint32 GetShapeChangeStamp() |
ShapeChangeStamp is incremented any time a mesh vertex position is changed or the mesh topology is modified, if bEnableShapeChangeStamp=true | DynamicMesh/DynamicMesh3.h | |
uint32 GetTopologyChangeStamp() |
TopologyChangeStamp is incremented when the mesh topology is modified | DynamicMesh/DynamicMesh3.h | |
FIndex3i GetTriangle
(
int TriangleID |
Get triangle vertices | DynamicMesh/DynamicMesh3.h | |
const TDynamicVector< FIndex3i > & GetTriangleEdges() |
DynamicMesh/DynamicMesh3.h | ||
int GetTriangleGroup
(
int tID |
DynamicMesh/DynamicMesh3.h | ||
const TDynamicVector< int > * GetTriangleGroupsBuffer() |
DynamicMesh/DynamicMesh3.h | ||
const FIndex3i & GetTriangleRef
(
int TriangleID |
Get triangle vertices | DynamicMesh/DynamicMesh3.h | |
const TDynamicVector< FIndex3i > & GetTrianglesBuffer() |
DynamicMesh/DynamicMesh3.h | ||
const FRefCountVector & GetTrianglesRefCounts() |
DynamicMesh/DynamicMesh3.h | ||
double GetTriArea
(
int TriangleID |
Calculate area triangle | DynamicMesh/DynamicMesh3.h | |
FVector3d GetTriBaryNormal
(
int TriangleID, |
Interpolate vertex normals of triangle using barycentric coordinates | DynamicMesh/DynamicMesh3.h | |
FVector3d GetTriBaryPoint
(
int TriangleID, |
Interpolate vertex positions of triangle using barycentric coordinates | DynamicMesh/DynamicMesh3.h | |
void GetTriBaryPoint
(
int TriangleID, |
Compute interpolated vertex attributes at point of triangle | DynamicMesh/DynamicMesh3.h | |
FAxisAlignedBox3d GetTriBounds
(
int TriangleID |
Construct bounding box of triangle as efficiently as possible | DynamicMesh/DynamicMesh3.h | |
FVector3d GetTriCentroid
(
int TriangleID |
Compute centroid of triangle | DynamicMesh/DynamicMesh3.h | |
int GetTriEdge
(
int TriangleID, |
Get one of the edges of a triangle | DynamicMesh/DynamicMesh3.h | |
FMeshTriEdgeID GetTriEdgeIDFromEdgeID
(
int EdgeID |
Return (triangle, edge_index) representation for given Edge ID | DynamicMesh/DynamicMesh3.h | |
FIndex3i GetTriEdges
(
int TriangleID |
Get triangle edges | DynamicMesh/DynamicMesh3.h | |
const FIndex3i & GetTriEdgesRef
(
int TriangleID |
Get triangle edges | DynamicMesh/DynamicMesh3.h | |
FFrame3d GetTriFrame
(
int TriangleID, |
Construct stable frame at triangle centroid, where frame.Z is face normal, and frame.X is aligned with edge nEdge of triangle. | DynamicMesh/DynamicMesh3.h | |
void GetTriInfo
(
int TriangleID, |
Compute triangle normal, area, and centroid all at once. | DynamicMesh/DynamicMesh3.h | |
double GetTriInternalAngleR
(
int TriangleID, |
Compute internal angle at vertex i of triangle (where i is 0,1,2); | DynamicMesh/DynamicMesh3.h | |
FVector3d GetTriInternalAnglesR
(
int TriangleID |
Compute internal angles at all vertices of triangle | DynamicMesh/DynamicMesh3.h | |
FIndex3i GetTriNeighbourTris
(
int TriangleID |
Find the neighbour triangles of a triangle (any of them might be InvalidID) | DynamicMesh/DynamicMesh3.h | |
FVector3d GetTriNormal
(
int TriangleID |
Calculate face normal of triangle | DynamicMesh/DynamicMesh3.h | |
double GetTriSolidAngle
(
int TriangleID, |
Compute solid angle of oriented triangle tID relative to point p - see WindingNumber() | DynamicMesh/DynamicMesh3.h | |
FVector3d GetTriVertex
(
int TriangleID, |
Get the position of one of the vertices of a triangle | DynamicMesh/DynamicMesh3.h | |
void GetTriVertices
(
int TriangleID, |
Get the three vertex positions of a triangle | DynamicMesh/DynamicMesh3.h | |
const TDynamicVector< FVector2f > * GetUVBuffer() |
DynamicMesh/DynamicMesh3.h | ||
FVector3d GetVertex
(
int VertexID |
Vertex/Tri/Edge accessors | DynamicMesh/DynamicMesh3.h | |
bool GetVertex
(
int VertexID, |
Get extended vertex information | DynamicMesh/DynamicMesh3.h | |
FVector3f GetVertexColor
(
int vID |
DynamicMesh/DynamicMesh3.h | ||
const FSmallListSet & GetVertexEdges() |
DynamicMesh/DynamicMesh3.h | ||
FFrame3d GetVertexFrame
(
int VertexID, |
Compute a normal/tangent frame at vertex that is "stable" as long as the mesh topology doesn't change, meaning that one axis of the frame will be computed from projection of outgoing edge. | DynamicMesh/DynamicMesh3.h | |
bool GetVertexGroups
(
int VertexID, |
Returns up to 4 group IDs at vertex. Returns false if > 4 encountered | DynamicMesh/DynamicMesh3.h | |
FVertexInfo GetVertexInfo
(
int VertexID |
Get all vertex information available | DynamicMesh/DynamicMesh3.h | |
FVector3f GetVertexNormal
(
int vID |
DynamicMesh/DynamicMesh3.h | ||
const FVector3d & GetVertexRef
(
int VertexID |
DynamicMesh/DynamicMesh3.h | ||
FVector2f GetVertexUV
(
int vID |
DynamicMesh/DynamicMesh3.h | ||
const TDynamicVector< FVector3d > & GetVerticesBuffer() |
Direct buffer access | DynamicMesh/DynamicMesh3.h | |
const FRefCountVector & GetVerticesRefCounts() |
DynamicMesh/DynamicMesh3.h | ||
int GetVtxBoundaryEdges
(
int VertexID, |
Returns count of boundary edges at vertex, and the first two boundary edges if found. | DynamicMesh/DynamicMesh3.h | |
EMeshResult GetVtxContiguousTriangles
(
int VertexID, |
Get triangles connected to vertex in contiguous order, with multiple groups if vertex is a bowtie. | DynamicMesh/DynamicMesh3.h | |
int GetVtxEdgeCount
(
int VertexID |
DynamicMesh/DynamicMesh3.h | ||
void GetVtxNbrhood
(
int EdgeID, |
Given an edge and vertex on that edge, returns other vertex of edge, the two opposing verts, and the two connected triangles (OppVert2Out and Tri2Out are be InvalidID for boundary edge) | DynamicMesh/DynamicMesh3.h | |
void GetVtxOneRingCentroid
(
int VertexID, |
Fastest possible one-ring centroid. | DynamicMesh/DynamicMesh3.h | |
int GetVtxSingleTriangle
(
int VertexID |
DynamicMesh/DynamicMesh3.h | ||
int GetVtxTriangleCount
(
int VertexID |
Return # of triangles attached to vID, or -1 if invalid vertex | DynamicMesh/DynamicMesh3.h | |
EMeshResult GetVtxTriangles
(
int VertexID, |
Get triangle one-ring at vertex. | DynamicMesh/DynamicMesh3.h | |
bool HasAttributes() |
DynamicMesh/DynamicMesh3.h | ||
bool HasShapeChangeStampEnabled() |
DynamicMesh/DynamicMesh3.h | ||
bool HasTriangleGroups() |
DynamicMesh/DynamicMesh3.h | ||
bool HasUnusedVertices() |
DynamicMesh/DynamicMesh3.h | ||
bool HasVertexColors() |
DynamicMesh/DynamicMesh3.h | ||
bool HasVertexNormals() |
DynamicMesh/DynamicMesh3.h | ||
bool HasVertexUVs() |
DynamicMesh/DynamicMesh3.h | ||
EMeshResult InsertTriangle
(
int TriangleID, |
Insert triangle at given index, assuming it is unused. | DynamicMesh/DynamicMesh3.h | |
EMeshResult InsertVertex
(
int VertexID, |
Insert vertex at given index, assuming it is unused. | DynamicMesh/DynamicMesh3.h | |
bool IsBoundaryEdge
(
int EdgeID |
Topological queries Returns true if edge is on the mesh boundary, ie only connected to one triangle | DynamicMesh/DynamicMesh3.h | |
bool IsBoundaryTriangle
(
int TriangleID |
Returns true if any edge of triangle is a boundary edge | DynamicMesh/DynamicMesh3.h | |
bool IsBoundaryVertex
(
int VertexID |
Returns true if the vertex is part of any boundary edges | DynamicMesh/DynamicMesh3.h | |
bool IsBowtieVertex
(
int VertexID |
Returns true if vID is a "bowtie" vertex, ie multiple disjoint triangle sets in one-ring | DynamicMesh/DynamicMesh3.h | |
bool IsClosed() |
DynamicMesh/DynamicMesh3.h | ||
bool IsCompact() |
Returns true if vertices, edges, and triangles are all dense (Count == MaxID) | DynamicMesh/DynamicMesh3.h | |
bool IsCompactT() |
DynamicMesh/DynamicMesh3.h | ||
bool IsCompactV() |
DynamicMesh/DynamicMesh3.h | ||
bool IsEdge
(
int EdgeID |
DynamicMesh/DynamicMesh3.h | ||
bool IsGroupBoundaryEdge
(
int EdgeID |
Returns true if the two triangles connected to edge have different group IDs | DynamicMesh/DynamicMesh3.h | |
bool IsGroupBoundaryVertex
(
int VertexID |
Returns true if vertex has more than one tri group in its tri nbrhood | DynamicMesh/DynamicMesh3.h | |
bool IsGroupJunctionVertex
(
int VertexID |
Returns true if more than two group boundary edges meet at vertex (ie 3+ groups meet at this vertex) | DynamicMesh/DynamicMesh3.h | |
bool IsReferencedVertex
(
int VertexID |
DynamicMesh/DynamicMesh3.h | ||
virtual bool IsSameAs
(
const FDynamicMesh3& OtherMesh, |
Check if another mesh is the same as this mesh. | DynamicMesh/DynamicMesh3.h | |
virtual bool IsSameAs
(
const FDynamicMesh3& OtherMesh, |
Check if another mesh is the same as this mesh. | DynamicMesh/DynamicMesh3.h | |
bool IsTriangle
(
int TriangleID |
DynamicMesh/DynamicMesh3.h | ||
bool IsVertex
(
int VertexID |
DynamicMesh/DynamicMesh3.h | ||
int MaxEdgeID() |
DynamicMesh/DynamicMesh3.h | ||
int MaxGroupID() |
DynamicMesh/DynamicMesh3.h | ||
int MaxTriangleID() |
DynamicMesh/DynamicMesh3.h | ||
int MaxVertexID() |
DynamicMesh/DynamicMesh3.h | ||
virtual EMeshResult MergeEdges
(
int KeepEdgeID, |
Weld one edge to the other. | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult MergeEdges
(
int KeepEdgeID, |
Given two edges of the mesh, weld both their vertices, so that one edge is removed. | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult MergeVertices
(
int KeepVid, |
Weld DiscardVid to KeepVid. | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult MergeVertices
(
int KeepVid, |
Weld DiscardVid to KeepVid. Equivalent to calling the options overload with default options. | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult MergeVertices
(
int KeepVid, |
Weld DiscardVid to KeepVid, if topologically possible and options allow. | DynamicMesh/DynamicMesh3.h | |
virtual FString MeshInfoString() |
Debug utility functions Returns a debug string that contains mesh statistics and other information | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult PokeTriangle
(
int TriangleID, |
Call PokeTriangle at the centroid of the triangle | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult PokeTriangle
(
int TriangleID, |
Insert a new vertex inside a triangle, ie do a 1 to 3 triangle split | DynamicMesh/DynamicMesh3.h | |
EMeshResult RemoveTriangle
(
int TriangleID, |
Remove a triangle from the mesh. | DynamicMesh/DynamicMesh3.h | |
void RemoveUnusedVertices() |
Remove unused vertices. Note: Does not compact the remaining vertices. | DynamicMesh/DynamicMesh3.h | |
EMeshResult RemoveVertex
(
int VertexID, |
Remove vertex VertexID and all connected triangles. | DynamicMesh/DynamicMesh3.h | |
void ReverseOrientation
(
bool bFlipNormals |
Reverse the ccw/cw orientation of all triangles in the mesh, and optionally flip the vertex normals if they exist | DynamicMesh/DynamicMesh3.h | |
EMeshResult ReverseTriOrientation
(
int TriangleID |
Reverse the ccw/cw orientation of a triangle | DynamicMesh/DynamicMesh3.h | |
void Serialize
(
FArchive& Ar |
Serialize the mesh to an archive. | DynamicMesh/DynamicMesh3.h | |
void SetShapeChangeStampEnabled
(
bool bEnabled |
Change Tracking support | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult SetTriangle
(
int TriangleID, |
Rewrite the triangle to reference the new tuple of vertices. | DynamicMesh/DynamicMesh3.h | |
void SetTriangleGroup
(
int tid, |
DynamicMesh/DynamicMesh3.h | ||
void SetVertex
(
int VertexID, |
Set vertex position | DynamicMesh/DynamicMesh3.h | |
void SetVertexColor
(
int vID, |
DynamicMesh/DynamicMesh3.h | ||
void SetVertexNormal
(
int vID, |
DynamicMesh/DynamicMesh3.h | ||
void SetVertexUV
(
int vID, |
DynamicMesh/DynamicMesh3.h | ||
EMeshResult SplitEdge
(
int EdgeVertA, |
Splits the edge between two vertices at the midpoint, if this edge exists | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult SplitEdge
(
int EdgeAB, |
Split an edge of the mesh by inserting a vertex. | DynamicMesh/DynamicMesh3.h | |
virtual EMeshResult SplitVertex
(
int VertexID, |
Clones the given vertex and updates any provided triangles to use the new vertex if/where they used the old one. | DynamicMesh/DynamicMesh3.h | |
virtual bool SplitVertexWouldLeaveIsolated
(
int VertexID, |
Tests whether splitting the given vertex with the given triangles would leave no triangles attached to the original vertex (creating an isolated vertex) | DynamicMesh/DynamicMesh3.h | |
int TriangleCount() |
DynamicMesh/DynamicMesh3.h | ||
triangle_iterator TriangleIndicesItr() |
DynamicMesh/DynamicMesh3.h | ||
value_iteration< FIndex3i > TrianglesItr() |
Enumerate all triangles in the mesh | DynamicMesh/DynamicMesh3.h | |
void UpdateChangeStamps
(
bool bShapeChange, |
Increment the specified ChangeStamps, if they are enabled. Thread-safe. | DynamicMesh/DynamicMesh3.h | |
int VertexCount() |
DynamicMesh/DynamicMesh3.h | ||
vertex_iterator VertexIndicesItr() |
DynamicMesh/DynamicMesh3.h | ||
value_iteration< FVector3d > VerticesItr() |
Enumerate positions of all vertices in mesh | DynamicMesh/DynamicMesh3.h | |
FSmallListSet::ValueEnumerable VtxEdgesItr
(
int VertexID |
DynamicMesh/DynamicMesh3.h | ||
vtx_triangles_enumerable VtxTrianglesItr
(
int VertexID |
DynamicMesh/DynamicMesh3.h | ||
FSmallListSet::MappedValueEnumerable VtxVerticesItr
(
int VertexID |
DynamicMesh/DynamicMesh3.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int AddEdgeInternal
(
int vA, |
DynamicMesh/DynamicMesh3.h | ||
void AddTriangleEdge
(
int TriangleID, |
DynamicMesh/DynamicMesh3.h | ||
int AddTriangleInternal
(
int a, |
DynamicMesh/DynamicMesh3.h | ||
void AllocateEdgesList
(
int VertexID |
DynamicMesh/DynamicMesh3.h | ||
virtual EMeshResult CanCollapseEdgeInternal
(
int vKeep, |
We keep this version of CanCollapseEdge internal because the CollapseInfo struct may only be partially filled out by the function | DynamicMesh/DynamicMesh3.h | |
bool EdgeHasTriangle
(
int EdgeID, |
DynamicMesh/DynamicMesh3.h | ||
bool EdgeHasVertex
(
int EdgeID, |
DynamicMesh/DynamicMesh3.h | ||
int32 FindEdgeInternal
(
int32 vA, |
DynamicMesh/DynamicMesh3.h | ||
int FindTriangleEdge
(
int TriangleID, |
Returns edge ID | DynamicMesh/DynamicMesh3.h | |
FIndex2i GetOrderedOneRingEdgeTris
(
int VertexID, |
Utility function that returns one or two triangles of edge, used to enumerate vertex one-ring triangles The logic is a bit tricky to follow without drawing it out on paper, but this will only return each triangle once, for the 'outgoing' edge from the vertex, and each triangle only has one such edge at any vertex (including boundary triangles) | DynamicMesh/DynamicMesh3.h | |
int GetOtherEdgeTriangle
(
int EdgeID, |
DynamicMesh/DynamicMesh3.h | ||
int GetOtherEdgeVertex
(
int EdgeID, |
DynamicMesh/DynamicMesh3.h | ||
void GetVertexEdgesList
(
int VertexID, |
DynamicMesh/DynamicMesh3.h | ||
int ReplaceEdgeTriangle
(
int EdgeID, |
DynamicMesh/DynamicMesh3.h | ||
int ReplaceEdgeVertex
(
int EdgeID, |
DynamicMesh/DynamicMesh3.h | ||
int ReplaceTriangleEdge
(
int EdgeID, |
DynamicMesh/DynamicMesh3.h | ||
int ReplaceTriangleVertex
(
int TriangleID, |
DynamicMesh/DynamicMesh3.h | ||
void ReverseTriOrientationInternal
(
int TriangleID |
DynamicMesh/DynamicMesh3.h | ||
void SerializeInternal
(
FArchive& Ar, |
|||
void SerializeInternal
(
FArchive&, |
|||
void SerializeInternal
(
FArchive& Ar, |
Internal implementations for serialization to allow for better code separation between different versions and other implementation details. | DynamicMesh/DynamicMesh3.h | |
void SetEdgeTrianglesInternal
(
int EdgeID, |
DynamicMesh/DynamicMesh3.h | ||
void SetEdgeVerticesInternal
(
int EdgeID, |
DynamicMesh/DynamicMesh3.h | ||
void SetTriangleEdgesInternal
(
int TriangleID, |
DynamicMesh/DynamicMesh3.h | ||
void SetTriangleInternal
(
int TriangleID, |
Internal functions | DynamicMesh/DynamicMesh3.h | |
bool TriangleHasVertex
(
int TriangleID, |
DynamicMesh/DynamicMesh3.h | ||
bool TriHasNeighbourTri
(
int CheckTriID, |
DynamicMesh/DynamicMesh3.h | ||
bool TriHasSequentialVertices
(
int TriangleID, |
DynamicMesh/DynamicMesh3.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FDynamicMesh3 & operator=
(
const FDynamicMesh3& CopyMesh |
Copy and move assignment | DynamicMesh/DynamicMesh3.h | |
const FDynamicMesh3 & operator=
(
FDynamicMesh3&& MoveMesh |
DynamicMesh/DynamicMesh3.h |