reworked mesh decimation yes

This commit is contained in:
2026-01-19 09:50:54 +09:00
parent b57d54d69c
commit 54d6a0a1a4
74 changed files with 15788 additions and 8308 deletions

View File

@@ -0,0 +1,27 @@
using System;
namespace Nanomesh
{
public class TriangulateModifier
{
public void Run(ConnectedMesh mesh)
{
for (int i = 0; i < mesh.nodes.Length; i++)
{
int edgeCount = 0;
int relative = i;
while ((relative = mesh.nodes[relative].relative) != i) // Circulate around face
{
edgeCount++;
}
if (edgeCount > 2)
{
throw new Exception("Mesh has polygons of dimension 4 or greater");
}
}
// Todo : Implement
}
}
}