diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-10-24 03:54:02 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-10-24 03:54:02 +0400 |
commit | 0b16c9e201adfcbeebd3e3cda94ccd752c243c03 (patch) | |
tree | 96d932ebbcb507a32435a56da940a6c76d784cc1 /extern/bullet2/src/LinearMath | |
parent | baa4fc68a80bc6042191bdb6d43298a67ed0a005 (diff) |
Patch Bullet to make it's convex hull implementation usable in BMesh
* Add access to the original indices for vertices
* Add a very simple C API for convex hull
* Add this patch to the patches folder and update readme.txt
Diffstat (limited to 'extern/bullet2/src/LinearMath')
-rw-r--r-- | extern/bullet2/src/LinearMath/btConvexHullComputer.cpp | 2 | ||||
-rw-r--r-- | extern/bullet2/src/LinearMath/btConvexHullComputer.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/extern/bullet2/src/LinearMath/btConvexHullComputer.cpp b/extern/bullet2/src/LinearMath/btConvexHullComputer.cpp index c03c901c051..4fd81dac107 100644 --- a/extern/bullet2/src/LinearMath/btConvexHullComputer.cpp +++ b/extern/bullet2/src/LinearMath/btConvexHullComputer.cpp @@ -2661,6 +2661,7 @@ btScalar btConvexHullComputer::compute(const void* coords, bool doubleCoords, in } vertices.resize(0); + original_vertex_index.resize(0); edges.resize(0); faces.resize(0); @@ -2671,6 +2672,7 @@ btScalar btConvexHullComputer::compute(const void* coords, bool doubleCoords, in { btConvexHullInternal::Vertex* v = oldVertices[copied]; vertices.push_back(hull.getCoordinates(v)); + original_vertex_index.push_back(v->point.index); btConvexHullInternal::Edge* firstEdge = v->edges; if (firstEdge) { diff --git a/extern/bullet2/src/LinearMath/btConvexHullComputer.h b/extern/bullet2/src/LinearMath/btConvexHullComputer.h index 7240ac4fb52..6871ce80e00 100644 --- a/extern/bullet2/src/LinearMath/btConvexHullComputer.h +++ b/extern/bullet2/src/LinearMath/btConvexHullComputer.h @@ -67,6 +67,7 @@ class btConvexHullComputer // Vertices of the output hull btAlignedObjectArray<btVector3> vertices; + btAlignedObjectArray<int> original_vertex_index; // Edges of the output hull btAlignedObjectArray<Edge> edges; |