File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,24 @@ namespace geode
190190 this ->out2in_mapping ()[out].push_back ( in );
191191 }
192192
193+ void unmap ( const T1& in, const T2& out )
194+ {
195+ auto & in_map = this ->in2out_mapping ().at ( in );
196+ const auto itr = absl::c_find ( in_map, out );
197+ in_map.erase ( itr );
198+ if ( this ->in2out ( in ).empty () )
199+ {
200+ this ->in2out_mapping ().erase ( in );
201+ }
202+ auto & out_map = this ->out2in_mapping ().at ( out );
203+ const auto itr2 = absl::c_find ( out_map, in );
204+ out_map.erase ( itr2 );
205+ if ( this ->out2in ( out ).empty () )
206+ {
207+ this ->out2in_mapping ().erase ( out );
208+ }
209+ }
210+
193211 void erase_in ( const T1& in )
194212 {
195213 if ( !this ->has_mapping_input ( in ) )
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ namespace geode
8484
8585 [[nodiscard]] index_t next ( index_t position ) const ;
8686
87- [[nodiscard]] absl::FixedArray< SidedSurface > surfaces;
87+ absl::FixedArray< SidedSurface > surfaces;
8888 };
8989
9090 [[nodiscard]] SortedSurfaces opengeode_model_api surface_radial_sort (
You can’t perform that action at this time.
0 commit comments