update devel/bullet to 3.22
Build-tested all consumers on amd64: no fallout; ok pascal@ (MAINTAINER) Needs a backport of commit 4f06738 because btSoftBodyHelpers.h is currently broken: it tries to include code that's available only in examples/*. Spotted while trying to build games/godot. while here also: - update HOMEPAGE (the current one is just a redirect) - enable the tests (which are all passing!)
This commit is contained in:
parent
7c160450c0
commit
0112f9a19a
@ -2,16 +2,16 @@ COMMENT = physics library
|
||||
|
||||
GH_ACCOUNT = bulletphysics
|
||||
GH_PROJECT = bullet3
|
||||
GH_TAGNAME = 3.21
|
||||
GH_TAGNAME = 3.22
|
||||
DISTNAME = bullet-${GH_TAGNAME}
|
||||
|
||||
SHARED_LIBS += BulletCollision 5.0 # 2.79
|
||||
SHARED_LIBS += BulletDynamics 5.0 # 2.79
|
||||
SHARED_LIBS += BulletDynamics 5.1 # 2.79
|
||||
SHARED_LIBS += BulletFileLoader 1.0 # 2.87
|
||||
SHARED_LIBS += BulletInverseDynamics 3.0 # 2.83
|
||||
SHARED_LIBS += BulletInverseDynamicsUtils 1.0 # 2.87
|
||||
SHARED_LIBS += BulletRobotics 1.0 # 2.87
|
||||
SHARED_LIBS += BulletSoftBody 5.0 # 2.79
|
||||
SHARED_LIBS += BulletRobotics 2.0 # 2.87
|
||||
SHARED_LIBS += BulletSoftBody 6.0 # 2.79
|
||||
SHARED_LIBS += BulletWorldImporter 1.0 # 2.87
|
||||
SHARED_LIBS += BulletXmlWorldImporter 1.0 # 2.87
|
||||
SHARED_LIBS += LinearMath 5.0 # 2.79
|
||||
@ -25,14 +25,14 @@ SHARED_LIBS += Bullet3Dynamics 4.0 # 2.83
|
||||
SHARED_LIBS += Bullet3Geometry 4.0 # 2.83
|
||||
SHARED_LIBS += Bullet3OpenCL_clew 4.0 # 2.83
|
||||
SHARED_LIBS += BulletExampleBrowserLib 0.0 # 3.20
|
||||
SHARED_LIBS += BulletRoboticsGUI 0.0 # 3.20
|
||||
SHARED_LIBS += BulletRoboticsGUI 1.0 # 3.20
|
||||
SHARED_LIBS += BussIK 0.0 # 3.20
|
||||
SHARED_LIBS += OpenGLWindow 0.0 # 3.20
|
||||
SHARED_LIBS += OpenGLWindow 1.0 # 3.20
|
||||
SHARED_LIBS += gwen 0.0 # 3.20
|
||||
|
||||
CATEGORIES = devel
|
||||
|
||||
HOMEPAGE = http://bulletphysics.org
|
||||
HOMEPAGE = https://pybullet.org/wordpress/
|
||||
|
||||
MAINTAINER = Pascal Stumpf <pascal@stumpf.co>
|
||||
|
||||
@ -53,8 +53,6 @@ CONFIGURE_ARGS += -DBUILD_SHARED_LIBS=ON \
|
||||
-DINSTALL_LIBS=ON \
|
||||
-DUSE_DOUBLE_PRECISION=ON
|
||||
|
||||
NO_TEST = Yes
|
||||
|
||||
CFLAGS += -I${X11BASE}/include
|
||||
CXXFLAGS += -I${X11BASE}/include
|
||||
MODCMAKE_LDFLAGS = -L${X11BASE}/lib
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (bullet-3.21.tar.gz) = SdHuR6qMuwvGu0WfCkz7lXm0Dij1x9mjbDE+MDH7OWU=
|
||||
SIZE (bullet-3.21.tar.gz) = 133046747
|
||||
SHA256 (bullet-3.22.tar.gz) = 7GCyFbXCrlaEZBN21BkMaBXTECSv+FVX/4IJTA2ncVQ=
|
||||
SIZE (bullet-3.22.tar.gz) = 139783793
|
||||
|
@ -0,0 +1,167 @@
|
||||
backport of
|
||||
https://github.com/bulletphysics/bullet3/commit/4f0673810cab0eee67ea314a3243952afd150cb4
|
||||
|
||||
Index: examples/DeformableDemo/LoadDeformed.cpp
|
||||
--- examples/DeformableDemo/LoadDeformed.cpp.orig
|
||||
+++ examples/DeformableDemo/LoadDeformed.cpp
|
||||
@@ -26,7 +26,151 @@
|
||||
#include "../CommonInterfaces/CommonDeformableBodyBase.h"
|
||||
#include "../Utils/b3ResourcePath.h"
|
||||
#include "../Utils/b3BulletDefaultFileIO.h"
|
||||
+#include <iostream>
|
||||
+#include <iomanip>
|
||||
+#include <sstream>
|
||||
+#include <string.h>
|
||||
|
||||
+struct CustomSoftBodyHelper : public btSoftBodyHelpers
|
||||
+{
|
||||
+ static std::string loadDeformableState(btAlignedObjectArray<btVector3>& qs, btAlignedObjectArray<btVector3>& vs, const char* filename, CommonFileIOInterface* fileIO);
|
||||
+
|
||||
+};
|
||||
+
|
||||
+static inline bool isSpace(const char c)
|
||||
+{
|
||||
+ return (c == ' ') || (c == '\t');
|
||||
+}
|
||||
+static inline bool isNewLine(const char c)
|
||||
+{
|
||||
+ return (c == '\r') || (c == '\n') || (c == '\0');
|
||||
+}
|
||||
+static inline float parseFloat(const char*& token)
|
||||
+{
|
||||
+ token += strspn(token, " \t");
|
||||
+ float f = (float)atof(token);
|
||||
+ token += strcspn(token, " \t\r");
|
||||
+ return f;
|
||||
+}
|
||||
+static inline void parseFloat3(
|
||||
+ float& x, float& y, float& z,
|
||||
+ const char*& token)
|
||||
+{
|
||||
+ x = parseFloat(token);
|
||||
+ y = parseFloat(token);
|
||||
+ z = parseFloat(token);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+std::string CustomSoftBodyHelper::loadDeformableState(btAlignedObjectArray<btVector3>& qs, btAlignedObjectArray<btVector3>& vs, const char* filename, CommonFileIOInterface* fileIO)
|
||||
+{
|
||||
+ {
|
||||
+ qs.clear();
|
||||
+ vs.clear();
|
||||
+ std::string tmp = filename;
|
||||
+ std::stringstream err;
|
||||
+#ifdef USE_STREAM
|
||||
+ std::ifstream ifs(filename);
|
||||
+ if (!ifs)
|
||||
+ {
|
||||
+ err << "Cannot open file [" << filename << "]" << std::endl;
|
||||
+ return err.str();
|
||||
+ }
|
||||
+#else
|
||||
+ int fileHandle = fileIO->fileOpen(filename, "r");
|
||||
+ if (fileHandle < 0)
|
||||
+ {
|
||||
+ err << "Cannot open file [" << filename << "]" << std::endl;
|
||||
+ return err.str();
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ std::string name;
|
||||
+
|
||||
+ int maxchars = 8192; // Alloc enough size.
|
||||
+ std::vector<char> buf(maxchars); // Alloc enough size.
|
||||
+ std::string linebuf;
|
||||
+ linebuf.reserve(maxchars);
|
||||
+
|
||||
+#ifdef USE_STREAM
|
||||
+ while (ifs.peek() != -1)
|
||||
+#else
|
||||
+ char* line = 0;
|
||||
+ do
|
||||
+#endif
|
||||
+ {
|
||||
+ linebuf.resize(0);
|
||||
+#ifdef USE_STREAM
|
||||
+ safeGetline(ifs, linebuf);
|
||||
+#else
|
||||
+ char tmpBuf[1024];
|
||||
+ line = fileIO->readLine(fileHandle, tmpBuf, 1024);
|
||||
+ if (line)
|
||||
+ {
|
||||
+ linebuf = line;
|
||||
+ }
|
||||
+#endif
|
||||
+ // Trim newline '\r\n' or '\r'
|
||||
+ if (linebuf.size() > 0)
|
||||
+ {
|
||||
+ if (linebuf[linebuf.size() - 1] == '\n') linebuf.erase(linebuf.size() - 1);
|
||||
+ }
|
||||
+ if (linebuf.size() > 0)
|
||||
+ {
|
||||
+ if (linebuf[linebuf.size() - 1] == '\n') linebuf.erase(linebuf.size() - 1);
|
||||
+ }
|
||||
+
|
||||
+ // Skip if empty line.
|
||||
+ if (linebuf.empty())
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ // Skip leading space.
|
||||
+ const char* token = linebuf.c_str();
|
||||
+ token += strspn(token, " \t");
|
||||
+
|
||||
+ btAssert(token);
|
||||
+ if (token[0] == '\0') continue; // empty line
|
||||
+
|
||||
+ if (token[0] == '#') continue; // comment line
|
||||
+
|
||||
+ // q
|
||||
+ if (token[0] == 'q' && isSpace((token[1])))
|
||||
+ {
|
||||
+ token += 2;
|
||||
+ float x, y, z;
|
||||
+ parseFloat3(x, y, z, token);
|
||||
+ qs.push_back(btVector3(x, y, z));
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ // v
|
||||
+ if (token[0] == 'v' && isSpace((token[1])))
|
||||
+ {
|
||||
+ token += 3;
|
||||
+ float x, y, z;
|
||||
+ parseFloat3(x, y, z, token);
|
||||
+ vs.push_back(btVector3(x, y, z));
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ // Ignore unknown command.
|
||||
+ }
|
||||
+#ifndef USE_STREAM
|
||||
+ while (line)
|
||||
+ ;
|
||||
+#endif
|
||||
+
|
||||
+ if (fileHandle >= 0)
|
||||
+ {
|
||||
+ fileIO->fileClose(fileHandle);
|
||||
+ }
|
||||
+ return err.str();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
class LoadDeformed : public CommonDeformableBodyBase
|
||||
{
|
||||
int steps;
|
||||
@@ -188,7 +332,7 @@ void LoadDeformed::addCloth(const btVector3& origin)
|
||||
fileio.findResourcePath(filename, absolute_path, 1024);
|
||||
btAlignedObjectArray<btVector3> qs;
|
||||
btAlignedObjectArray<btVector3> vs;
|
||||
- btSoftBodyHelpers::loadDeformableState(qs, vs, absolute_path, &fileio);
|
||||
+ CustomSoftBodyHelper::loadDeformableState(qs, vs, absolute_path, &fileio);
|
||||
if (reset_frame > 0)
|
||||
psb->updateState(qs, vs);
|
||||
psb->m_cfg.collisions = btSoftBody::fCollision::SDF_RD;
|
@ -0,0 +1,152 @@
|
||||
backport of
|
||||
https://github.com/bulletphysics/bullet3/commit/4f0673810cab0eee67ea314a3243952afd150cb4
|
||||
|
||||
Index: src/BulletSoftBody/btSoftBodyHelpers.cpp
|
||||
--- src/BulletSoftBody/btSoftBodyHelpers.cpp.orig
|
||||
+++ src/BulletSoftBody/btSoftBodyHelpers.cpp
|
||||
@@ -1488,30 +1488,6 @@ void btSoftBodyHelpers::writeObj(const char* filename,
|
||||
fs.close();
|
||||
}
|
||||
|
||||
-static inline bool isSpace(const char c)
|
||||
-{
|
||||
- return (c == ' ') || (c == '\t');
|
||||
-}
|
||||
-static inline bool isNewLine(const char c)
|
||||
-{
|
||||
- return (c == '\r') || (c == '\n') || (c == '\0');
|
||||
-}
|
||||
-static inline float parseFloat(const char*& token)
|
||||
-{
|
||||
- token += strspn(token, " \t");
|
||||
- float f = (float)atof(token);
|
||||
- token += strcspn(token, " \t\r");
|
||||
- return f;
|
||||
-}
|
||||
-static inline void parseFloat3(
|
||||
- float& x, float& y, float& z,
|
||||
- const char*& token)
|
||||
-{
|
||||
- x = parseFloat(token);
|
||||
- y = parseFloat(token);
|
||||
- z = parseFloat(token);
|
||||
-}
|
||||
-
|
||||
void btSoftBodyHelpers::writeState(const char* file, const btSoftBody* psb)
|
||||
{
|
||||
std::ofstream fs;
|
||||
@@ -1540,114 +1516,6 @@ void btSoftBodyHelpers::writeState(const char* file, c
|
||||
fs << "\n";
|
||||
}
|
||||
fs.close();
|
||||
-}
|
||||
-
|
||||
-std::string btSoftBodyHelpers::loadDeformableState(btAlignedObjectArray<btVector3>& qs, btAlignedObjectArray<btVector3>& vs, const char* filename, CommonFileIOInterface* fileIO)
|
||||
-{
|
||||
- {
|
||||
- qs.clear();
|
||||
- vs.clear();
|
||||
- std::string tmp = filename;
|
||||
- std::stringstream err;
|
||||
-#ifdef USE_STREAM
|
||||
- std::ifstream ifs(filename);
|
||||
- if (!ifs)
|
||||
- {
|
||||
- err << "Cannot open file [" << filename << "]" << std::endl;
|
||||
- return err.str();
|
||||
- }
|
||||
-#else
|
||||
- int fileHandle = fileIO->fileOpen(filename, "r");
|
||||
- if (fileHandle < 0)
|
||||
- {
|
||||
- err << "Cannot open file [" << filename << "]" << std::endl;
|
||||
- return err.str();
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
- std::string name;
|
||||
-
|
||||
- int maxchars = 8192; // Alloc enough size.
|
||||
- std::vector<char> buf(maxchars); // Alloc enough size.
|
||||
- std::string linebuf;
|
||||
- linebuf.reserve(maxchars);
|
||||
-
|
||||
-#ifdef USE_STREAM
|
||||
- while (ifs.peek() != -1)
|
||||
-#else
|
||||
- char* line = 0;
|
||||
- do
|
||||
-#endif
|
||||
- {
|
||||
- linebuf.resize(0);
|
||||
-#ifdef USE_STREAM
|
||||
- safeGetline(ifs, linebuf);
|
||||
-#else
|
||||
- char tmpBuf[1024];
|
||||
- line = fileIO->readLine(fileHandle, tmpBuf, 1024);
|
||||
- if (line)
|
||||
- {
|
||||
- linebuf = line;
|
||||
- }
|
||||
-#endif
|
||||
- // Trim newline '\r\n' or '\r'
|
||||
- if (linebuf.size() > 0)
|
||||
- {
|
||||
- if (linebuf[linebuf.size() - 1] == '\n') linebuf.erase(linebuf.size() - 1);
|
||||
- }
|
||||
- if (linebuf.size() > 0)
|
||||
- {
|
||||
- if (linebuf[linebuf.size() - 1] == '\n') linebuf.erase(linebuf.size() - 1);
|
||||
- }
|
||||
-
|
||||
- // Skip if empty line.
|
||||
- if (linebuf.empty())
|
||||
- {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- // Skip leading space.
|
||||
- const char* token = linebuf.c_str();
|
||||
- token += strspn(token, " \t");
|
||||
-
|
||||
- btAssert(token);
|
||||
- if (token[0] == '\0') continue; // empty line
|
||||
-
|
||||
- if (token[0] == '#') continue; // comment line
|
||||
-
|
||||
- // q
|
||||
- if (token[0] == 'q' && isSpace((token[1])))
|
||||
- {
|
||||
- token += 2;
|
||||
- float x, y, z;
|
||||
- parseFloat3(x, y, z, token);
|
||||
- qs.push_back(btVector3(x, y, z));
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- // v
|
||||
- if (token[0] == 'v' && isSpace((token[1])))
|
||||
- {
|
||||
- token += 3;
|
||||
- float x, y, z;
|
||||
- parseFloat3(x, y, z, token);
|
||||
- vs.push_back(btVector3(x, y, z));
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- // Ignore unknown command.
|
||||
- }
|
||||
-#ifndef USE_STREAM
|
||||
- while (line)
|
||||
- ;
|
||||
-#endif
|
||||
-
|
||||
- if (fileHandle >= 0)
|
||||
- {
|
||||
- fileIO->fileClose(fileHandle);
|
||||
- }
|
||||
- return err.str();
|
||||
- }
|
||||
}
|
||||
|
||||
void btSoftBodyHelpers::duplicateFaces(const char* filename, const btSoftBody* psb)
|
@ -0,0 +1,23 @@
|
||||
backport of
|
||||
https://github.com/bulletphysics/bullet3/commit/4f0673810cab0eee67ea314a3243952afd150cb4
|
||||
|
||||
Index: src/BulletSoftBody/btSoftBodyHelpers.h
|
||||
--- src/BulletSoftBody/btSoftBodyHelpers.h.orig
|
||||
+++ src/BulletSoftBody/btSoftBodyHelpers.h
|
||||
@@ -17,7 +17,6 @@ subject to the following restrictions:
|
||||
#define BT_SOFT_BODY_HELPERS_H
|
||||
|
||||
#include "btSoftBody.h"
|
||||
-#include "../../examples/CommonInterfaces/CommonFileIOInterface.h"
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
//
|
||||
@@ -148,8 +147,6 @@ struct btSoftBodyHelpers
|
||||
static void writeObj(const char* file, const btSoftBody* psb);
|
||||
|
||||
static void writeState(const char* file, const btSoftBody* psb);
|
||||
-
|
||||
- static std::string loadDeformableState(btAlignedObjectArray<btVector3>& qs, btAlignedObjectArray<btVector3>& vs, const char* filename, CommonFileIOInterface* fileIO);
|
||||
|
||||
static void getBarycentricWeights(const btVector3& a, const btVector3& b, const btVector3& c, const btVector3& d, const btVector3& p, btVector4& bary);
|
||||
|
@ -379,6 +379,7 @@ include/bullet/BulletDynamics/Featherstone/btMultiBodyMLCPConstraintSolver.h
|
||||
include/bullet/BulletDynamics/Featherstone/btMultiBodyPoint2Point.h
|
||||
include/bullet/BulletDynamics/Featherstone/btMultiBodySliderConstraint.h
|
||||
include/bullet/BulletDynamics/Featherstone/btMultiBodySolverConstraint.h
|
||||
include/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointLimit.h
|
||||
include/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.h
|
||||
include/bullet/BulletDynamics/MLCPSolvers/
|
||||
include/bullet/BulletDynamics/MLCPSolvers/btDantzigLCP.h
|
||||
@ -411,6 +412,11 @@ include/bullet/BulletRobotics/BoxStack.h
|
||||
include/bullet/BulletRobotics/FixJointBoxes.h
|
||||
include/bullet/BulletRobotics/JointLimit.h
|
||||
include/bullet/BulletSoftBody/
|
||||
include/bullet/BulletSoftBody/BulletReducedDeformableBody/
|
||||
include/bullet/BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableBody.h
|
||||
include/bullet/BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableBodyHelpers.h
|
||||
include/bullet/BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableBodySolver.h
|
||||
include/bullet/BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableContactConstraint.h
|
||||
include/bullet/BulletSoftBody/DeformableBodyInplaceSolverIslandCallback.h
|
||||
include/bullet/BulletSoftBody/btCGProjection.h
|
||||
include/bullet/BulletSoftBody/btConjugateGradient.h
|
||||
@ -504,6 +510,7 @@ include/bullet/DeformableDemo/DeformableRigid.h
|
||||
include/bullet/DeformableDemo/DeformableSelfCollision.h
|
||||
include/bullet/DeformableDemo/GraspDeformable.h
|
||||
include/bullet/DeformableDemo/LargeDeformation.h
|
||||
include/bullet/DeformableDemo/LoadDeformed.h
|
||||
include/bullet/DeformableDemo/MultibodyClothAnchor.h
|
||||
include/bullet/DeformableDemo/Pinch.h
|
||||
include/bullet/DeformableDemo/PinchFriction.h
|
||||
@ -741,6 +748,16 @@ include/bullet/Planar2D/
|
||||
include/bullet/Planar2D/Planar2D.h
|
||||
include/bullet/Raycast/
|
||||
include/bullet/Raycast/RaytestDemo.h
|
||||
include/bullet/ReducedDeformableDemo/
|
||||
include/bullet/ReducedDeformableDemo/ConservationTest.h
|
||||
include/bullet/ReducedDeformableDemo/FreeFall.h
|
||||
include/bullet/ReducedDeformableDemo/FrictionSlope.h
|
||||
include/bullet/ReducedDeformableDemo/ModeVisualizer.h
|
||||
include/bullet/ReducedDeformableDemo/ReducedBenchmark.h
|
||||
include/bullet/ReducedDeformableDemo/ReducedCollide.h
|
||||
include/bullet/ReducedDeformableDemo/ReducedGrasp.h
|
||||
include/bullet/ReducedDeformableDemo/ReducedMotorGrasp.h
|
||||
include/bullet/ReducedDeformableDemo/Springboard.h
|
||||
include/bullet/RenderingExamples/
|
||||
include/bullet/RenderingExamples/CoordinateSystemDemo.h
|
||||
include/bullet/RenderingExamples/DynamicTexturedCubeDemo.h
|
||||
|
Loading…
Reference in New Issue
Block a user