|
| GEOMETRYCORE_API | FDynamicMesh3 () |
| |
| GEOMETRYCORE_API | FDynamicMesh3 (const FDynamicMesh3 &CopyMesh) |
| |
| GEOMETRYCORE_API | FDynamicMesh3 (FDynamicMesh3 &&MoveMesh) |
| |
| GEOMETRYCORE_API const FDynamicMesh3 & | operator= (const FDynamicMesh3 &CopyMesh) |
| |
| GEOMETRYCORE_API const FDynamicMesh3 & | operator= (FDynamicMesh3 &&MoveMesh) |
| |
| virtual GEOMETRYCORE_API | ~FDynamicMesh3 () |
| |
| GEOMETRYCORE_API | FDynamicMesh3 (bool bWantNormals, bool bWantColors, bool bWantUVs, bool bWantTriGroups) |
| |
| GEOMETRYCORE_API | FDynamicMesh3 (EMeshComponents flags) |
| |
| GEOMETRYCORE_API | FDynamicMesh3 (const FMeshShapeGenerator *Generator) |
| |
| GEOMETRYCORE_API void | Copy (const FDynamicMesh3 &CopyMesh, bool bNormals=true, bool bColors=true, bool bUVs=true, bool bAttributes=true) |
| |
| GEOMETRYCORE_API bool | Copy (const FMeshShapeGenerator *Generator) |
| |
| GEOMETRYCORE_API void | AppendWithOffsets (const FDynamicMesh3 &ToAppend, FAppendInfo *OutAppendInfo=nullptr) |
| |
| GEOMETRYCORE_API void | CompactCopy (const FDynamicMesh3 &CopyMesh, bool bNormals=true, bool bColors=true, bool bUVs=true, bool bAttributes=true, FCompactMaps *CompactInfo=nullptr) |
| |
| GEOMETRYCORE_API void | Clear () |
| |
| GEOMETRYCORE_API void | EnableMatchingAttributes (const FDynamicMesh3 &ToMatch, bool bClearExisting=true, bool bDiscardExtraAttributes=false) |
| |
| GEOMETRYCORE_API void | Serialize (FArchive &Ar) |
| |
| int | VertexCount () const |
| |
| int | TriangleCount () const |
| |
| int | EdgeCount () const |
| |
| int | MaxVertexID () const |
| |
| int | MaxTriangleID () const |
| |
| int | MaxEdgeID () const |
| |
| int | MaxGroupID () const |
| |
| bool | HasVertexNormals () const |
| |
| bool | HasVertexColors () const |
| |
| bool | HasVertexUVs () const |
| |
| bool | HasTriangleGroups () const |
| |
| bool | HasAttributes () const |
| |
| GEOMETRYCORE_API int | GetComponentsFlags () const |
| |
| bool | IsVertex (int VertexID) const |
| |
| bool | IsReferencedVertex (int VertexID) const |
| |
| bool | IsTriangle (int TriangleID) const |
| |
| bool | IsEdge (int EdgeID) const |
| |
| void | SetShapeChangeStampEnabled (bool bEnabled) |
| |
| void | SetTopologyChangeStampEnabled (bool bEnabled) |
| |
| bool | HasShapeChangeStampEnabled () const |
| |
| bool | HasTopologyChangeStampEnabled () const |
| |
| void | UpdateChangeStamps (bool bShapeChange, bool bTopologyChange) |
| |
| uint32 | GetShapeChangeStamp () const |
| |
| uint32 | GetTopologyChangeStamp () const |
| |
| uint64 | GetChangeStamp () const |
| |
| vertex_iterator | VertexIndicesItr () const |
| |
| triangle_iterator | TriangleIndicesItr () const |
| |
| edge_iterator | EdgeIndicesItr () const |
| |
| FRefCountVector::FilteredEnumerable | BoundaryEdgeIndicesItr () const |
| |
| value_iteration< FVector3d > | VerticesItr () const |
| |
| value_iteration< FIndex3i > | TrianglesItr () const |
| |
| value_iteration< FEdge > | EdgesItr () const |
| |
| FSmallListSet::MappedValueEnumerable | VtxVerticesItr (int VertexID) const |
| |
| void | EnumerateVertexVertices (int32 VertexID, TFunctionRef< void(int32)> VertexFunc) const |
| |
| FSmallListSet::ValueEnumerable | VtxEdgesItr (int VertexID) const |
| |
| void | EnumerateVertexEdges (int32 VertexID, TFunctionRef< void(int32)> EdgeFunc) const |
| |
| vtx_triangles_enumerable | VtxTrianglesItr (int VertexID) const |
| |
| GEOMETRYCORE_API void | EnumerateVertexTriangles (int32 VertexID, TFunctionRef< void(int32)> ApplyFunc) const |
| |
| GEOMETRYCORE_API int32 | GetSingleVertexTriangle (int32 VID) const |
| |
| GEOMETRYCORE_API void | EnumerateEdgeTriangles (int32 EdgeID, TFunctionRef< void(int32)> ApplyFunc) const |
| |
| GEOMETRYCORE_API int | AppendVertex (const FVertexInfo &VertInfo) |
| |
| int | AppendVertex (const FVector3d &Position) |
| |
| GEOMETRYCORE_API int | AppendVertex (const FDynamicMesh3 &SourceMesh, int SourceVertexID) |
| |
| GEOMETRYCORE_API int | AppendTriangle (const FIndex3i &TriVertices, int GroupID=0) |
| |
| int | AppendTriangle (int Vertex0, int Vertex1, int Vertex2, int GroupID=0) |
| |
| virtual void | BeginUnsafeVerticesInsert () |
| |
| virtual void | EndUnsafeVerticesInsert () |
| |
| GEOMETRYCORE_API EMeshResult | InsertVertex (int VertexID, const FVertexInfo &VertInfo, bool bUnsafe=false) |
| |
| virtual void | BeginUnsafeTrianglesInsert () |
| |
| virtual void | EndUnsafeTrianglesInsert () |
| |
| GEOMETRYCORE_API EMeshResult | InsertTriangle (int TriangleID, const FIndex3i &TriVertices, int GroupID=0, bool bUnsafe=false) |
| |
| FVector3d | GetVertex (int VertexID) const |
| |
| const FVector3d & | GetVertexRef (int VertexID) const |
| |
| void | SetVertex (int VertexID, const FVector3d &vNewPos, bool bTrackChange=true) |
| |
| GEOMETRYCORE_API bool | GetVertex (int VertexID, FVertexInfo &VertInfo, bool bWantNormals, bool bWantColors, bool bWantUVs) const |
| |
| GEOMETRYCORE_API FVertexInfo | GetVertexInfo (int VertexID) const |
| |
| int | GetVtxEdgeCount (int VertexID) const |
| |
| GEOMETRYCORE_API int | GetMaxVtxEdgeCount () const |
| |
| FIndex3i | GetTriangle (int TriangleID) const |
| |
| const FIndex3i & | GetTriangleRef (int TriangleID) const |
| |
| FIndex3i | GetTriEdges (int TriangleID) const |
| |
| const FIndex3i & | GetTriEdgesRef (int TriangleID) const |
| |
| int | GetTriEdge (int TriangleID, int j) const |
| |
| void | EnumerateTriEdgeIDsFromTriID (const int TriID, const TFunctionRef< void(FMeshTriEdgeID TriEdgeID)> &TriEdgeFunc) const |
| |
| GEOMETRYCORE_API FIndex3i | GetTriNeighbourTris (int TriangleID) const |
| |
| template<typename VecType > |
| void | GetTriVertices (int TriangleID, VecType &v0, VecType &v1, VecType &v2) const |
| |
| FVector3d | GetTriVertex (int TriangleID, int j) const |
| |
| FEdge | GetEdge (int EdgeID) const |
| |
| const FEdge & | GetEdgeRef (int EdgeID) const |
| |
| FIndex2i | GetEdgeV (int EdgeID) const |
| |
| bool | GetEdgeV (int EdgeID, FVector3d &a, FVector3d &b) const |
| |
| FIndex2i | GetEdgeT (int EdgeID) const |
| |
| GEOMETRYCORE_API FIndex2i | GetOrientedBoundaryEdgeV (int EdgeID) const |
| |
| FMeshTriEdgeID | GetTriEdgeIDFromEdgeID (int EdgeID) const |
| |
| void | EnumerateTriEdgeIDsFromEdgeID (const int32 EdgeID, const TFunctionRef< void(FMeshTriEdgeID TriEdgeID)> &TriEdgeFunc) const |
| |
| GEOMETRYCORE_API void | EnableMeshComponents (int MeshComponentsFlags) |
| |
| GEOMETRYCORE_API void | EnableVertexNormals (const FVector3f &InitialNormal) |
| |
| GEOMETRYCORE_API void | DiscardVertexNormals () |
| |
| FVector3f | GetVertexNormal (int vID) const |
| |
| void | SetVertexNormal (int vID, const FVector3f &vNewNormal) |
| |
| GEOMETRYCORE_API void | EnableVertexColors (const FVector3f &InitialColor) |
| |
| GEOMETRYCORE_API void | DiscardVertexColors () |
| |
| FVector3f | GetVertexColor (int vID) const |
| |
| void | SetVertexColor (int vID, const FVector3f &vNewColor) |
| |
| GEOMETRYCORE_API void | EnableVertexUVs (const FVector2f &InitialUV) |
| |
| GEOMETRYCORE_API void | DiscardVertexUVs () |
| |
| FVector2f | GetVertexUV (int vID) const |
| |
| void | SetVertexUV (int vID, const FVector2f &vNewUV) |
| |
| GEOMETRYCORE_API void | EnableTriangleGroups (int InitialGroupID=0) |
| |
| GEOMETRYCORE_API void | DiscardTriangleGroups () |
| |
| int | AllocateTriangleGroup () |
| |
| int | GetTriangleGroup (int tID) const |
| |
| void | SetTriangleGroup (int tid, int group_id) |
| |
| FDynamicMeshAttributeSet * | Attributes () |
| |
| const FDynamicMeshAttributeSet * | Attributes () const |
| |
| GEOMETRYCORE_API void | EnableAttributes () |
| |
| GEOMETRYCORE_API void | DiscardAttributes () |
| |
| bool | IsBoundaryEdge (int EdgeID) const |
| |
| GEOMETRYCORE_API bool | IsBoundaryVertex (int VertexID) const |
| |
| GEOMETRYCORE_API bool | IsBoundaryTriangle (int TriangleID) const |
| |
| GEOMETRYCORE_API int | FindEdge (int VertexA, int VertexB) const |
| |
| GEOMETRYCORE_API int | FindEdgeFromTri (int VertexA, int VertexB, int TriangleID) const |
| |
| GEOMETRYCORE_API int | FindEdgeFromTriPair (int TriangleA, int TriangleB) const |
| |
| GEOMETRYCORE_API int | FindTriangle (int A, int B, int C) const |
| |
| GEOMETRYCORE_API FIndex2i | GetEdgeOpposingV (int EdgeID) const |
| |
| GEOMETRYCORE_API void | GetVtxNbrhood (int EdgeID, int VertexID, int &OtherVertOut, int &OppVert1Out, int &OppVert2Out, int &Tri1Out, int &Tri2Out) const |
| |
| GEOMETRYCORE_API int | GetVtxBoundaryEdges (int VertexID, int &Edge0Out, int &Edge1Out) const |
| |
| template<typename ArrayType = FLocalIntArray> |
| GEOMETRYCORE_API int | GetAllVtxBoundaryEdges (int VertexID, ArrayType &EdgeListOut) const |
| |
| GEOMETRYCORE_API int | GetVtxTriangleCount (int VertexID) const |
| |
| template<typename ArrayType = FLocalIntArray> |
| GEOMETRYCORE_API EMeshResult | GetVtxTriangles (int VertexID, ArrayType &TrianglesOut) const |
| |
| GEOMETRYCORE_API int | GetVtxSingleTriangle (int VertexID) const |
| |
| template<typename IntArrayType = FLocalIntArray, typename BoolArrayType = FLocalBoolArray> |
| GEOMETRYCORE_API EMeshResult | GetVtxContiguousTriangles (int VertexID, IntArrayType &TrianglesOut, IntArrayType &ContiguousGroupLengths, BoolArrayType &GroupIsLoop) const |
| |
| GEOMETRYCORE_API bool | IsGroupBoundaryEdge (int EdgeID) const |
| |
| GEOMETRYCORE_API bool | IsGroupBoundaryVertex (int VertexID) const |
| |
| GEOMETRYCORE_API bool | IsGroupJunctionVertex (int VertexID) const |
| |
| GEOMETRYCORE_API bool | GetVertexGroups (int VertexID, FIndex4i &GroupsOut) const |
| |
| template<typename ArrayType = FLocalIntArray> |
| GEOMETRYCORE_API bool | GetAllVertexGroups (int VertexID, ArrayType &GroupsOut) const |
| |
| GEOMETRYCORE_API bool | IsBowtieVertex (int VertexID) const |
| |
| bool | IsCompact () const |
| |
| bool | IsCompactV () const |
| |
| bool | IsCompactT () const |
| |
| double | CompactMetric () const |
| |
| GEOMETRYCORE_API bool | IsClosed () const |
| |
| GEOMETRYCORE_API FAxisAlignedBox3d | GetBounds (bool bParallel=false) const |
| |
| GEOMETRYCORE_API FFrame3d | GetVertexFrame (int VertexID, bool bFrameNormalY=false, FVector3d *UseNormal=nullptr) const |
| |
| GEOMETRYCORE_API FVector3d | GetTriNormal (int TriangleID) const |
| |
| GEOMETRYCORE_API double | GetTriArea (int TriangleID) const |
| |
| GEOMETRYCORE_API void | GetTriInfo (int TriangleID, FVector3d &Normal, double &Area, FVector3d &Centroid) const |
| |
| GEOMETRYCORE_API FVector3d | GetTriCentroid (int TriangleID) const |
| |
| GEOMETRYCORE_API FVector3d | GetTriBaryPoint (int TriangleID, double Bary0, double Bary1, double Bary2) const |
| |
| GEOMETRYCORE_API FVector3d | GetTriBaryNormal (int TriangleID, double Bary0, double Bary1, double Bary2) const |
| |
| GEOMETRYCORE_API void | GetTriBaryPoint (int TriangleID, double Bary0, double Bary1, double Bary2, FVertexInfo &VertInfo) const |
| |
| GEOMETRYCORE_API FAxisAlignedBox3d | GetTriBounds (int TriangleID) const |
| |
| GEOMETRYCORE_API FFrame3d | GetTriFrame (int TriangleID, int Edge=0) const |
| |
| GEOMETRYCORE_API double | GetTriSolidAngle (int TriangleID, const FVector3d &p) const |
| |
| GEOMETRYCORE_API double | GetTriInternalAngleR (int TriangleID, int i) const |
| |
| GEOMETRYCORE_API FVector3d | GetTriInternalAnglesR (int TriangleID) const |
| |
| GEOMETRYCORE_API FVector3d | GetEdgeNormal (int EdgeID) const |
| |
| GEOMETRYCORE_API FVector3d | GetEdgePoint (int EdgeID, double ParameterT) const |
| |
| GEOMETRYCORE_API void | GetVtxOneRingCentroid (int VertexID, FVector3d &CentroidOut) const |
| |
| GEOMETRYCORE_API double | CalculateWindingNumber (const FVector3d &QueryPoint) const |
| |
| const TDynamicVector< FVector3d > & | GetVerticesBuffer () const |
| |
| const FRefCountVector & | GetVerticesRefCounts () const |
| |
| const TDynamicVector< FVector3f > * | GetNormalsBuffer () const |
| |
| const TDynamicVector< FVector3f > * | GetColorsBuffer () const |
| |
| const TDynamicVector< FVector2f > * | GetUVBuffer () const |
| |
| const TDynamicVector< FIndex3i > & | GetTrianglesBuffer () const |
| |
| const FRefCountVector & | GetTrianglesRefCounts () const |
| |
| const TDynamicVector< int > * | GetTriangleGroupsBuffer () const |
| |
| const TDynamicVector< FEdge > & | GetEdgesBuffer () const |
| |
| const FRefCountVector & | GetEdgesRefCounts () const |
| |
| const FSmallListSet & | GetVertexEdges () const |
| |
| const TDynamicVector< FIndex3i > & | GetTriangleEdges () const |
| |
| GEOMETRYCORE_API void | CompactInPlace (FCompactMaps *CompactInfo=nullptr) |
| |
| GEOMETRYCORE_API int32 | RemoveUnusedVertices () |
| |
| GEOMETRYCORE_API bool | HasUnusedVertices () const |
| |
| GEOMETRYCORE_API void | ReverseOrientation (bool bFlipNormals=true) |
| |
| GEOMETRYCORE_API EMeshResult | ReverseTriOrientation (int TriangleID) |
| |
| GEOMETRYCORE_API EMeshResult | RemoveVertex (int VertexID, bool bPreserveManifold=false) |
| |
| GEOMETRYCORE_API EMeshResult | RemoveTriangle (int TriangleID, bool bRemoveIsolatedVertices=true, bool bPreserveManifold=false) |
| |
| virtual GEOMETRYCORE_API EMeshResult | SetTriangle (int TriangleID, const FIndex3i &NewVertices, bool bRemoveIsolatedVertices=true) |
| |
| virtual GEOMETRYCORE_API EMeshResult | SplitEdge (int EdgeAB, FEdgeSplitInfo &SplitInfo, double SplitParameterT=0.5) |
| |
| GEOMETRYCORE_API EMeshResult | SplitEdge (int EdgeVertA, int EdgeVertB, FEdgeSplitInfo &SplitInfo) |
| |
| virtual GEOMETRYCORE_API EMeshResult | FlipEdge (int EdgeAB, FEdgeFlipInfo &FlipInfo) |
| |
| virtual GEOMETRYCORE_API EMeshResult | FlipEdge (int EdgeVertA, int EdgeVertB, FEdgeFlipInfo &FlipInfo) |
| |
| virtual GEOMETRYCORE_API EMeshResult | SplitVertex (int VertexID, const TArrayView< const int > &TrianglesToUpdate, FVertexSplitInfo &SplitInfo) |
| |
| virtual GEOMETRYCORE_API bool | SplitVertexWouldLeaveIsolated (int VertexID, const TArrayView< const int > &TrianglesToUpdate) |
| |
| virtual GEOMETRYCORE_API EMeshResult | CanCollapseEdge (int vKeep, int vRemove, const FCollapseEdgeOptions &Options) const |
| |
| virtual GEOMETRYCORE_API EMeshResult | CanCollapseEdge (int vKeep, int vRemove, double EdgeParameterT=0) const |
| |
| virtual GEOMETRYCORE_API EMeshResult | CollapseEdge (int KeepVertID, int RemoveVertID, double EdgeParameterT, const FCollapseEdgeOptions &Options, FEdgeCollapseInfo &CollapseInfo) |
| |
| virtual EMeshResult | CollapseEdge (int KeepVertID, int RemoveVertID, const FCollapseEdgeOptions &Options, FEdgeCollapseInfo &CollapseInfo) |
| |
| virtual GEOMETRYCORE_API EMeshResult | CollapseEdge (int KeepVertID, int RemoveVertID, double EdgeParameterT, FEdgeCollapseInfo &CollapseInfo) |
| |
| virtual EMeshResult | CollapseEdge (int KeepVertID, int RemoveVertID, FEdgeCollapseInfo &CollapseInfo) |
| |
| virtual GEOMETRYCORE_API EMeshResult | MergeEdges (int KeepEdgeID, int DiscardEdgeID, double InterpolationT, FMergeEdgesInfo &MergeInfo, bool bCheckValidOrientation=true) |
| |
| virtual GEOMETRYCORE_API EMeshResult | MergeEdges (int KeepEdgeID, int DiscardEdgeID, FMergeEdgesInfo &MergeInfo, bool bCheckValidOrientation=true) |
| |
| virtual GEOMETRYCORE_API EMeshResult | MergeVertices (int KeepVid, int DiscardVid, double InterpolationT, const FMergeVerticesOptions &Options, FMergeVerticesInfo &MergeInfo) |
| |
| virtual EMeshResult | MergeVertices (int KeepVid, int DiscardVid, double InterpolationT, FMergeVerticesInfo &MergeInfo) |
| |
| virtual EMeshResult | MergeVertices (int KeepVid, int DiscardVid, FMergeVerticesInfo &MergeInfo) |
| |
| virtual GEOMETRYCORE_API EMeshResult | PokeTriangle (int TriangleID, const FVector3d &BaryCoordinates, FPokeTriangleInfo &PokeInfo) |
| |
| virtual EMeshResult | PokeTriangle (int TriangleID, FPokeTriangleInfo &PokeInfo) |
| |
| virtual GEOMETRYCORE_API FString | MeshInfoString () const |
| |
| GEOMETRYCORE_API SIZE_T | GetByteCount () const |
| |
| virtual GEOMETRYCORE_API bool | IsSameAs (const FDynamicMesh3 &OtherMesh, const FSameAsOptions &Options) const |
| |
| virtual GEOMETRYCORE_API bool | IsSameAs (const FDynamicMesh3 &OtherMesh, const FSameAsOptions &Options, FMeshDifferenceInfo &OutMeshDifferenceInfo) const |
| |
| virtual GEOMETRYCORE_API bool | CheckValidity (FValidityOptions ValidityOptions=FValidityOptions(), EValidityCheckFailMode FailMode=EValidityCheckFailMode::Check) const |
| |
| template<typename ArrayType > |
| int | GetAllVtxBoundaryEdges (int vID, ArrayType &EdgeListOut) const |
| |
| template<typename ArrayType > |
| EMeshResult | GetVtxTriangles (int vID, ArrayType &TrianglesOut) const |
| |
| template<typename IntArray , typename BoolArray > |
| EMeshResult | GetVtxContiguousTriangles (int VertexID, IntArray &TrianglesOut, IntArray &SpanLengths, BoolArray &IsLoop) const |
| |
| template<typename ArrayType > |
| bool | GetAllVertexGroups (int vID, ArrayType &GroupsOut) const |
| |
|
| void | SetTriangleInternal (int TriangleID, int v0, int v1, int v2) |
| |
| void | SetTriangleEdgesInternal (int TriangleID, int e0, int e1, int e2) |
| |
| int | AddEdgeInternal (int vA, int vB, int tA, int tB=InvalidID) |
| |
| GEOMETRYCORE_API int | AddTriangleInternal (int a, int b, int c, int e0, int e1, int e2) |
| |
| int | ReplaceTriangleVertex (int TriangleID, int vOld, int vNew) |
| |
| void | AllocateEdgesList (int VertexID) |
| |
| template<typename ArrayType = FLocalIntArray> |
| void | GetVertexEdgesList (int VertexID, ArrayType &EdgesOut) const |
| |
| void | SetEdgeVerticesInternal (int EdgeID, int a, int b) |
| |
| void | SetEdgeTrianglesInternal (int EdgeID, int t0, int t1) |
| |
| GEOMETRYCORE_API int | ReplaceEdgeVertex (int EdgeID, int vOld, int vNew) |
| |
| GEOMETRYCORE_API int | ReplaceEdgeTriangle (int EdgeID, int tOld, int tNew) |
| |
| GEOMETRYCORE_API int | ReplaceTriangleEdge (int EdgeID, int eOld, int eNew) |
| |
| bool | TriangleHasVertex (int TriangleID, int VertexID) const |
| |
| bool | TriHasNeighbourTri (int CheckTriID, int NbrTriID) const |
| |
| bool | TriHasSequentialVertices (int TriangleID, int vA, int vB) const |
| |
| GEOMETRYCORE_API int | FindTriangleEdge (int TriangleID, int vA, int vB) const |
| | returns edge ID
|
| |
| GEOMETRYCORE_API int32 | FindEdgeInternal (int32 vA, int32 vB, bool &bIsBoundary) const |
| |
| bool | EdgeHasVertex (int EdgeID, int VertexID) const |
| |
| bool | EdgeHasTriangle (int EdgeID, int TriangleID) const |
| |
| int | GetOtherEdgeVertex (int EdgeID, int VertexID) const |
| |
| int | GetOtherEdgeTriangle (int EdgeID, int TriangleID) const |
| |
| void | AddTriangleEdge (int TriangleID, int v0, int v1, int j, int EdgeID) |
| |
| FIndex2i | GetOrderedOneRingEdgeTris (int VertexID, int EdgeID) const |
| |
| GEOMETRYCORE_API void | ReverseTriOrientationInternal (int TriangleID) |
| |
| template<int Variant> |
| void | SerializeInternal (FArchive &Ar, void *Ptr) |
| |
| virtual GEOMETRYCORE_API EMeshResult | CanCollapseEdgeInternal (int vKeep, int vRemove, double collapse_t, FEdgeCollapseInfo *OutCollapseInfo) const |
| |
| template<> |
| void | SerializeInternal (FArchive &, void *) |
| |
| template<> |
| void | SerializeInternal (FArchive &Ar, void *) |
| |
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<int>'s. The arrays of POD data are stored in TDynamicVector's, so they grow in chunks, which is relatively efficient. The actual blocks are arrays, so they can be efficiently mem-copied into larger buffers if necessary.
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!!