Speedup the mesh simplification
Change EdgeSet to use LinkedHashSet for better iteration, potentially. Map polygon points to existing vertices to reduce unnecessary vertex duplication Attempt to merge overlapping edges initially before doing anything else when simplifying Use tree sets instead of priority queues for constant time poll Split intersection calculation method into two separate methods Rework which edges are actively within the scan zone to reduce the amount of edges to check when looking for intersections. This should help make the entire algorithm closer to O(nlogn) Removed intersection classes Added method to resolve only collinear edges around a vertex Added method to resolve edge intersections directly from the edge, rather than the positive side Added simple Y check to see if two edges can even intersect Added method to calculate absolute vector Added test plane by default to MeshingTest2(the plane viewer)
This commit is contained in:
@@ -48,13 +48,13 @@ public class MeshingTest3 {
|
||||
System.out.println( "\tTook " + time + "ms" );
|
||||
}
|
||||
|
||||
// final List< Plane > planes = mesh( new File( CHUNK_DIR, "world,-1,-1" ) ); // 123
|
||||
// final List< Plane > planes = mesh( new File( CHUNK_DIR, "world,-10,-10" ) ); // 25
|
||||
// for ( int i = 0; i < planes.size(); ++i ) {
|
||||
// System.out.println( "Meshing plane " + i );
|
||||
// process( planes.get( i ) );
|
||||
// }
|
||||
|
||||
// process( planes.get( 20 ) );
|
||||
// process( planes.get( 27 ) );
|
||||
} else {
|
||||
System.err.println( "No such directory exists: " + CHUNK_DIR );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user