#include "./Node.hpp"

#include "Elements.hpp"

using namespace world;

void Part::free(const node_id& i, Elements& l) {
    l.parts.erase(i);
}
void Instance::free(const node_id& i, Elements& l) {
    l.models.at(type).instances.erase(i.val.index());
}
aabb Instance::getBoundingBox(const Elements& l) const {
    return aabb::From(l.models.directly_at(type)->collision);
}