summaryrefslogtreecommitdiff
path: root/thirdparty/bullet/LinearMath/btConvexHullComputer.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2020-12-18 14:06:40 +0100
committerGitHub <noreply@github.com>2020-12-18 14:06:40 +0100
commit8180b607b85cb290dc4654cdacc2629a7eb325a5 (patch)
tree586240d54b8697cf4f122033ca63c6f1ec64d4bb /thirdparty/bullet/LinearMath/btConvexHullComputer.cpp
parentd54d958a3e429460f7b6145b65f82df799e3e7cc (diff)
parent3cbf8bde8455f98f9b447237ebfe578aca397574 (diff)
Merge pull request #44455 from akien-mga/bullet-3.07
bullet: Sync with upstream 3.07
Diffstat (limited to 'thirdparty/bullet/LinearMath/btConvexHullComputer.cpp')
-rw-r--r--thirdparty/bullet/LinearMath/btConvexHullComputer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/thirdparty/bullet/LinearMath/btConvexHullComputer.cpp b/thirdparty/bullet/LinearMath/btConvexHullComputer.cpp
index 8bbfdc5f25..12125fd2de 100644
--- a/thirdparty/bullet/LinearMath/btConvexHullComputer.cpp
+++ b/thirdparty/bullet/LinearMath/btConvexHullComputer.cpp
@@ -105,7 +105,7 @@ public:
Point64 cross(const Point32& b) const
{
- return Point64(y * b.z - z * b.y, z * b.x - x * b.z, x * b.y - y * b.x);
+ return Point64(((int64_t)y) * b.z - ((int64_t)z) * b.y, ((int64_t)z) * b.x - ((int64_t)x) * b.z, ((int64_t)x) * b.y - ((int64_t)y) * b.x);
}
Point64 cross(const Point64& b) const
@@ -115,7 +115,7 @@ public:
int64_t dot(const Point32& b) const
{
- return x * b.x + y * b.y + z * b.z;
+ return ((int64_t)x) * b.x + ((int64_t)y) * b.y + ((int64_t)z) * b.z;
}
int64_t dot(const Point64& b) const
@@ -2673,6 +2673,7 @@ btScalar btConvexHullComputer::compute(const void* coords, bool doubleCoords, in
}
vertices.resize(0);
+ original_vertex_index.resize(0);
edges.resize(0);
faces.resize(0);
@@ -2683,6 +2684,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)
{