/// <summary> /// Ends the creation of a mesh. /// </summary> /// <returns>Resultant mesh.</returns> public MeshContent FinishMesh() { if (_finishedMesh) { return(_meshContent); } if (MergeDuplicatePositions) { MeshHelper.MergeDuplicatePositions(_meshContent, MergePositionTolerance); } MeshHelper.MergeDuplicateVertices(_meshContent); MeshHelper.CalculateNormals(_meshContent, false); if (SwapWindingOrder) { MeshHelper.SwapWindingOrder(_meshContent); } _finishedMesh = true; return(_meshContent); }