I'm trying to figure out how I can create a body from several parts ofa mesh which I want to combine together, each part is convex and I was wondering if I added a bunch of convex shapes to the same body if it would be treated concave with some degree of accuracy.
With boxes and such I just do a new BoxShape(), however the ConvexShape() constructor is protected so I can't access it. So how am I supposed to create ConvexShapes?
Thanks for any help!
How do I create a body from multiple convex shapes*?
-
- Posts: 10
- Joined: Sat Mar 26, 2011 9:33 am
Re: How do I create a body from multiple convex shapes*?
A CompoundShape will act concave when it has multiple convexes in it, yes. You can use the prefab entity type CompoundBody to simplify the construction process. Check out the CompoundBodiesDemo for an example of how to set up the elements.each part is convex and I was wondering if I added a bunch of convex shapes to the same body if it would be treated concave with some degree of accuracy
I think you might be looking for the ConvexHullShape. ConvexShape is the superclass of all convex shapes, including BoxShape and ConvexHullShape.With boxes and such I just do a new BoxShape(), however the ConvexShape() constructor is protected so I can't access it. So how am I supposed to create ConvexShapes?
-
- Posts: 10
- Joined: Sat Mar 26, 2011 9:33 am
Re: How do I create a body from multiple convex shapes*?
Oh ok, awesome! I'll look into all of that thenNorbo wrote:A CompoundShape will act concave when it has multiple convexes in it, yes. You can use the prefab entity type CompoundBody to simplify the construction process. Check out the CompoundBodiesDemo for an example of how to set up the elements.each part is convex and I was wondering if I added a bunch of convex shapes to the same body if it would be treated concave with some degree of accuracy
I think you might be looking for the ConvexHullShape. ConvexShape is the superclass of all convex shapes, including BoxShape and ConvexHullShape.With boxes and such I just do a new BoxShape(), however the ConvexShape() constructor is protected so I can't access it. So how am I supposed to create ConvexShapes?

As an aside is there any thorough documentaiton on Bepu?
Re: How do I create a body from multiple convex shapes*?
Apart from the demos that come with the source, there's this documentation: http://bepuphysics.codeplex.com/documentation