What is the idiomatic way of representing the points of a 3d mesh in nalgebra?

Hello, I am new to Rust and I find it a bit hard to navigate all the types available in nalgebra. I have a simple question:

What is the most idiomatic/performant way to store an arbitrary number of points in 3d space?

Should I look at putting a bunch of Point3/Vec3 types into a standard vector? Should I use a nalgebra Matrix with Const<3> rows and Dynamic columns?

Can you please give a concrete example of a data layout that facilitates performing 3d operations on all of or parts of aforementioned 3d points?

If you are just wanting to store points (i.e no mesh), use a Vector<Point3>.

If you are wanting to work with a triangle-mesh, there is TriMesh, in parry3d. otherwise you will have to roll your own.

1 Like

Thank you, especially for the tip regarding TriMesh