|
27 | 27 | #include <vector> |
28 | 28 |
|
29 | 29 | #include <absl/container/inlined_vector.h> |
| 30 | +#include <absl/hash/hash.h> |
30 | 31 |
|
31 | 32 | #include <geode/basic/passkey.hpp> |
32 | 33 |
|
@@ -87,6 +88,13 @@ namespace geode |
87 | 88 | template < typename Archive > |
88 | 89 | void serialize( Archive& archive ); |
89 | 90 |
|
| 91 | + template < typename H > |
| 92 | + friend H AbslHashValue( H h, const PolyhedronVertex& value ) |
| 93 | + { |
| 94 | + return H::combine( |
| 95 | + std::move( h ), value.polyhedron_id, value.vertex_id ); |
| 96 | + } |
| 97 | + |
90 | 98 | index_t polyhedron_id{ NO_ID }; |
91 | 99 | local_index_t vertex_id{ NO_LID }; |
92 | 100 | }; |
@@ -126,6 +134,13 @@ namespace geode |
126 | 134 | template < typename Archive > |
127 | 135 | void serialize( Archive& archive ); |
128 | 136 |
|
| 137 | + template < typename H > |
| 138 | + friend H AbslHashValue( H h, const PolyhedronFacet& value ) |
| 139 | + { |
| 140 | + return H::combine( |
| 141 | + std::move( h ), value.polyhedron_id, value.facet_id ); |
| 142 | + } |
| 143 | + |
129 | 144 | index_t polyhedron_id{ NO_ID }; |
130 | 145 | local_index_t facet_id{ NO_LID }; |
131 | 146 | }; |
@@ -165,6 +180,13 @@ namespace geode |
165 | 180 | template < typename Archive > |
166 | 181 | void serialize( Archive& archive ); |
167 | 182 |
|
| 183 | + template < typename H > |
| 184 | + friend H AbslHashValue( H h, const PolyhedronFacetVertex& value ) |
| 185 | + { |
| 186 | + return H::combine( |
| 187 | + std::move( h ), value.polyhedron_facet, value.vertex_id ); |
| 188 | + } |
| 189 | + |
168 | 190 | PolyhedronFacet polyhedron_facet; |
169 | 191 | local_index_t vertex_id{ NO_LID }; |
170 | 192 | }; |
@@ -201,6 +223,13 @@ namespace geode |
201 | 223 | template < typename Archive > |
202 | 224 | void serialize( Archive& archive ); |
203 | 225 |
|
| 226 | + template < typename H > |
| 227 | + friend H AbslHashValue( H h, const PolyhedronFacetEdge& value ) |
| 228 | + { |
| 229 | + return H::combine( |
| 230 | + std::move( h ), value.polyhedron_facet, value.edge_id ); |
| 231 | + } |
| 232 | + |
204 | 233 | PolyhedronFacet polyhedron_facet; |
205 | 234 | local_index_t edge_id{ NO_LID }; |
206 | 235 | }; |
|
0 commit comments