Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a convex polyhedron shape #91

Closed
w0rm opened this issue Aug 9, 2020 · 1 comment
Closed

Support a convex polyhedron shape #91

w0rm opened this issue Aug 9, 2020 · 1 comment

Comments

@w0rm
Copy link
Owner

w0rm commented Aug 9, 2020

With the release of https://package.elm-lang.org/packages/w0rm/elm-obj-file/latest there is an easy way to load TriangularMesh from Blender. elm-physics currently only supports Block3d (which is internally defined as a convex polyhedron).

Collision algorithm is limited to convex shapes. There are several options to construct a convex polyhedron shape:

  1. As a convex hull from a list of Point3d
  2. A function that takes TriangularMesh of Point3d and returns a Maybe of Shape (Nothing if a shape isn’t convex)
  3. An unsafe function that takes TriangularMesh of Point3d and returns a Shape

While 1. and 2. are good because they make it impossible to create wrong shapes, they are computationally intensive.

Open question: what to do with the center of mass of a convex polyhedron. Shall it be calculated or provided by the user.

@w0rm w0rm mentioned this issue Aug 29, 2020
3 tasks
@w0rm
Copy link
Owner Author

w0rm commented Sep 3, 2020

Implemented in #97

@w0rm w0rm closed this as completed Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant