Comments (4)
I think you should use EnTT at the v3.10.1
tag not the v3.10.x
branch (there isn't a v3.10.1
branch).
It looks like the template function visit_component
is causing confusion in some compilers. I have removed the version without a tuple since it's not being used. That's on the master branch though. It won't be picked up by Conan just yet.
from edyn.
I meant tag, sorry.
That’s ok, I will try out master a little later today, with the tagged version off EnTT and report back. Thanks for looking into it for me.
from edyn.
Hmm, I'm still getting the same compile error:
In file included from edyn/src/edyn/collision/raycast.cpp:13:
edyn/include/edyn/shapes/shapes.hpp:100:5: error: no matching function for call to 'visit_component'
visit_component(shapes_tuple, index.value, entity, views_tuple, visitor);
^~~~~~~~~~~~~~~
edyn/src/edyn/collision/raycast.cpp:36:9: note: in instantiation of function template specialization 'edyn::visit_shape<(lambda at edyn/src/edyn/collision/raycast.cpp:36:56)>' requested here
visit_shape(sh_idx, entity, shape_views_tuple, [&](auto &&shape) {
^
edyn/include/edyn/util/visit_component.hpp:132:6: note: candidate function template not viable: no known conversion from 'const edyn::tuple_of_shape_views_t' (aka 'const tuple<basic_view<entt::entity, type_list<edyn::sphere_shape>, type_list<>>, basic_view<entt::entity, type_list<edyn::cylinder_shape>, type_list<>>, basic_view<entt::entity, type_list<edyn::capsule_shape>, type_list<>>, basic_view<entt::entity, type_list<edyn::box_shape>, type_list<>>, basic_view<entt::entity, type_list<edyn::polyhedron_shape>, type_list<>>, basic_view<entt::entity, type_list<edyn::compound_shape>, type_list<>>, basic_view<entt::entity, type_list<edyn::plane_shape>, type_list<>>, basic_view<entt::entity, type_list<edyn::mesh_shape>, type_list<>>, basic_view<entt::entity, type_list<edyn::paged_mesh_shape>, type_list<>>>') to 'entt::registry &' (aka 'basic_registry<entt::entity> &') for 4th argument
void visit_component(std::tuple<Ts...>, IndexType index, entt::entity entity,
^
edyn/include/edyn/util/visit_component.hpp:68:6: note: candidate template ignored: deduced packs of different lengths for parameter 'Ts' (<edyn::sphere_shape, edyn::cylinder_shape, edyn::capsule_shape, edyn::box_shape, edyn::polyhedron_shape, edyn::compound_shape, edyn::plane_shape, edyn::mesh_shape, edyn::paged_mesh_shape> vs. <edyn::sphere_shape>)
void visit_component([[maybe_unused]] std::tuple<Ts...>, IndexType index, entt::entity entity,
^
edyn/include/edyn/util/visit_component.hpp:122:6: note: candidate function template not viable: requires 4 arguments, but 5 were provided
void visit_component(IndexType index, entt::entity entity,
So, its this overload that its trying to call (the 5 argument one):
template<typename... Ts, typename IndexType, typename VisitorType>
void visit_component([[maybe_unused]] std::tuple<Ts...>, IndexType index, entt::entity entity,
const std::tuple<entt::basic_view<entt::entity, entt::get_t<Ts>, entt::exclude_t<>>...> &views_tuple,
VisitorType visitor)
And the error is:
edyn/include/edyn/util/visit_component.hpp:68:6: note: candidate template ignored: deduced packs of different lengths for parameter 'Ts' (<edyn::sphere_shape, edyn::cylinder_shape, edyn::capsule_shape, edyn::box_shape, edyn::polyhedron_shape, edyn::compound_shape, edyn::plane_shape, edyn::mesh_shape, edyn::paged_mesh_shape> vs. <edyn::sphere_shape>)
void visit_component([[maybe_unused]] std::tuple<Ts...>, IndexType index, entt::entity entity,
^
So from the function call:
visit_component(shapes_tuple, index.value, entity, views_tuple, visitor);
it looks like shapes_tuple
and views_tuple
have a different number of elements (shapes_tuple
has 9, views_tuple
has 1), but as both use the Ts...
template parameter, they should match.
That's as far as I'm able to look into it, since I don't understand the code.
❯ clang++ -v
Ubuntu clang version 14.0.0-1ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Candidate multilib: .;@m64
Selected multilib: .;@m64
from edyn.
Yeah looks like your analysis is correct. The number of elements in shapes_tuple
and views_tuple
is not the same according to this error. I can't see why that'd be the case, since views_tuple
is generated from the same shapes_tuple
, i.e. it is a transformation from a tuple of shape types into a tuple of EnTT views of these shape types. I am on clang 13 here.
from edyn.
Related Issues (20)
- double precision HOT 1
- Unable to build in VS2019 HOT 2
- Update Conan to use Edyn 1.1.0 & ENTT 3.10.3 HOT 1
- Collision Failure between Dynamic and Static Entity HOT 2
- error compiling Edyn using latest entt:x64-windows from vcpkg.io HOT 1
- compile issue HOT 1
- edyn::detach doesn't properly cleanup added systems
- make_rigidbody shape is not optional HOT 1
- add on_destroy_aabb in broadphase to allow detaching/changing shapes of a rigidbody. HOT 13
- registry_operation does not preserve the order of operations in async mode compared to the same operations in sync HOT 2
- A lot of warnings when building with msvc HOT 1
- Crash when destroying a rigidbody entity. HOT 4
- Issue with rigidbody_set_kind HOT 1
- set_rigidbody_kind issue still happening
- attach/detach issue HOT 3
- rigidbody_set_kind in async mode HOT 1
- Crash `Assertion `is_power_of_two(mod)' failed.`
- Add ability to select capsule axis HOT 3
- `error: call to non-‘constexpr’ function ‘edyn::vector3 ` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edyn.