Closed GoogleCodeExporter closed 9 years ago
Is there already someone working on this? I could try do implement this utility.
Original comment by ol...@arcor.de
on 6 Feb 2009 at 8:41
We currently have a small utility function for this, although it's still under
testing.
Original comment by mr.lundm...@gmail.com
on 13 Aug 2009 at 9:03
I uploaded a patch with a completely new convex hull algorithm:
http://code.google.com/p/bullet/issues/detail?
id=275 . This also has the option to shrink the hull as described above.
Original comment by ol...@arcor.de
on 15 Sep 2009 at 7:42
I haven't looked at this issue for a while, but there was already a code
snippet in
Bullet ConvexDecompositionDemo that can do the job:
std::vector<btVector3> planeEquations;
btGeometryUtil::getPlaneEquationsFromVertices(vertices,planeEquations);
std::vector<btVector3> shiftedPlaneEquations;
for (int p=0;p<planeEquations.size();p++)
{
btVector3 plane = planeEquations[p];
plane[3] += 5*collisionMargin;
shiftedPlaneEquations.push_back(plane);
}
std::vector<btVector3> shiftedVertices;
btGeometryUtil::getVerticesFromPlaneEquations(shiftedPlaneEquations,shiftedVerti
ces);
btConvexHullShape* convexShape = new
btConvexHullShape(&(shiftedVertices[0].getX()),shiftedVertices.size());
Simon (Lundmark), if you want to share your utility, please attach it. Also,
Ole, I
hope you have time to implement that convex patch in a new file (not changing
btConvexHullShape)
Thanks!
Original comment by erwin.coumans
on 23 Jan 2010 at 12:16
The snippet in ConvexDecompositionDemo does the job, but it's brute force. That
may be OK for some
applications, but I needed a fast algorithm, therefore my patch.
I haven't forgotten to create a new patch and make some benchmarks, but I am
still quite busy with other things,
sorry.
Original comment by ol...@arcor.de
on 29 Jan 2010 at 6:55
this issue should have closed long time ago, the convex hull has been in Bullet
for ages now.
See
https://code.google.com/p/bullet/source/browse/trunk/src/LinearMath/btConvexHull
Computer.cpp
http://code.google.com/p/bullet/issues/detail?id=275
Thanks for your contribution.
Original comment by erwin.coumans
on 9 Sep 2012 at 9:54
Original issue reported on code.google.com by
erwin.coumans
on 30 Nov 2008 at 4:39