Closed nnmm closed 4 years ago
- nalgebra does not provide an AABB type or something like
cgmath::Perspective
, so we add those ourselves.
ncollide
, which is part of the same suite as nalgebra
, provides AABB
type https://docs.rs/ncollide/0.14.1/ncollide/bounding_volume/struct.AABB.html
True, I used that before, but ncollide is a very heavy dependency, if we're only going to use that, I don't think it's worth it. The Aabb struct is trivial.
True, I used that before, but ncollide is a very heavy dependency, if we're only going to use that, I don't think it's worth it. The Aabb struct is trivial.
Makes sense
@feuerste Sorry, I indeed made merge errors. Git is dumber than I thought. I will double-check that after the next commit, this PR has all your changes.
ptal @krzesi-mir @feuerste
Just added some benchmarks to the description, performance improves a lot with this! Edit: That was measurement error, sorry. Performance is about the same overall.
Do you know, why the frustum performance got worse?
@feuerste re: Frustum performance, collision used an AABB intersection test based on intersection testing the box with all six faces. While this is maybe a bit faster, it's also inaccurate. I'd rather have a correct intersection test than the fastest one, and we can reduce the number of intersection tests anyway by returning the full Relation instead of a bool.
I checked the number of points returned for all queries in point_cloud_test, they are the same before and after this change. Btw, check_box_query_equality returns all of the 1000000 points, so it's not a very good test.
I built an octree from the same ply on master and this branch and compared the output.
diff <(ls -1s octree | sort -k 2) <(ls -1s octree_nalgebra | sort -k 2)
I'll look further into it.
- The metas are not the same
One reason for this can be that the orders of items in the proto repeated fields are rarely the same.
One reason for this can be that the orders of items in the proto repeated fields are rarely the same.
Yep, I'll check that next.
So, they really are just permuted. And besides this, I also tested sdl_viewer, which works exactly like before (even feels a tad smoother).
I'll merge soon after I resolve the merge conflicts unless I'm hearing concerns.
🎉
I tested xrays as well, found a small bug that is fixed with the latest commit.
Isometry3
that can replace our hand-rolledIsometry3
cgmath::Perspective
, so we add those ourselves.Point3
type for point coordinates – this matches the intended semantics and gets rid of a bunch of conversions.Criterion output against master (the octree queries will improve when we move to using
Relation
as opposed to abool
for intersection tests in an upcoming PR):