From 4c9e43a42c15ce93ffded21dfcaa171f63d20d69 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 11 Jun 2026 14:07:27 +0200 Subject: Fixing deduction issues from constexpr values --- lib/core/c++/particle/schema.hpp | 67 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 lib/core/c++/particle/schema.hpp (limited to 'lib/core/c++/particle/schema.hpp') diff --git a/lib/core/c++/particle/schema.hpp b/lib/core/c++/particle/schema.hpp new file mode 100644 index 0000000..18a697a --- /dev/null +++ b/lib/core/c++/particle/schema.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "common.hpp" + +namespace kel { +namespace lbm { + +namespace coll { +template +struct Spheroid { + using ValueSchema = T; + using Schema = sch::Struct< + sch::Member,"radius"> + >; +}; +} + +namespace sch { +using namespace saw::schema; + +namespace impl { +template +struct rotation_type_helper; + +template +struct rotation_type_helper { + using Schema = Scalar; +}; + +template +struct rotation_type_helper { + using Schema = Vector; +}; +} + +template +using ParticleRigidBody = Struct< + Member, "position">, + Member, "position_old">, + Member::Schema, "rotation">, + Member::Schema, "rotation_old">, + + Member, "acceleration">, + Member::Schema, "angular_acceleration"> +>; + + +template +using Particle = Struct< + Member, "rigid_body"> + // Problem is that dynamic data would two layered + // Member, "mask">, +>; + +template> +using ParticleGroup = Struct< + Member, "mask">, + Member, "collision">, + Member,1u>, "mask_step">, + Member,1u>, "density">, + Member,1u>, "center_of_mass">, + Member,1u>, "total_mass">, + Member,1u>, "particles"> +>; +} +} +} -- cgit v1.2.3