#pragma once #include "common.hpp" #include "../aabb.hpp" namespace kel { namespace lbm { template class particle_aabb< sch::ParticleGroup> > final { public: using Schema = sch::ParticleGroup>; using AABB = sch::Struct< sch::Member, "a">, sch::Member, "b"> >; public: template static constexpr saw::error_or> calculate(const saw::data& pg, const saw::data>& index, const saw::data>& meta){ static_assert(PC > 0u, "Can't calculate from no particle"); if(not (index.at({0u}).get() < PC)){ return saw::make_error("Too large i in particle_aabb coll::Cuboid"); } saw::data aabb; auto& parts = pg.template get<"particles">(); auto& pi = parts.at(index); auto& pirb = pi.template get<"rigid_body">(); /// TODO return aabb; } }; } }