Implemented NN Search on Rtree
Just binded the library to Godot so we can use later to have more options on how to create holes.
This commit is contained in:
@@ -102,7 +102,6 @@ func _draw():
|
||||
var meshGenerator = GeoPolyMesh.new(vector_indexes, vectors, extrusion_direction, depth)
|
||||
var commited_mesh = meshGenerator.commit_mesh(meshInstance3d.get_active_material(0))
|
||||
meshGenerator.free()
|
||||
|
||||
|
||||
meshInstance3d.mesh = commited_mesh
|
||||
meshInstance3d.position += depth_position_offset
|
||||
@@ -111,10 +110,11 @@ func _draw():
|
||||
|
||||
func _re_draw():
|
||||
var vector_indexes = GeoPolyTriangulization.triangulate(outer_polygon, inner_polygons.get_holes())
|
||||
var vectors = []
|
||||
|
||||
var vectors = []
|
||||
vectors.append_array(outer_polygon)
|
||||
vectors.append_array(inner_polygons.get_hole_verticies())
|
||||
|
||||
WorkerThreadPool.add_task(_generate_mesh.bind(vector_indexes, vectors))
|
||||
|
||||
func _deffered_draw(mesh: Mesh, task_id: int):
|
||||
|
||||
Reference in New Issue
Block a user