Level Setup
Integrated with Trenchbroom
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
extends Node
|
||||
|
||||
# provides all the utility functions for generating
|
||||
# a triangulized Polygon with holes
|
||||
class_name GeoPolyTriangulization
|
||||
|
||||
# returns all triangles generated by ear clipping the outer and inner polygons
|
||||
static func triangulate(outer_polygon: PackedVector2Array, inner_polygons: Array[PackedVector2Array]) -> PackedInt32Array:
|
||||
var triag = Triangulization.new()
|
||||
var result = triag.triangulate_with_holes(outer_polygon, inner_polygons)
|
||||
return result
|
||||
Reference in New Issue
Block a user