summaryrefslogtreecommitdiff
path: root/core/math/quick_hull.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/quick_hull.h')
-rw-r--r--core/math/quick_hull.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/math/quick_hull.h b/core/math/quick_hull.h
index b8d813c979..1c354880b4 100644
--- a/core/math/quick_hull.h
+++ b/core/math/quick_hull.h
@@ -34,7 +34,7 @@
#include "core/math/aabb.h"
#include "core/math/geometry_3d.h"
#include "core/templates/list.h"
-#include "core/templates/set.h"
+#include "core/templates/rb_set.h"
class QuickHull {
public:
@@ -44,9 +44,16 @@ public:
uint64_t id = 0;
};
+ static uint32_t hash(const Edge &p_edge) {
+ return hash_one_uint64(p_edge.id);
+ }
+
bool operator<(const Edge &p_edge) const {
return id < p_edge.id;
}
+ bool operator==(const Edge &p_edge) const {
+ return id == p_edge.id;
+ }
Edge(int p_vtx_a = 0, int p_vtx_b = 0) {
if (p_vtx_a > p_vtx_b) {