can convex hull have sink in point

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
parapoohda
Posts: 92
Joined: Fri May 31, 2019 6:30 am

can convex hull have sink in point

Post by parapoohda » Wed Feb 19, 2020 11:46 am

If I want to make convex hull with there points

Code: Select all

            points[i++] = new Vector3(0, 0, 0);
            points[i++] = new Vector3(0, 0, 1);
            points[i++] = new Vector3(0, 1, 0);
            points[i++] = new Vector3(1, 0, 0);
            points[i++] = new Vector3(1, 1, 0);
            points[i++] = new Vector3(1, 0, 1);
            points[i++] = new Vector3(0, 1, 1);
            points[i++] = new Vector3(1, 1, 1);
Which is given box 1,1,1 in length wide and height.
But if I add

Code: Select all

            points[i++] = new Vector3(0, 0.5, 0);
           
into an array, it seems a new point not working.
Is convex hull can only make the smallest polygon that covers points.
Or I have done something wrong.

Norbo
Site Admin
Posts: 4889
Joined: Tue Jul 04, 2006 4:45 am

Re: can convex hull have sink in point

Post by Norbo » Wed Feb 19, 2020 9:42 pm

Is convex hull can only make the smallest polygon that covers points.
Yes, convex hulls are convex: https://en.wikipedia.org/wiki/Convex_polytope

Any points not contributing to the outer surface are removed.

If you want concave shapes, you'll need to create it out of multiple convex shapes in a Compound (or BigCompound, for shapes with a lot of children). There is also the Mesh, but that's best used for environments and statics, not individual dynamic objects.

parapoohda
Posts: 92
Joined: Fri May 31, 2019 6:30 am

Re: can convex hull have sink in point

Post by parapoohda » Mon Feb 24, 2020 2:35 am

Thank you. :):)

Post Reply