| 1131 | } |
| 1132 | |
| 1133 | void GridMap::_clear_internal() { |
| 1134 | for (const KeyValue<OctantKey, Octant *> &E : octant_map) { |
| 1135 | if (is_inside_world()) { |
| 1136 | _octant_exit_world(E.key); |
| 1137 | } |
| 1138 | |
| 1139 | _octant_clean_up(E.key); |
| 1140 | memdelete(E.value); |
| 1141 | } |
| 1142 | |
| 1143 | octant_map.clear(); |
| 1144 | cell_map.clear(); |
| 1145 | } |
| 1146 | |
| 1147 | void GridMap::clear() { |
| 1148 | _clear_internal(); |