Select Git revision
ViewElement.java
Forked from
COUETOUX Basile / FirefighterStarter
Source project has a limited visibility.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
PhysicResolver.cpp 612 B
#include "PhysicResolver.hpp"
namespace megu::kernel {
void PhysicResolver::resolve(Kernel & kernel, PhysicEngine & engine, double time) {
auto & collisions = engine.get().collision();
for(auto & collision : collisions) {
auto source_comp = this->get(collision.source());
auto target_comp = this->get(collision.target());
if(source_comp.has_value() && target_comp.has_value()) {
source_comp.value().get().on_collide(kernel, engine, target_comp.value().get(), time);
}
}
engine.get().clearCollision();
}
}