Skip to content

Commit

Permalink
Merge remote-tracking branch 'bp/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
erwincoumans committed Mar 4, 2021
2 parents 3963f07 + 7b84fab commit b619763
Show file tree
Hide file tree
Showing 40 changed files with 433 additions and 42 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
language: cpp
matrix:
include:
- os: linux
compiler: gcc
env:
- BUILD_NAME=TRUSTY_GCC
- SUDO=sudo
- os: linux
compiler: clang
env:
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ IF(BULLET2_MULTITHREADING)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF (NOT MSVC)
IF (NOT WIN32)
LINK_LIBRARIES( pthread )
FIND_PACKAGE(Threads)
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} )
ENDIF (NOT WIN32)
ENDIF (BULLET2_MULTITHREADING)

Expand Down
3 changes: 2 additions & 1 deletion Extras/BulletRobotics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ ELSE(WIN32)
ENDIF(BUILD_CLSOCKET)

IF(NOT APPLE)
LINK_LIBRARIES( pthread ${DL} )
FIND_PACKAGE(Threads)
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
ENDIF(NOT APPLE)
ENDIF(WIN32)

Expand Down
3 changes: 2 additions & 1 deletion Extras/BulletRoboticsGUI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ ELSE(WIN32)
ENDIF(BUILD_CLSOCKET)

IF(NOT APPLE)
LINK_LIBRARIES( pthread ${DL} )
FIND_PACKAGE(Threads)
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
ENDIF(NOT APPLE)
ENDIF(WIN32)

Expand Down
19 changes: 19 additions & 0 deletions Extras/ConvexDecomposition/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2004 Open Dynamics Framework Group
www.physicstools.org
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11 changes: 11 additions & 0 deletions Extras/GIMPACTUtils/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
email: [email protected]
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
13 changes: 13 additions & 0 deletions Extras/HACD/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2011 Khaled Mamou (kmamou at gmail dot com)
All rights reserved.


Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 changes: 12 additions & 0 deletions Extras/InverseDynamics/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Bullet Continuous Collision Detection and Physics Library
http://bulletphysics.org

This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
12 changes: 6 additions & 6 deletions Extras/Serialize/BulletFileLoader/bFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,8 @@ char *bFile::readStruct(char *head, bChunkInd &dataChunk)
if ((strcmp(oldType, "btShortIntIndexData") == 0))
{
int allocLen = 2;
char *dataAlloc = new char[(dataChunk.nr * allocLen) + 1];
memset(dataAlloc, 0, (dataChunk.nr * allocLen) + 1);
char *dataAlloc = new char[(dataChunk.nr * allocLen) + sizeof(void*)];
memset(dataAlloc, 0, (dataChunk.nr * allocLen) + sizeof(void*));
short *dest = (short *)dataAlloc;
const short *src = (short *)head;
for (int i = 0; i < dataChunk.nr; i++)
Expand Down Expand Up @@ -682,8 +682,8 @@ char *bFile::readStruct(char *head, bChunkInd &dataChunk)
// numBlocks * length

int allocLen = (curLen);
char *dataAlloc = new char[(dataChunk.nr * allocLen) + 1];
memset(dataAlloc, 0, (dataChunk.nr * allocLen));
char *dataAlloc = new char[(dataChunk.nr * allocLen) + sizeof(void*)];
memset(dataAlloc, 0, (dataChunk.nr * allocLen) + sizeof(void*));

// track allocated
addDataBlock(dataAlloc);
Expand Down Expand Up @@ -719,8 +719,8 @@ char *bFile::readStruct(char *head, bChunkInd &dataChunk)
#endif //
}

char *dataAlloc = new char[(dataChunk.len) + 1];
memset(dataAlloc, 0, dataChunk.len + 1);
char *dataAlloc = new char[(dataChunk.len) + sizeof(void*)];
memset(dataAlloc, 0, dataChunk.len + sizeof(void*));

// track allocated
addDataBlock(dataAlloc);
Expand Down
14 changes: 14 additions & 0 deletions Extras/Serialize/makesdna/DNA_rigidbody.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Bullet Continuous Collision Detection and Physics Library
http://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#ifndef DNA_RIGIDBODY_H
#define DNA_RIGIDBODY_H
Expand Down
14 changes: 14 additions & 0 deletions Extras/VHACD/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright (c) 2011 Khaled Mamou (kmamou at gmail dot com)
All rights reserved.


Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

14 changes: 14 additions & 0 deletions Extras/obj2sdf/obj2sdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
/// this will make it easier to load complex obj files into pybullet
/// see for example export in data/kitchens/fathirmutfak.sdf

///Bullet Continuous Collision Detection and Physics Library
///Erwin Coumans (C) 2018
///http://bulletphysics.org
///
///This software is provided 'as-is', without any express or implied warranty.
///In no event will the authors be held liable for any damages arising from the use of this software.
///Permission is granted to anyone to use this software for any purpose,
///including commercial applications, and to alter it and redistribute it freely,
///subject to the following restrictions:
///
///1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
///2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
///3. This notice may not be removed or altered from any source distribution.

#include <string.h>
#include <stdio.h>
#include <assert.h>
Expand Down
3 changes: 2 additions & 1 deletion examples/BasicDemo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ ELSE(WIN32)
ADD_DEFINITIONS("-DGLEW_STATIC")
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")

LINK_LIBRARIES( pthread ${DL} )
FIND_PACKAGE(Threads)
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
ENDIF(APPLE)
ENDIF(WIN32)

Expand Down
8 changes: 5 additions & 3 deletions examples/ExampleBrowser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ IF (BUILD_SHARED_LIBS)
BulletInverseDynamics LinearMath OpenGLWindow gwen BussIK
${COCOA} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
)
ELSE(APPLE)
ELSE(APPLE)
FIND_PACKAGE(Threads)
TARGET_LINK_LIBRARIES(
BulletExampleBrowserLib Bullet3Common BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils
BulletInverseDynamics LinearMath OpenGLWindow gwen BussIK
pthread ${DL}
${CMAKE_THREAD_LIBS_INIT} ${DL}
)
ENDIF(APPLE)
ENDIF(WIN32)
Expand Down Expand Up @@ -116,7 +117,8 @@ ELSE(WIN32)
ADD_DEFINITIONS("-DGLEW_STATIC")
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/glad )
LINK_LIBRARIES( pthread ${DL})
FIND_PACKAGE(Threads)
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
ENDIF(APPLE)
ENDIF(WIN32)

Expand Down
1 change: 1 addition & 0 deletions examples/Importers/ImportURDFDemo/UrdfParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,7 @@ bool UrdfParser::parseDeformable(UrdfModel& model, tinyxml2::XMLElement* config,
if (!i)
{
logger->reportError("expected an inertial element");
return false;
}
UrdfInertia inertia;
if (!parseInertia(inertia, i, logger))
Expand Down
14 changes: 8 additions & 6 deletions examples/RobotSimulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ ELSE(WIN32)
ADD_DEFINITIONS("-DGLEW_STATIC")
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")

LINK_LIBRARIES( pthread ${DL} )
FIND_PACKAGE(Threads)
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
ENDIF(APPLE)
ENDIF(WIN32)

Expand Down Expand Up @@ -110,7 +111,8 @@ IF(WIN32)
ELSE()
IF(APPLE)
ELSE(APPLE)
TARGET_LINK_LIBRARIES( App_RobotSimulator_NoGUI pthread ${DL} )
FIND_PACKAGE(Threads)
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
ENDIF(APPLE)
ENDIF(WIN32)

Expand Down Expand Up @@ -144,10 +146,10 @@ IF(WIN32)
TARGET_LINK_LIBRARIES(App_HelloBulletRobotics ws2_32 Winmm)
ENDIF(BUILD_ENET OR BUILD_CLSOCKET)
ELSE()
IF(APPLE)
ELSE(APPLE)
TARGET_LINK_LIBRARIES( App_HelloBulletRobotics pthread ${DL} )
ENDIF(APPLE)
IF(NOT APPLE)
FIND_PACKAGE(Threads)
TARGET_LINK_LIBRARIES( App_HelloBulletRobotics ${CMAKE_THREAD_LIBS_INIT} ${DL} )
ENDIF(APPLE)
ENDIF(WIN32)


Expand Down
15 changes: 8 additions & 7 deletions examples/SharedMemory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ IF (WIN32)
${BULLET_PHYSICS_SOURCE_DIR}/build3/bullet.rc
)
ELSE(WIN32)
IF(APPLE)
LINK_LIBRARIES( pthread dl )
FIND_PACKAGE(Threads)
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
IF(APPLE)
ADD_EXECUTABLE(App_PhysicsServer_SharedMemory
${SharedMemory_SRCS}
../MultiThreading/b3PosixThreadSupport.cpp
../MultiThreading/b3PosixThreadSupport.h
main.cpp
)

ELSE(APPLE)
LINK_LIBRARIES( pthread ${DL} )
ELSE(APPLE)
ADD_EXECUTABLE(App_PhysicsServer_SharedMemory
${SharedMemory_SRCS}
../MultiThreading/b3PosixThreadSupport.cpp
Expand Down Expand Up @@ -180,8 +180,9 @@ IF (WIN32)
${BULLET_PHYSICS_SOURCE_DIR}/build3/bullet.rc
)
ELSE(WIN32)
FIND_PACKAGE(Threads)
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
IF(APPLE)
LINK_LIBRARIES( pthread dl )
FIND_LIBRARY(COCOA NAMES Cocoa)
MESSAGE(${COCOA})
LINK_LIBRARIES(${COCOA} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
Expand All @@ -197,7 +198,6 @@ ELSE(WIN32)
)

ELSE(APPLE)
LINK_LIBRARIES( pthread ${DL} )
ADD_DEFINITIONS("-DGLEW_INIT_OPENGL11_FUNCTIONS=1")
ADD_DEFINITIONS("-DGLEW_STATIC")
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
Expand Down Expand Up @@ -393,9 +393,10 @@ ELSE(WIN32 OR APPLE)
-std=c++11
)

FIND_PACKAGE(Threads)
target_link_libraries(App_PhysicsServer_SharedMemory_VR PRIVATE
openvr_api
pthread
${CMAKE_THREAD_LIBS_INIT}
${DL}
Bullet3Common
BulletWorldImporter
Expand Down
3 changes: 2 additions & 1 deletion examples/SimpleOpenGL3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ ELSE(WIN32)
ADD_DEFINITIONS("-DGLEW_STATIC")
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")

LINK_LIBRARIES( X11 pthread ${DL} Xext)
FIND_PACKAGE(Threads)
LINK_LIBRARIES( X11 ${CMAKE_THREAD_LIBS_INIT} ${DL} Xext )
ENDIF(APPLE)
ENDIF(WIN32)

Expand Down
12 changes: 12 additions & 0 deletions examples/ThirdPartyLibs/BussIK/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* Author: Samuel R. Buss, [email protected].
* Web page: http://www.math.ucsd.edu/~sbuss/ResearchWeb/ikmethods/index.html
*
*
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
8 changes: 8 additions & 0 deletions examples/ThirdPartyLibs/Eigen/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008 Gael Guennebaud <[email protected]>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 changes: 11 additions & 0 deletions examples/ThirdPartyLibs/Gwen/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
GWEN modified and adapted for the Bullet Physics Library
Using the Zlib license with permission from Garry Newman
Copyright (c) 2010 Facepunch Studios
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
3 changes: 3 additions & 0 deletions examples/ThirdPartyLibs/Wavefront/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Copyright 2012-2013, Syoyo Fujita.
//
// Licensed under 2-clause BSD liecense.
Loading

0 comments on commit b619763

Please sign in to comment.