Add bullet thirdparty library
This commit is contained in:
parent
a41fcbe7f4
commit
43d2daa899
@ -27,7 +27,6 @@ target_include_directories(couchlib
|
||||
if(WIN32)
|
||||
target_link_libraries(couch glfw3dll)
|
||||
target_link_libraries(couch ssp)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
|
||||
endif(WIN32)
|
||||
|
||||
install(TARGETS couch couchlib)
|
||||
|
@ -5,9 +5,6 @@ find_package(OpenGL REQUIRED)
|
||||
find_package(GLEW REQUIRED)
|
||||
find_package(glfw3 3.3 REQUIRED)
|
||||
|
||||
## Find Bullet
|
||||
find_package(Bullet REQUIRED)
|
||||
|
||||
if (LUA_ENABLED)
|
||||
## Find Lua
|
||||
find_package(Lua REQUIRED)
|
||||
@ -81,17 +78,12 @@ target_include_directories(couchlib
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_include_directories(couchlib
|
||||
PUBLIC
|
||||
${BULLET_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(couchlib glfw)
|
||||
target_link_libraries(couchlib OpenGL::GL)
|
||||
target_link_libraries(couchlib GLEW::GLEW)
|
||||
if (LUA_ENABLED)
|
||||
target_link_libraries(couchlib_luascripting ${LUA_LIBRARIES})
|
||||
endif ()
|
||||
target_link_libraries(couchlib ${BULLET_LIBRARIES})
|
||||
|
||||
## Add documentation
|
||||
find_package(Doxygen REQUIRED
|
||||
|
7
thirdparty/CMakeLists.txt
vendored
7
thirdparty/CMakeLists.txt
vendored
@ -10,3 +10,10 @@ target_include_directories(couchlib
|
||||
PUBLIC
|
||||
assimp/include)
|
||||
target_link_libraries(couchlib assimp::assimp)
|
||||
|
||||
## Bullet
|
||||
add_subdirectory(bullet)
|
||||
target_include_directories(couchlib
|
||||
PUBLIC
|
||||
bullet/src)
|
||||
target_link_libraries(couchlib LinearMath Bullet3Common BulletCollision BulletDynamics)
|
||||
|
7
thirdparty/bullet/.ci/docker/env.list
vendored
Normal file
7
thirdparty/bullet/.ci/docker/env.list
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
TRAVIS_OS_NAME
|
||||
TRAVIS_PULL_REQUEST
|
||||
|
||||
BUILD_NAME
|
||||
CC
|
||||
CXX
|
||||
SUDO
|
19
thirdparty/bullet/.ci/docker/ubuntu-bionic
vendored
Normal file
19
thirdparty/bullet/.ci/docker/ubuntu-bionic
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
FROM ubuntu:bionic
|
||||
|
||||
RUN apt-get update -qq
|
||||
RUN apt-get install -y \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
libgl-dev \
|
||||
libglu-dev \
|
||||
libpython3-dev \
|
||||
lsb-release \
|
||||
pkg-config \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-distutils \
|
||||
software-properties-common \
|
||||
sudo
|
18
thirdparty/bullet/.ci/docker/ubuntu-xenial
vendored
Normal file
18
thirdparty/bullet/.ci/docker/ubuntu-xenial
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
FROM ubuntu:xenial
|
||||
|
||||
RUN apt-get update -qq
|
||||
RUN apt-get install -y \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
libgl-dev \
|
||||
libglu-dev \
|
||||
libpython3-dev \
|
||||
lsb-release \
|
||||
pkg-config \
|
||||
python3 \
|
||||
python3-dev \
|
||||
software-properties-common \
|
||||
sudo
|
31
thirdparty/bullet/.ci/script.sh
vendored
Executable file
31
thirdparty/bullet/.ci/script.sh
vendored
Executable file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
echo "CXX="$CXX
|
||||
echo "CC="$CC
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" && "$CXX" = "g++" ]]; then
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y python3
|
||||
$SUDO apt-get install -y python3-pip
|
||||
$SUDO apt-get install python3-dev
|
||||
$SUDO pip3 install -U wheel
|
||||
$SUDO pip3 install -U setuptools
|
||||
python3 setup.py install --user
|
||||
python3 examples/pybullet/unittests/unittests.py --verbose
|
||||
python3 examples/pybullet/unittests/userDataTest.py --verbose
|
||||
python3 examples/pybullet/unittests/saveRestoreStateTest.py --verbose
|
||||
fi
|
||||
cmake . -DBUILD_PYBULLET=ON -G"Unix Makefiles" #-DCMAKE_CXX_FLAGS=-Werror
|
||||
make -j8
|
||||
ctest -j8 --output-on-failure
|
||||
|
||||
# Build again with double precision
|
||||
cmake . -G "Unix Makefiles" -DUSE_DOUBLE_PRECISION=ON #-DCMAKE_CXX_FLAGS=-Werror
|
||||
make -j8
|
||||
ctest -j8 --output-on-failure
|
||||
|
||||
# Build again with shared libraries
|
||||
cmake . -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON
|
||||
make -j8
|
||||
ctest -j8 --output-on-failure
|
||||
$SUDO make install
|
38
thirdparty/bullet/.gitignore
vendored
Normal file
38
thirdparty/bullet/.gitignore
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/bin
|
||||
/build3/gmake
|
||||
/build3/vs2010
|
||||
/build_cmake/
|
||||
|
||||
*.pyc
|
||||
|
||||
# Python
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
# Pip
|
||||
pip-selfcheck.json
|
||||
*.whl
|
||||
*.egg
|
||||
*.egg-info
|
||||
|
||||
# Setuptools
|
||||
/build
|
||||
/dist
|
||||
*.eggs
|
||||
|
||||
# CMake
|
||||
CMakeFiles/
|
||||
CMakeCache.txt
|
||||
cmake_install.cmake
|
||||
CTestTestFile.cmake
|
||||
|
||||
# Visual Studio build files
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
||||
*.sln
|
||||
|
||||
# Apple Finder metadata
|
||||
*.DS_Store
|
||||
|
||||
# vim temp files
|
||||
*.swp
|
5
thirdparty/bullet/.style.yapf
vendored
Normal file
5
thirdparty/bullet/.style.yapf
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
[style]
|
||||
based_on_style = google
|
||||
column_limit = 99
|
||||
indent_width = 2
|
||||
|
46
thirdparty/bullet/.travis.yml
vendored
Normal file
46
thirdparty/bullet/.travis.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
language: cpp
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
- BUILD_NAME=TRUSTY_CLANG
|
||||
- SUDO=sudo
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
- BUILD_NAME=XENIAL_CLANG
|
||||
- DOCKER_FILE="ubuntu-xenial"
|
||||
services: docker
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_NAME=BIONIC_GCC
|
||||
- DOCKER_FILE="ubuntu-bionic"
|
||||
services: docker
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
- BUILD_NAME=BIONIC_CLANG
|
||||
- DOCKER_FILE="ubuntu-bionic"
|
||||
services: docker
|
||||
- os: osx
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_NAME=OSX_GCC
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env:
|
||||
- COMPILER=clang++
|
||||
- BUILD_NAME=OSX_CLANG
|
||||
before_install:
|
||||
- if [ -n "$DOCKER_FILE" ]; then
|
||||
docker build -t "$DOCKER_FILE" -f ".ci/docker/$DOCKER_FILE" .;
|
||||
docker run -itd -v $TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR --env-file .ci/docker/env.list --name bullet-docker "$DOCKER_FILE";
|
||||
fi
|
||||
script:
|
||||
- if [ -n "$DOCKER_FILE" ]; then
|
||||
docker exec bullet-docker /bin/sh -c "cd $TRAVIS_BUILD_DIR && ./.ci/script.sh";
|
||||
else
|
||||
'.ci/script.sh';
|
||||
fi
|
45
thirdparty/bullet/AUTHORS.txt
vendored
Normal file
45
thirdparty/bullet/AUTHORS.txt
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
Bullet Physics is created by Erwin Coumans with contributions from the following authors / copyright holders:
|
||||
|
||||
AMD
|
||||
Apple
|
||||
Yunfei Bai
|
||||
Steve Baker
|
||||
Gino van den Bergen
|
||||
Jeff Bingham
|
||||
Nicola Candussi
|
||||
Erin Catto
|
||||
Lawrence Chai
|
||||
Erwin Coumans
|
||||
Disney Animation
|
||||
Benjamin Ellenberger
|
||||
Christer Ericson
|
||||
Google
|
||||
Dirk Gregorius
|
||||
Marcus Hennix
|
||||
Jasmine Hsu
|
||||
MBSim Development Team
|
||||
Takahiro Harada
|
||||
Simon Hobbs
|
||||
John Hsu
|
||||
Ole Kniemeyer
|
||||
Jay Lee
|
||||
Francisco Leon
|
||||
lunkhound
|
||||
Vsevolod Klementjev
|
||||
Phil Knight
|
||||
John McCutchan
|
||||
Steven Peters
|
||||
Roman Ponomarev
|
||||
Nathanael Presson
|
||||
Gabor PUHR
|
||||
Arthur Shek
|
||||
Russel Smith
|
||||
Sony
|
||||
Jakub Stephien
|
||||
Marten Svanfeldt
|
||||
Jie Tan
|
||||
Pierre Terdiman
|
||||
Steven Thompson
|
||||
Tamas Umenhoffer
|
||||
|
||||
If your name is missing, please send an email to erwin.coumans@gmail.com or file an issue at http://github.com/bulletphysics/bullet3
|
25
thirdparty/bullet/BulletConfig.cmake.in
vendored
Normal file
25
thirdparty/bullet/BulletConfig.cmake.in
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# -*- cmake -*-
|
||||
#
|
||||
# BulletConfig.cmake(.in)
|
||||
#
|
||||
|
||||
# Use the following variables to compile and link against Bullet:
|
||||
# BULLET_FOUND - True if Bullet was found on your system
|
||||
# BULLET_USE_FILE - The file making Bullet usable
|
||||
# BULLET_DEFINITIONS - Definitions needed to build with Bullet
|
||||
# BULLET_INCLUDE_DIR - Directory where Bullet-C-Api.h can be found
|
||||
# BULLET_INCLUDE_DIRS - List of directories of Bullet and it's dependencies
|
||||
# BULLET_LIBRARIES - List of libraries to link against Bullet library
|
||||
# BULLET_LIBRARY_DIRS - List of directories containing Bullet' libraries
|
||||
# BULLET_ROOT_DIR - The base directory of Bullet
|
||||
# BULLET_VERSION_STRING - A human-readable string containing the version
|
||||
|
||||
set ( BULLET_FOUND 1 )
|
||||
set ( BULLET_USE_FILE "@BULLET_USE_FILE@" )
|
||||
set ( BULLET_DEFINITIONS "@BULLET_DEFINITIONS@" )
|
||||
set ( BULLET_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@" )
|
||||
set ( BULLET_INCLUDE_DIRS "@INCLUDE_INSTALL_DIR@" )
|
||||
set ( BULLET_LIBRARIES "@BULLET_LIBRARIES@" )
|
||||
set ( BULLET_LIBRARY_DIRS "@LIB_DESTINATION@" )
|
||||
set ( BULLET_ROOT_DIR "@CMAKE_INSTALL_PREFIX@" )
|
||||
set ( BULLET_VERSION_STRING "@BULLET_VERSION@" )
|
487
thirdparty/bullet/CMakeLists.txt
vendored
Normal file
487
thirdparty/bullet/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,487 @@
|
||||
cmake_minimum_required(VERSION 2.4.3)
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||
cmake_policy(SET CMP0017 NEW)
|
||||
#this line has to appear before 'PROJECT' in order to be able to disable incremental linking
|
||||
SET(MSVC_INCREMENTAL_DEFAULT ON)
|
||||
|
||||
PROJECT(BULLET_PHYSICS)
|
||||
FILE (STRINGS "VERSION" BULLET_VERSION)
|
||||
|
||||
IF(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
if(POLICY CMP0042)
|
||||
# Enable MACOSX_RPATH by default.
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
endif(POLICY CMP0042)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
IF (NOT CMAKE_BUILD_TYPE)
|
||||
# SET(CMAKE_BUILD_TYPE "Debug")
|
||||
SET(CMAKE_BUILD_TYPE "Release")
|
||||
ENDIF (NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
#MESSAGE("CMAKE_CXX_FLAGS_DEBUG="+${CMAKE_CXX_FLAGS_DEBUG})
|
||||
|
||||
OPTION(USE_DOUBLE_PRECISION "Use double precision" OFF)
|
||||
SET(CLAMP_VELOCITIES "0" CACHE STRING "Clamp rigid bodies' velocity to this value, if larger than zero. Useful to prevent floating point errors or in general runaway velocities in complex scenarios")
|
||||
OPTION(USE_GRAPHICAL_BENCHMARK "Use Graphical Benchmark" OFF)
|
||||
OPTION(BUILD_SHARED_LIBS "Use shared libraries" ON)
|
||||
OPTION(USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD "Use btSoftMultiBodyDynamicsWorld" OFF)
|
||||
OPTION(USE_OPENVR "Use OpenVR for virtual reality" OFF)
|
||||
|
||||
OPTION(ENABLE_VHACD "Use VHACD in BulletRobotics and pybullet" OFF)
|
||||
|
||||
OPTION(BULLET2_MULTITHREADING "Build Bullet 2 libraries with mutex locking around certain operations (required for multi-threading)" OFF)
|
||||
IF (BULLET2_MULTITHREADING)
|
||||
OPTION(BULLET2_USE_OPEN_MP_MULTITHREADING "Build Bullet 2 with support for multi-threading with OpenMP (requires a compiler with OpenMP support)" OFF)
|
||||
OPTION(BULLET2_USE_TBB_MULTITHREADING "Build Bullet 2 with support for multi-threading with Intel Threading Building Blocks (requires the TBB library to be already installed)" OFF)
|
||||
IF (MSVC)
|
||||
OPTION(BULLET2_USE_PPL_MULTITHREADING "Build Bullet 2 with support for multi-threading with Microsoft Parallel Patterns Library (requires MSVC compiler)" OFF)
|
||||
ENDIF (MSVC)
|
||||
ENDIF (BULLET2_MULTITHREADING)
|
||||
|
||||
|
||||
IF(NOT WIN32)
|
||||
SET(DL ${CMAKE_DL_LIBS})
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
MESSAGE("Linux")
|
||||
SET(OSDEF -D_LINUX)
|
||||
ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
IF(APPLE)
|
||||
MESSAGE("Apple")
|
||||
SET(OSDEF -D_DARWIN)
|
||||
ELSE(APPLE)
|
||||
MESSAGE("BSD?")
|
||||
SET(OSDEF -D_BSD)
|
||||
ENDIF(APPLE)
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
ENDIF(NOT WIN32)
|
||||
|
||||
OPTION(USE_MSVC_INCREMENTAL_LINKING "Use MSVC Incremental Linking" OFF)
|
||||
|
||||
#statically linking VC++ isn't supported for WindowsPhone/WindowsStore
|
||||
IF (CMAKE_SYSTEM_NAME STREQUAL WindowsPhone OR CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
|
||||
OPTION(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC Runtime Library DLL (/MD or /MDd)" ON)
|
||||
ELSE ()
|
||||
OPTION(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC Runtime Library DLL (/MD or /MDd)" OFF)
|
||||
ENDIF (CMAKE_SYSTEM_NAME STREQUAL WindowsPhone OR CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
|
||||
OPTION(USE_MSVC_RELEASE_RUNTIME_ALWAYS "Use MSVC Release Runtime Library even in Debug" OFF)
|
||||
|
||||
#SET(CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:NO")
|
||||
#SET(CMAKE_EXE_LINKER_FLAGS "/STACK:10000000 /INCREMENTAL:NO")
|
||||
|
||||
#MESSAGE("MSVC_INCREMENTAL_YES_FLAG"+${MSVC_INCREMENTAL_YES_FLAG})
|
||||
|
||||
|
||||
IF(MSVC)
|
||||
IF (NOT USE_MSVC_INCREMENTAL_LINKING)
|
||||
#MESSAGE("MSVC_INCREMENTAL_DEFAULT"+${MSVC_INCREMENTAL_DEFAULT})
|
||||
SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:NO")
|
||||
|
||||
STRING(REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags "${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "/INCREMENTAL:NO ${replacementFlags}" )
|
||||
MESSAGE("CMAKE_EXE_LINKER_FLAGS_DEBUG=${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
|
||||
|
||||
STRING(REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags2 "${CMAKE_EXE_LINKER_FLAGS}")
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS ${replacementFlag2})
|
||||
STRING(REPLACE "INCREMENTAL:YES" "" replacementFlags3 "${CMAKE_EXTRA_LINK_FLAGS}")
|
||||
|
||||
SET(CMAKE_EXTRA_LINK_FLAGS ${replacementFlag3})
|
||||
|
||||
|
||||
STRING(REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags3 "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO ${replacementFlags3})
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/INCREMENTAL:NO ${replacementFlags3}" )
|
||||
|
||||
ENDIF (NOT USE_MSVC_INCREMENTAL_LINKING)
|
||||
|
||||
IF (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
|
||||
#We statically link to reduce dependencies
|
||||
FOREACH(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO )
|
||||
IF(${flag_var} MATCHES "/MD")
|
||||
STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||
ENDIF(${flag_var} MATCHES "/MD")
|
||||
IF(${flag_var} MATCHES "/MDd")
|
||||
STRING(REGEX REPLACE "/MDd" "/MTd" ${flag_var} "${${flag_var}}")
|
||||
ENDIF(${flag_var} MATCHES "/MDd")
|
||||
ENDFOREACH(flag_var)
|
||||
ENDIF (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
|
||||
|
||||
IF (USE_MSVC_RELEASE_RUNTIME_ALWAYS)
|
||||
FOREACH(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO )
|
||||
IF(${flag_var} MATCHES "/MDd")
|
||||
STRING(REGEX REPLACE "/MDd" "/MD" ${flag_var} "${${flag_var}}")
|
||||
ENDIF(${flag_var} MATCHES "/MDd")
|
||||
IF(${flag_var} MATCHES "/MTd")
|
||||
STRING(REGEX REPLACE "/MTd" "/MT" ${flag_var} "${${flag_var}}")
|
||||
ENDIF(${flag_var} MATCHES "/MTd")
|
||||
# Need to remove _DEBUG too otherwise things like _ITERATOR_DEBUG_LEVEL mismatch
|
||||
IF(${flag_var} MATCHES "-D_DEBUG")
|
||||
STRING(REGEX REPLACE "-D_DEBUG" "" ${flag_var} "${${flag_var}}")
|
||||
ENDIF(${flag_var} MATCHES "-D_DEBUG")
|
||||
ENDFOREACH(flag_var)
|
||||
ENDIF (USE_MSVC_RELEASE_RUNTIME_ALWAYS)
|
||||
|
||||
IF (CMAKE_CL_64)
|
||||
ADD_DEFINITIONS(-D_WIN64)
|
||||
ELSE()
|
||||
OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" OFF)
|
||||
option(USE_MSVC_SSE2 "Compile your program with SSE2 instructions" ON)
|
||||
|
||||
IF (USE_MSVC_SSE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE")
|
||||
ENDIF()
|
||||
IF (USE_MSVC_SSE2)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
option(USE_MSVC_AVX "Compile your program with AVX instructions" OFF)
|
||||
|
||||
IF(USE_MSVC_AVX)
|
||||
add_definitions(/arch:AVX)
|
||||
ENDIF()
|
||||
|
||||
OPTION(USE_MSVC_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON)
|
||||
IF (USE_MSVC_FAST_FLOATINGPOINT)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast")
|
||||
ENDIF()
|
||||
|
||||
OPTION(USE_MSVC_STRING_POOLING "Use MSVC /GF string pooling option" ON)
|
||||
IF (USE_MSVC_STRING_POOLING)
|
||||
SET(CMAKE_C_FLAGS "/GF ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "/GF ${CMAKE_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
|
||||
OPTION(USE_MSVC_FUNCTION_LEVEL_LINKING "Use MSVC /Gy function level linking option" ON)
|
||||
IF(USE_MSVC_FUNCTION_LEVEL_LINKING)
|
||||
SET(CMAKE_C_FLAGS "/Gy ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "/Gy ${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:REF")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:REF")
|
||||
ENDIF(USE_MSVC_FUNCTION_LEVEL_LINKING)
|
||||
|
||||
OPTION(USE_MSVC_EXEPTIONS "Use MSVC C++ exceptions option" OFF)
|
||||
|
||||
|
||||
|
||||
OPTION(USE_MSVC_COMDAT_FOLDING "Use MSVC /OPT:ICF COMDAT folding option" ON)
|
||||
|
||||
IF(USE_MSVC_COMDAT_FOLDING)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:ICF")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:ICF")
|
||||
ENDIF()
|
||||
|
||||
OPTION(USE_MSVC_DISABLE_RTTI "Use MSVC /GR- disabled RTTI flags option" ON)
|
||||
IF(USE_MSVC_DISABLE_RTTI)
|
||||
STRING(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
|
||||
SET(CMAKE_C_FLAGS "/GR- ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "/GR- ${CMAKE_CXX_FLAGS}")
|
||||
ENDIF(USE_MSVC_DISABLE_RTTI)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267")
|
||||
ENDIF(MSVC)
|
||||
|
||||
|
||||
|
||||
IF (WIN32)
|
||||
OPTION(INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES "Create MSVC projectfiles that can be distributed" OFF)
|
||||
|
||||
IF (INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
||||
SET (LIBRARY_OUTPUT_PATH ${BULLET_PHYSICS_SOURCE_DIR}/lib CACHE PATH "Single output directory for building all libraries.")
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BULLET_PHYSICS_SOURCE_DIR})
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BULLET_PHYSICS_SOURCE_DIR})
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${BULLET_PHYSICS_SOURCE_DIR})
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${BULLET_PHYSICS_SOURCE_DIR})
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${BULLET_PHYSICS_SOURCE_DIR})
|
||||
ELSE()
|
||||
SET (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE PATH "Single output directory for building all libraries.")
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
OPTION(INTERNAL_CREATE_MSVC_RELATIVE_PATH_PROJECTFILES "Create MSVC projectfiles with relative paths" OFF)
|
||||
OPTION(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES "Add MSVC postfix for executable names (_Debug)" OFF)
|
||||
|
||||
SET(CMAKE_DEBUG_POSTFIX "_Debug" CACHE STRING "Adds a postfix for debug-built libraries.")
|
||||
SET(CMAKE_MINSIZEREL_POSTFIX "_MinsizeRel" CACHE STRING "Adds a postfix for MinsizeRelease-built libraries.")
|
||||
SET(CMAKE_RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo" CACHE STRING "Adds a postfix for ReleaseWithDebug-built libraries.")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IF (INTERNAL_CREATE_MSVC_RELATIVE_PATH_PROJECTFILES)
|
||||
SET(CMAKE_SUPPRESS_REGENERATION 1)
|
||||
SET(CMAKE_USE_RELATIVE_PATHS 1)
|
||||
ENDIF(INTERNAL_CREATE_MSVC_RELATIVE_PATH_PROJECTFILES)
|
||||
|
||||
ENDIF (WIN32)
|
||||
|
||||
|
||||
OPTION(BUILD_CPU_DEMOS "Build original Bullet CPU examples" OFF)
|
||||
|
||||
|
||||
|
||||
OPTION(INTERNAL_UPDATE_SERIALIZATION_STRUCTURES "Internal update serialization structures" OFF)
|
||||
IF (INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
ADD_DEFINITIONS( -DBT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
ENDIF (INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
|
||||
IF (CLAMP_VELOCITIES)
|
||||
ADD_DEFINITIONS( -DBT_CLAMP_VELOCITY_TO=${CLAMP_VELOCITIES})
|
||||
ENDIF (CLAMP_VELOCITIES)
|
||||
|
||||
IF (USE_DOUBLE_PRECISION)
|
||||
ADD_DEFINITIONS( -DBT_USE_DOUBLE_PRECISION)
|
||||
SET( BULLET_DOUBLE_DEF "-DBT_USE_DOUBLE_PRECISION")
|
||||
ENDIF (USE_DOUBLE_PRECISION)
|
||||
|
||||
IF (NOT USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||
ADD_DEFINITIONS(-DSKIP_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||
ENDIF ()
|
||||
|
||||
IF(USE_GRAPHICAL_BENCHMARK)
|
||||
ADD_DEFINITIONS( -DUSE_GRAPHICAL_BENCHMARK)
|
||||
ENDIF (USE_GRAPHICAL_BENCHMARK)
|
||||
|
||||
IF(BULLET2_MULTITHREADING)
|
||||
ADD_DEFINITIONS( -DBT_THREADSAFE=1 )
|
||||
IF (NOT MSVC)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
ENDIF (NOT MSVC)
|
||||
IF (NOT WIN32)
|
||||
FIND_PACKAGE(Threads)
|
||||
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} )
|
||||
ENDIF (NOT WIN32)
|
||||
ENDIF (BULLET2_MULTITHREADING)
|
||||
|
||||
IF (BULLET2_USE_OPEN_MP_MULTITHREADING)
|
||||
ADD_DEFINITIONS("-DBT_USE_OPENMP=1")
|
||||
IF (MSVC)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp")
|
||||
ELSE (MSVC)
|
||||
# GCC, Clang
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
||||
ENDIF (MSVC)
|
||||
ENDIF (BULLET2_USE_OPEN_MP_MULTITHREADING)
|
||||
|
||||
IF (BULLET2_USE_TBB_MULTITHREADING)
|
||||
SET (BULLET2_TBB_INCLUDE_DIR "not found" CACHE PATH "Directory for Intel TBB includes.")
|
||||
SET (BULLET2_TBB_LIB_DIR "not found" CACHE PATH "Directory for Intel TBB libraries.")
|
||||
find_library(TBB_LIBRARY tbb PATHS ${BULLET2_TBB_LIB_DIR})
|
||||
find_library(TBBMALLOC_LIBRARY tbbmalloc PATHS ${BULLET2_TBB_LIB_DIR})
|
||||
ADD_DEFINITIONS("-DBT_USE_TBB=1")
|
||||
INCLUDE_DIRECTORIES( ${BULLET2_TBB_INCLUDE_DIR} )
|
||||
LINK_LIBRARIES( ${TBB_LIBRARY} ${TBBMALLOC_LIBRARY} )
|
||||
ENDIF (BULLET2_USE_TBB_MULTITHREADING)
|
||||
|
||||
IF (BULLET2_USE_PPL_MULTITHREADING)
|
||||
ADD_DEFINITIONS("-DBT_USE_PPL=1")
|
||||
ENDIF (BULLET2_USE_PPL_MULTITHREADING)
|
||||
|
||||
IF (WIN32)
|
||||
OPTION(USE_GLUT "Use Glut" ON)
|
||||
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
||||
ADD_DEFINITIONS( -D_CRT_SECURE_NO_DEPRECATE )
|
||||
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
||||
|
||||
IF (USE_GLUT AND MSVC)
|
||||
string (REPLACE "/D_WINDOWS" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
remove_definitions(-D_WINDOWS )
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
ELSE(WIN32)
|
||||
OPTION(USE_GLUT "Use Glut" ON)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
IF(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
|
||||
# This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system
|
||||
# This should be the case.
|
||||
|
||||
FIND_PACKAGE(OpenGL)
|
||||
IF (OPENGL_FOUND)
|
||||
MESSAGE("OPENGL FOUND")
|
||||
MESSAGE(${OPENGL_LIBRARIES})
|
||||
ELSE (OPENGL_FOUND)
|
||||
MESSAGE("OPENGL NOT FOUND")
|
||||
SET(OPENGL_gl_LIBRARY opengl32)
|
||||
SET(OPENGL_glu_LIBRARY glu32)
|
||||
ENDIF (OPENGL_FOUND)
|
||||
|
||||
|
||||
#FIND_PACKAGE(GLU)
|
||||
|
||||
|
||||
IF (APPLE)
|
||||
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
|
||||
ENDIF()
|
||||
|
||||
OPTION(BUILD_BULLET3 "Set when you want to build Bullet 3" ON)
|
||||
|
||||
# Optional Python configuration
|
||||
# Will not probe environment for Python configuration (which can abort the
|
||||
# build process) unless you explicitly turn on BUILD_PYBULLET.
|
||||
OPTION(BUILD_PYBULLET "Set when you want to build pybullet (Python bindings for Bullet)" OFF)
|
||||
IF(BUILD_PYBULLET)
|
||||
SET(PYTHON_VERSION_PYBULLET "" CACHE STRING "Python version pybullet will use.")
|
||||
SET(Python_ADDITIONAL_VERSIONS 3 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.7.12 2.7.10 2.7.3 )
|
||||
SET_PROPERTY(CACHE PYTHON_VERSION_PYBULLET PROPERTY STRINGS ${Python_ADDITIONAL_VERSIONS})
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build3/cmake ${CMAKE_MODULE_PATH})
|
||||
OPTION(EXACT_PYTHON_VERSION "Require Python and match PYTHON_VERSION_PYBULLET exactly, e.g. 2.7.12" OFF)
|
||||
IF(EXACT_PYTHON_VERSION)
|
||||
set(EXACT_PYTHON_VERSION_FLAG EXACT REQUIRED)
|
||||
ENDIF(EXACT_PYTHON_VERSION)
|
||||
# first find the python interpreter
|
||||
FIND_PACKAGE(PythonInterp ${PYTHON_VERSION_PYBULLET} ${EXACT_PYTHON_VERSION_FLAG})
|
||||
# python library should exactly match that of the interpreter
|
||||
# the following can result in fatal error if you don't have the right python configuration
|
||||
FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
|
||||
ENDIF(BUILD_PYBULLET)
|
||||
|
||||
OPTION(BUILD_ENET "Set when you want to build apps with enet UDP networking support" ON)
|
||||
OPTION(BUILD_CLSOCKET "Set when you want to build apps with enet TCP networking support" ON)
|
||||
|
||||
|
||||
IF(BUILD_PYBULLET)
|
||||
FIND_PACKAGE(PythonLibs)
|
||||
|
||||
OPTION(BUILD_PYBULLET_NUMPY "Set when you want to build pybullet with NumPy support" OFF)
|
||||
OPTION(BUILD_PYBULLET_ENET "Set when you want to build pybullet with enet UDP networking support" ON)
|
||||
OPTION(BUILD_PYBULLET_CLSOCKET "Set when you want to build pybullet with enet TCP networking support" ON)
|
||||
|
||||
OPTION(BUILD_PYBULLET_MAC_USE_PYTHON_FRAMEWORK "Set when you want to use the Python Framework on Mac" OFF)
|
||||
|
||||
IF(BUILD_PYBULLET_NUMPY)
|
||||
#include(FindNumPy)
|
||||
FIND_PACKAGE(NumPy)
|
||||
if (PYTHON_NUMPY_FOUND)
|
||||
message("NumPy found")
|
||||
add_definitions(-DPYBULLET_USE_NUMPY)
|
||||
else()
|
||||
message("NumPy not found")
|
||||
endif()
|
||||
ENDIF()
|
||||
|
||||
IF(WIN32)
|
||||
SET(BUILD_SHARED_LIBS OFF CACHE BOOL "Shared Libs" FORCE)
|
||||
ELSE(WIN32)
|
||||
SET(BUILD_SHARED_LIBS ON CACHE BOOL "Shared Libs" FORCE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(APPLE)
|
||||
OPTION(BUILD_PYBULLET_MAC_USE_PYTHON_FRAMEWORK "Set when you want to use the Python Framework on Mac" ON)
|
||||
IF(NOT BUILD_PYBULLET_MAC_USE_PYTHON_FRAMEWORK)
|
||||
add_definitions(-DB3_NO_PYTHON_FRAMEWORK)
|
||||
ENDIF(NOT BUILD_PYBULLET_MAC_USE_PYTHON_FRAMEWORK)
|
||||
OPTION(BUILD_PYBULLET_SHOW_PY_VERSION "Set when you want to show the PY_MAJOR_VERSION and PY_MAJOR_VERSION using #pragme message." OFF)
|
||||
IF(BUILD_PYBULLET_SHOW_PY_VERSION)
|
||||
add_definitions(-DB3_DUMP_PYTHON_VERSION)
|
||||
ENDIF()
|
||||
|
||||
ENDIF(APPLE)
|
||||
|
||||
ENDIF(BUILD_PYBULLET)
|
||||
|
||||
IF(NOT WIN32 AND NOT APPLE)
|
||||
OPTION(BUILD_EGL "Build OpenGL/EGL" ON)
|
||||
IF(BUILD_EGL)
|
||||
ADD_DEFINITIONS(-DBT_USE_EGL)
|
||||
ENDIF(BUILD_EGL)
|
||||
ENDIF()
|
||||
|
||||
IF(BUILD_BULLET3)
|
||||
IF(APPLE)
|
||||
MESSAGE("Mac OSX Version is ${_CURRENT_OSX_VERSION}")
|
||||
IF(_CURRENT_OSX_VERSION VERSION_LESS 10.9)
|
||||
MESSAGE("Mac OSX below 10.9 has no OpenGL 3 support so please disable the BUILD_OPENGL3_DEMOS option")
|
||||
#unset(BUILD_OPENGL3_DEMOS CACHE)
|
||||
|
||||
OPTION(BUILD_OPENGL3_DEMOS "Set when you want to build the OpenGL3+ demos" OFF)
|
||||
ELSE()
|
||||
OPTION(BUILD_OPENGL3_DEMOS "Set when you want to build the OpenGL3+ demos" ON)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
OPTION(BUILD_OPENGL3_DEMOS "Set when you want to build Bullet 3 OpenGL3+ demos" ON)
|
||||
ENDIF()
|
||||
ELSE(BUILD_BULLET3)
|
||||
unset(BUILD_OPENGL3_DEMOS CACHE)
|
||||
OPTION(BUILD_OPENGL3_DEMOS "Set when you want to build Bullet 3 OpenGL3+ demos" OFF)
|
||||
ENDIF(BUILD_BULLET3)
|
||||
IF(BUILD_OPENGL3_DEMOS)
|
||||
IF(EXISTS ${BULLET_PHYSICS_SOURCE_DIR}/Demos3 AND IS_DIRECTORY ${BULLET_PHYSICS_SOURCE_DIR}/Demos3)
|
||||
SUBDIRS(Demos3)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
ADD_DEFINITIONS(-DNO_OPENGL3)
|
||||
ENDIF(BUILD_OPENGL3_DEMOS)
|
||||
|
||||
SUBDIRS(src)
|
||||
|
||||
IF("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles")
|
||||
OPTION(INSTALL_LIBS "Set when you want to install libraries" ON)
|
||||
ELSE()
|
||||
IF(APPLE AND FRAMEWORK)
|
||||
OPTION(INSTALL_LIBS "Set when you want to install libraries" ON)
|
||||
ELSE()
|
||||
#by default, don't enable the 'INSTALL' option for Xcode and MSVC projectfiles
|
||||
OPTION(INSTALL_LIBS "Set when you want to install libraries" OFF)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(INSTALL_LIBS)
|
||||
#INSTALL of other files requires CMake 2.6
|
||||
IF(BUILD_EXTRAS)
|
||||
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||
OPTION(INSTALL_EXTRA_LIBS "Set when you want extra libraries installed" ON)
|
||||
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||
ENDIF(BUILD_EXTRAS)
|
||||
|
||||
SET (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
|
||||
SET (LIB_DESTINATION "lib${LIB_SUFFIX}" CACHE STRING "Library directory name")
|
||||
## the following are directories where stuff will be installed to
|
||||
SET(INCLUDE_INSTALL_DIR "include/bullet/" CACHE PATH "The subdirectory to the header prefix")
|
||||
SET(PKGCONFIG_INSTALL_PREFIX "lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files")
|
||||
IF(NOT MSVC)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bullet.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/bullet.pc @ONLY)
|
||||
INSTALL(
|
||||
FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/bullet.pc
|
||||
DESTINATION
|
||||
${PKGCONFIG_INSTALL_PREFIX})
|
||||
ENDIF(NOT MSVC)
|
||||
ENDIF()
|
||||
|
||||
set (BULLET_CONFIG_CMAKE_PATH lib${LIB_SUFFIX}/cmake/bullet )
|
||||
list (APPEND BULLET_DEFINITIONS ${BULLET_DOUBLE_DEF})
|
||||
list (APPEND BULLET_LIBRARIES LinearMath)
|
||||
list (APPEND BULLET_LIBRARIES Bullet3Common)
|
||||
list (APPEND BULLET_LIBRARIES BulletInverseDynamics)
|
||||
list (APPEND BULLET_LIBRARIES BulletCollision)
|
||||
list (APPEND BULLET_LIBRARIES BulletDynamics)
|
||||
list (APPEND BULLET_LIBRARIES BulletSoftBody)
|
||||
|
||||
set (BULLET_USE_FILE ${BULLET_CONFIG_CMAKE_PATH}/UseBullet.cmake)
|
||||
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/BulletConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake
|
||||
@ONLY ESCAPE_QUOTES
|
||||
)
|
||||
OPTION(INSTALL_CMAKE_FILES "Install generated CMake files" ON)
|
||||
|
||||
IF (INSTALL_CMAKE_FILES)
|
||||
install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/UseBullet.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake
|
||||
DESTINATION ${BULLET_CONFIG_CMAKE_PATH}
|
||||
)
|
||||
ENDIF (INSTALL_CMAKE_FILES)
|
780
thirdparty/bullet/Doxyfile
vendored
Normal file
780
thirdparty/bullet/Doxyfile
vendored
Normal file
@ -0,0 +1,780 @@
|
||||
# Doxyfile 1.2.4
|
||||
|
||||
# This file describes the settings to be used by doxygen for a project
|
||||
#
|
||||
# All text after a hash (#) is considered a comment and will be ignored
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# For lists items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (" ")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||
# by quotes) that should identify the project.
|
||||
PROJECT_NAME = "Bullet Collision Detection & Physics Library"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER =
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY =
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# The default language is English, other supported languages are:
|
||||
# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese,
|
||||
# Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian,
|
||||
# Polish, Portuguese and Slovene.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available.
|
||||
# Private class members and static file members will be hidden unless
|
||||
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
|
||||
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_PRIVATE = YES
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_STATIC = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||
# undocumented members of documented classes, files or namespaces.
|
||||
# If set to NO (the default) these members will be included in the
|
||||
# various overviews, but no documentation section is generated.
|
||||
# This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy.
|
||||
# If set to NO (the default) these class will be included in the various
|
||||
# overviews. This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
# the file and class documentation (similar to JavaDoc).
|
||||
# Set to NO to disable this.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
|
||||
# the brief description of a member or function before the detailed description.
|
||||
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
# brief descriptions will be completely suppressed.
|
||||
|
||||
REPEAT_BRIEF = YES
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# Doxygen will generate a detailed section even if there is only a brief
|
||||
# description.
|
||||
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
|
||||
# path before files name in the file list and in the header files. If set
|
||||
# to NO the shortest path that makes the file name unique will be used.
|
||||
|
||||
FULL_PATH_NAMES = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
|
||||
# can be used to strip a user defined part of the path. Stripping is
|
||||
# only done if one of the specified strings matches the left-hand part of
|
||||
# the path. It is allowed to use relative paths in the argument list.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The INTERNAL_DOCS tag determines if documentation
|
||||
# that is typed after a \internal command is included. If the tag is set
|
||||
# to NO (the default) then the documentation will be excluded.
|
||||
# Set it to YES to include the internal documentation.
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
|
||||
# generate a class diagram (in Html and LaTeX) for classes with base or
|
||||
# super classes. Setting the tag to NO turns the diagrams off.
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
|
||||
# be generated. Documented entities will be cross-referenced with these sources.
|
||||
|
||||
SOURCE_BROWSER = YES
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||
# of functions and classes directly in the documentation.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||
# doxygen to hide any special comment blocks from generated source code
|
||||
# fragments. Normal C and C++ comments will always remain visible.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
|
||||
# file names in lower case letters. If set to YES upper case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# users are adviced to set this option to NO.
|
||||
|
||||
CASE_SENSE_NAMES = YES
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
|
||||
# will show members with their full class and namespace scopes in the
|
||||
# documentation. If set to YES the scope will be hidden.
|
||||
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
|
||||
# will generate a verbatim copy of the header file for each class for
|
||||
# which an include is specified. Set to NO to disable this.
|
||||
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
|
||||
# will put list of the files that are included by a file in the documentation
|
||||
# of that file.
|
||||
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
|
||||
# will interpret the first line (until the first dot) of a JavaDoc-style
|
||||
# comment as the brief description. If set to NO, the JavaDoc
|
||||
# comments will behave just like the Qt-style comments (thus requiring an
|
||||
# explict @brief command for a brief description.
|
||||
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||
# member inherits the documentation from any documented member that it
|
||||
# reimplements.
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||
# is inserted in the documentation for inline members.
|
||||
|
||||
INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
|
||||
# will sort the (detailed) documentation of file and class members
|
||||
# alphabetically by member name. If set to NO the members will appear in
|
||||
# declaration order.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
# all members of a group must be documented explicitly.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
||||
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
||||
|
||||
TAB_SIZE = 8
|
||||
|
||||
# The ENABLE_SECTIONS tag can be used to enable conditional
|
||||
# documentation sections, marked by \if sectionname ... \endif.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
# The GENERATE_TODOLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the todo list. This list is created by putting \todo
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TODOLIST = NO
|
||||
|
||||
# The GENERATE_TESTLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the test list. This list is created by putting \test
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TESTLIST = YES
|
||||
|
||||
# This tag can be used to specify a number of aliases that acts
|
||||
# as commands in the documentation. An alias has the form "name=value".
|
||||
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
|
||||
# put the command \sideeffect (or @sideeffect) in the documentation, which
|
||||
# will result in a user defined paragraph with heading "Side Effects:".
|
||||
# You can put \n's in the value part of an alias to insert newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
QUIET = NO
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||
# NO is used.
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
|
||||
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
|
||||
# automatically be disabled.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that
|
||||
# doxygen can produce. The string should contain the $file, $line, and $text
|
||||
# tags, which will be replaced by the file and line number from which the
|
||||
# warning originated and the warning text.
|
||||
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning
|
||||
# and error messages should be written. If left blank the output is written
|
||||
# to stderr.
|
||||
|
||||
WARN_LOGFILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The INPUT tag can be used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like "myfile.cpp" or
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = src/LinearMath src/BulletCollision src/BulletDynamics src/BulletSoftBody src/btBulletCollisionCommon.h src/btBulletDynamicsCommon.h Extras/Serialize/BulletWorldImporter Extras/Serialize/BulletFileLoader
|
||||
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
FILE_PATTERNS = *.h *.cpp *.c
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
# If left blank NO is used.
|
||||
|
||||
RECURSIVE = YES
|
||||
|
||||
# The EXCLUDE tag can be used to specify files and/or directories that should
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE =
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
# certain files from those directories.
|
||||
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
||||
EXAMPLE_PATH =
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
EXAMPLE_PATTERNS =
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain image that are included in the documentation (see
|
||||
# the \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
||||
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
||||
# input file. Doxygen will then use the output that the filter program writes
|
||||
# to standard output.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will be used to filter the input files when producing source
|
||||
# files to browse.
|
||||
|
||||
FILTER_SOURCE_FILES = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
|
||||
# of all compounds will be generated. Enable this if the project
|
||||
# contains a lot of classes, structs, unions or interfaces.
|
||||
|
||||
ALPHABETICAL_INDEX = NO
|
||||
|
||||
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
# in which this list will be split (can be a number in the range [1..20])
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all
|
||||
# classes will be put under the same header in the alphabetical index.
|
||||
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
|
||||
# should be ignored while generating the index headers.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||
# generate HTML output.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `html' will be used as the default path.
|
||||
|
||||
HTML_OUTPUT = html
|
||||
|
||||
# The HTML_HEADER tag can be used to specify a personal HTML header for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard header.
|
||||
|
||||
HTML_HEADER =
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
# fine-tune the look of the HTML output. If the tag is left blank doxygen
|
||||
# will generate a default style sheet
|
||||
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
# NO a bullet list will be used.
|
||||
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for tools like the
|
||||
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
|
||||
# of the generated HTML documentation.
|
||||
|
||||
GENERATE_HTMLHELP = YES
|
||||
|
||||
# HHC_LOCATION = "C:\Program Files\HTML Help Workshop\hhc.exe"
|
||||
HHC_LOCATION = "C:\Program Files (x86)\HTML Help Workshop\hhc.exe"
|
||||
|
||||
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
#HTML_STYLESHEET = "\\server\exchange\Software Development\Documentation\DoxyGen\doxygen.css"
|
||||
|
||||
CHM_FILE = BulletDocs.chm
|
||||
HHC_LOCATION = "c:\program files\HTML Help Workshop\hhc.exe"
|
||||
GENERATE_CHI = YES
|
||||
BINARY_TOC = YES
|
||||
|
||||
TOC_EXPAND = YES
|
||||
|
||||
SHOW_DIRECTORIES = YES
|
||||
|
||||
|
||||
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
||||
# top of each HTML page. The value NO (the default) enables the index and
|
||||
# the value YES disables it.
|
||||
|
||||
DISABLE_INDEX = NO
|
||||
|
||||
# This tag can be used to set the number of enum values (range [1..20])
|
||||
# that doxygen will group on one line in the generated HTML documentation.
|
||||
|
||||
ENUM_VALUES_PER_LINE = 1
|
||||
|
||||
# If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be
|
||||
# generated containing a tree-like index structure (just like the one that
|
||||
# is generated for HTML Help). For this to work a browser that supports
|
||||
# JavaScript and frames is required (for instance Netscape 4.0+
|
||||
# or Internet explorer 4.0+).
|
||||
|
||||
GENERATE_TREEVIEW = YES
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
||||
# used to set the initial width (in pixels) of the frame in which the tree
|
||||
# is shown.
|
||||
|
||||
TREEVIEW_WIDTH = 250
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `latex' will be used as the default path.
|
||||
|
||||
LATEX_OUTPUT = latex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
|
||||
# LaTeX documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used
|
||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||
# executive. If left blank a4wide will be used.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||
# packages that should be included in the LaTeX output.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
|
||||
# the generated latex document. The header should contain everything until
|
||||
# the first chapter. If it is left blank doxygen will generate a
|
||||
# standard header. Notice: only use this tag if you know what you are doing!
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
|
||||
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
|
||||
# contain links (just like the HTML output) instead of page references
|
||||
# This makes the output suitable for online browsing using a pdf viewer.
|
||||
|
||||
PDF_HYPERLINKS = NO
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
|
||||
# plain latex in the generated Makefile. Set this option to YES to get a
|
||||
# higher quality PDF documentation.
|
||||
|
||||
USE_PDFLATEX = NO
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep
|
||||
# running if errors occur, instead of asking the user for help.
|
||||
# This option is also used when generating formulas in HTML.
|
||||
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
|
||||
# The RTF output is optimised for Word 97 and may not look very pretty with
|
||||
# other RTF readers or editors.
|
||||
|
||||
GENERATE_RTF = NO
|
||||
|
||||
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `rtf' will be used as the default path.
|
||||
|
||||
RTF_OUTPUT = rtf
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
|
||||
# RTF documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_RTF = NO
|
||||
|
||||
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
|
||||
# will contain hyperlink fields. The RTF file will
|
||||
# contain links (just like the HTML output) instead of page references.
|
||||
# This makes the output suitable for online browsing using a WORD or other.
|
||||
# programs which support those fields.
|
||||
# Note: wordpad (write) and others do not support links.
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# config file, i.e. a series of assigments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
|
||||
# generate man pages
|
||||
|
||||
GENERATE_MAN = NO
|
||||
|
||||
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `man' will be used as the default path.
|
||||
|
||||
MAN_OUTPUT = man
|
||||
|
||||
# The MAN_EXTENSION tag determines the extension that is added to
|
||||
# the generated man pages (default is the subroutine's section .3)
|
||||
|
||||
MAN_EXTENSION = .3
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_XML tag is set to YES Doxygen will
|
||||
# generate an XML file that captures the structure of
|
||||
# the code including all documentation. Warning: This feature
|
||||
# is still experimental and very incomplete.
|
||||
|
||||
GENERATE_XML = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
|
||||
# evaluate all C-preprocessor directives found in the sources and include
|
||||
# files.
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
|
||||
# names in the source code. If set to NO (the default) only conditional
|
||||
# compilation will be performed. Macro expansion can be done in a controlled
|
||||
# way by setting EXPAND_ONLY_PREDEF to YES.
|
||||
|
||||
MACRO_EXPANSION = YES
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||
# then the macro expansion is limited to the macros specified with the
|
||||
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
|
||||
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
|
||||
# in the INCLUDE_PATH (see below) will be search if a #include is found.
|
||||
|
||||
SEARCH_INCLUDES = YES
|
||||
|
||||
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||
# contain include files that are not input files but should be processed by
|
||||
# the preprocessor.
|
||||
|
||||
INCLUDE_PATH =
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
# directories. If left blank, the patterns specified with FILE_PATTERNS will
|
||||
# be used.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that
|
||||
# are defined before the preprocessor is started (similar to the -D option of
|
||||
# gcc). The argument of the tag is a list of macros of the form: name
|
||||
# or name=definition (no spaces). If the definition and the = are
|
||||
# omitted =1 is assumed.
|
||||
|
||||
PREDEFINED = "ATTRIBUTE_ALIGNED128(x)=x" \
|
||||
"ATTRIBUTE_ALIGNED16(x)=x" \
|
||||
"SIMD_FORCE_INLINE=inline" \
|
||||
"VECTORMATH_FORCE_INLINE=inline" \
|
||||
"USE_WIN32_THREADING=1"\
|
||||
"USE_PTHREADS=1"\
|
||||
"_WIN32=1"
|
||||
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
|
||||
# this tag can be used to specify a list of macro names that should be expanded.
|
||||
# The macro definition that is found in the sources will be used.
|
||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The TAGFILES tag can be used to specify one or more tagfiles.
|
||||
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||
# a tag file that is based on the input files it reads.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
|
||||
# in the class index. If set to NO only the inherited external classes
|
||||
# will be listed.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of `which perl').
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||
# available from the path. This tool is part of Graphviz, a graph visualization
|
||||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||
# have no effect if this option is set to NO (the default)
|
||||
|
||||
HAVE_DOT = YES
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect inheritance relations. Setting this tag to YES will force the
|
||||
# the CLASS_DIAGRAMS tag to NO.
|
||||
|
||||
CLASS_GRAPH = YES
|
||||
|
||||
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect implementation dependencies (inheritance, containment, and
|
||||
# class references variables) of the class with other documented classes.
|
||||
|
||||
COLLABORATION_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to
|
||||
# YES then doxygen will generate a graph for each documented file showing
|
||||
# the direct and indirect include dependencies of the file with other
|
||||
# documented files.
|
||||
|
||||
INCLUDE_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to
|
||||
# YES then doxygen will generate a graph for each documented header file showing
|
||||
# the documented files that directly or indirectly include this file
|
||||
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
||||
# will graphical hierarchy of all classes instead of a textual one.
|
||||
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
|
||||
# The tag DOT_PATH can be used to specify the path where the dot tool can be
|
||||
# found. If left blank, it is assumed the dot tool can be found on the path.
|
||||
|
||||
DOT_PATH =
|
||||
|
||||
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
|
||||
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
|
||||
# generate a legend page explaining the meaning of the various boxes and
|
||||
# arrows in the dot generated graphs.
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
|
||||
# delete intermediate dot files?
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The SEARCHENGINE tag specifies whether or not a search engine should be
|
||||
# used. If set to NO the values of all tags below this one will be ignored.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
|
||||
# The CGI_NAME tag should be the name of the CGI script that
|
||||
# starts the search engine (doxysearch) with the correct parameters.
|
||||
# A script with this name will be generated by doxygen.
|
||||
|
||||
CGI_NAME = search.cgi
|
||||
|
||||
# The CGI_URL tag should be the absolute URL to the directory where the
|
||||
# cgi binaries are located. See the documentation of your http daemon for
|
||||
# details.
|
||||
|
||||
CGI_URL =
|
||||
|
||||
# The DOC_URL tag should be the absolute URL to the directory where the
|
||||
# documentation is located. If left blank the absolute path to the
|
||||
# documentation, with file:// prepended to it, will be used.
|
||||
|
||||
DOC_URL =
|
||||
|
||||
# The DOC_ABSPATH tag should be the absolute path to the directory where the
|
||||
# documentation is located. If left blank the directory on the local machine
|
||||
# will be used.
|
||||
|
||||
DOC_ABSPATH =
|
||||
|
||||
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
|
||||
# is installed.
|
||||
|
||||
BIN_ABSPATH = c:\program files\doxygen\bin
|
||||
|
||||
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
|
||||
# documentation generated for other projects. This allows doxysearch to search
|
||||
# the documentation for these projects as well.
|
||||
|
||||
EXT_DOC_PATHS =
|
15
thirdparty/bullet/LICENSE.txt
vendored
Normal file
15
thirdparty/bullet/LICENSE.txt
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
The files in this repository are licensed under the zlib license, except for the files under 'Extras' and examples/ThirdPartyLibs.
|
||||
|
||||
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.
|
16
thirdparty/bullet/MANIFEST.in
vendored
Normal file
16
thirdparty/bullet/MANIFEST.in
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
include MANIFEST.in *.txt
|
||||
recursive-include examples *.h
|
||||
recursive-include examples *.hpp
|
||||
recursive-include Extras *.h
|
||||
recursive-include Extras *.hpp
|
||||
recursive-include Extras *.inl
|
||||
recursive-include src *.h
|
||||
recursive-include src *.hpp
|
||||
recursive-include src *.cpp
|
||||
recursive-include examples/pybullet/gym *.*
|
||||
include examples/ThirdPartyLibs/enet/unix.c
|
||||
include examples/OpenGLWindow/*.*
|
||||
recursive-include examples/SharedMemory/plugins *.*
|
||||
recursive-include examples/ThirdPartyLibs/glad *.*
|
||||
include examples/ThirdPartyLibs/enet/win32.c
|
||||
recursive-include examples/ThirdPartyLibs/Eigen *
|
141
thirdparty/bullet/README.md
vendored
Normal file
141
thirdparty/bullet/README.md
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
[![Travis Build Status](https://api.travis-ci.org/bulletphysics/bullet3.png?branch=master)](https://travis-ci.org/bulletphysics/bullet3)
|
||||
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/6sly9uxajr6xsstq)](https://ci.appveyor.com/project/erwincoumans/bullet3)
|
||||
|
||||
# Bullet Physics SDK
|
||||
|
||||
This is the official C++ source code repository of the Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
|
||||
|
||||
![PyBullet](https://pybullet.org/wordpress/wp-content/uploads/2019/03/cropped-pybullet.png)
|
||||
|
||||
## PyBullet ##
|
||||
New in Bullet 2.85: pybullet Python bindings, improved support for robotics and VR. Use pip install pybullet and checkout the [PyBullet Quickstart Guide](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#heading=h.2ye70wns7io3).
|
||||
|
||||
Installation is simple:
|
||||
```
|
||||
pip3 install pybullet --upgrade --user
|
||||
python3 -m pybullet_envs.examples.enjoy_TF_AntBulletEnv_v0_2017may
|
||||
python3 -m pybullet_envs.examples.enjoy_TF_HumanoidFlagrunHarderBulletEnv_v1_2017jul
|
||||
python3 -m pybullet_envs.deep_mimic.testrl --arg_file run_humanoid3d_backflip_args.txt
|
||||
```
|
||||
|
||||
If you use PyBullet in your research, please cite it like this:
|
||||
|
||||
```
|
||||
@MISC{coumans2019,
|
||||
author = {Erwin Coumans and Yunfei Bai},
|
||||
title = {PyBullet, a Python module for physics simulation for games, robotics and machine learning},
|
||||
howpublished = {\url{http://pybullet.org}},
|
||||
year = {2016--2019}
|
||||
}
|
||||
```
|
||||
|
||||
## Requirements for Bullet Physics C++
|
||||
|
||||
A C++ compiler for C++ 2003. The library is tested on Windows, Linux, Mac OSX, iOS, Android,
|
||||
but should likely work on any platform with C++ compiler.
|
||||
Some optional demos require OpenGL 2 or OpenGL 3, there are some non-graphical demos and unit tests too.
|
||||
|
||||
## Contributors and Coding Style information
|
||||
|
||||
https://docs.google.com/document/d/1u9vyzPtrVoVhYqQOGNWUgjRbfwfCdIts_NzmvgiJ144/edit
|
||||
|
||||
## Requirements for experimental OpenCL GPGPU support
|
||||
|
||||
The entire collision detection and rigid body dynamics can be executed on the GPU.
|
||||
|
||||
A high-end desktop GPU, such as an AMD Radeon 7970 or NVIDIA GTX 680 or better.
|
||||
We succesfully tested the software under Windows, Linux and Mac OSX.
|
||||
The software currently doesn't work on OpenCL CPU devices. It might run
|
||||
on a laptop GPU but performance will not likely be very good. Note that
|
||||
often an OpenCL drivers fails to compile a kernel. Some unit tests exist to
|
||||
track down the issue, but more work is required to cover all OpenCL kernels.
|
||||
|
||||
## License
|
||||
|
||||
All source code files are licensed under the permissive zlib license
|
||||
(http://opensource.org/licenses/Zlib) unless marked differently in a particular folder/file.
|
||||
|
||||
## Build instructions for Bullet using vcpkg
|
||||
|
||||
You can download and install Bullet using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
|
||||
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
./vcpkg integrate install
|
||||
vcpkg install bullet3
|
||||
|
||||
The Bullet port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||
|
||||
## Build instructions for Bullet using premake. You can also use cmake instead.
|
||||
|
||||
**Windows**
|
||||
|
||||
Click on build_visual_studio_vr_pybullet_double.bat and open build3/vs2010/0_Bullet3Solution.sln
|
||||
When asked, convert the projects to a newer version of Visual Studio.
|
||||
If you installed Python in the C:\ root directory, the batch file should find it automatically.
|
||||
Otherwise, edit this batch file to choose where Python include/lib directories are located.
|
||||
|
||||
**Windows Virtual Reality sandbox for HTC Vive and Oculus Rift**
|
||||
|
||||
Build and run the App_SharedMemoryPhysics_VR project, preferably in Release/optimized build.
|
||||
You can connect from Python pybullet to the sandbox using:
|
||||
|
||||
```
|
||||
import pybullet as p
|
||||
p.connect(p.SHARED_MEMORY) #or (p.TCP, "localhost", 6667) or (p.UDP, "192.168.86.10",1234)
|
||||
```
|
||||
|
||||
**Linux and Mac OSX gnu make**
|
||||
|
||||
Make sure cmake is installed (sudo apt-get install cmake, brew install cmake, or https://cmake.org)
|
||||
|
||||
In a terminal type:
|
||||
|
||||
./build_cmake_pybullet_double.sh
|
||||
|
||||
This script will invoke cmake and build in the build_cmake directory. You can find pybullet in Bullet/examples/pybullet.
|
||||
The BulletExampleBrowser binary will be in Bullet/examples/ExampleBrowser.
|
||||
|
||||
You can also build Bullet using premake. There are premake executables in the build3 folder.
|
||||
Depending on your system (Linux 32bit, 64bit or Mac OSX) use one of the following lines
|
||||
Using premake:
|
||||
```
|
||||
cd build3
|
||||
./premake4_linux --double gmake
|
||||
./premake4_linux64 --double gmake
|
||||
./premake4_osx --double --enable_pybullet gmake
|
||||
```
|
||||
Then
|
||||
```
|
||||
cd gmake
|
||||
make
|
||||
```
|
||||
|
||||
Note that on Linux, you need to use cmake to build pybullet, since the compiler has issues of mixing shared and static libraries.
|
||||
|
||||
**Mac OSX Xcode**
|
||||
|
||||
Click on build3/xcode4.command or in a terminal window execute
|
||||
|
||||
./premake_osx xcode4
|
||||
|
||||
## Usage
|
||||
|
||||
The App_ExampleBrowser executables will be located in the bin folder.
|
||||
You can just run it though a terminal/command prompt, or by clicking it.
|
||||
|
||||
|
||||
```
|
||||
[--start_demo_name="Demo Name"] Start with a selected demo
|
||||
[--mp4=moviename.mp4] Create a mp4 movie of the window, requires ffmpeg installed
|
||||
[--mouse_move_multiplier=0.400000] Set the mouse move sensitivity
|
||||
[--mouse_wheel_multiplier=0.01] Set the mouse wheel sensitivity
|
||||
[--background_color_red= 0.9] Set the red component for background color. Same for green and blue
|
||||
[--fixed_timestep= 0.0] Use either a real-time delta time (0.0) or a fixed step size (0.016666)
|
||||
```
|
||||
|
||||
You can use mouse picking to grab objects. When holding the ALT or CONTROL key, you have Maya style camera mouse controls.
|
||||
Press F1 to create a series of screenshots. Hit ESCAPE to exit the demo app.
|
||||
|
||||
Check out the docs folder and the Bullet physics forums for further information.
|
10
thirdparty/bullet/UseBullet.cmake
vendored
Normal file
10
thirdparty/bullet/UseBullet.cmake
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
# -*- cmake -*-
|
||||
#
|
||||
# UseBullet.cmake
|
||||
#
|
||||
|
||||
|
||||
add_definitions ( ${BULLET_DEFINITIONS} )
|
||||
include_directories ( ${BULLET_INCLUDE_DIRS} )
|
||||
link_directories ( ${BULLET_LIBRARY_DIRS} )
|
||||
|
1
thirdparty/bullet/VERSION
vendored
Normal file
1
thirdparty/bullet/VERSION
vendored
Normal file
@ -0,0 +1 @@
|
||||
3.08
|
91
thirdparty/bullet/_clang-format
vendored
Normal file
91
thirdparty/bullet/_clang-format
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: Google
|
||||
AccessModifierOffset: -1
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Allman
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 0
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: true
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
IncludeCategories:
|
||||
- Regex: '^<.*\.h>'
|
||||
Priority: 1
|
||||
- Regex: '^<.*'
|
||||
Priority: 2
|
||||
- Regex: '.*'
|
||||
Priority: 3
|
||||
IndentCaseLabels: true
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: false
|
||||
PenaltyBreakBeforeFirstCallParameter: 1
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 200
|
||||
PointerAlignment: Left
|
||||
ReflowComments: false
|
||||
SortIncludes: false
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
AccessModifierOffset: -4
|
||||
Standard: Auto
|
||||
TabWidth: 4
|
||||
UseTab: ForContinuationAndIndentation
|
||||
...
|
||||
|
19
thirdparty/bullet/appveyor.yml
vendored
Normal file
19
thirdparty/bullet/appveyor.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
build:
|
||||
project: build3/vs2010/0_Bullet3Solution.sln
|
||||
|
||||
build_script:
|
||||
- mkdir cm
|
||||
- cd cm
|
||||
- cmake .. -G"Visual Studio 14 2015 Win64"
|
||||
- cmake --build . --target ALL_BUILD --config Release -- /maxcpucount:4 /verbosity:quiet
|
||||
|
||||
test_script:
|
||||
- ctest --parallel 4 --build-config Release --output-on-failure
|
||||
|
||||
before_build:
|
||||
- echo %CD%
|
||||
- ps: cd build3
|
||||
- echo %CD%
|
||||
- premake4 vs2010
|
||||
- ps: cd ..
|
||||
|
49
thirdparty/bullet/build3/Android/jni/Android.mk
vendored
Normal file
49
thirdparty/bullet/build3/Android/jni/Android.mk
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
LOCAL_PATH := ../../..
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -DUSE_PTHREADS -mfpu=neon -mfloat-abi=softfp -pthread -DSCE_PFX_USE_SIMD_VECTORMATH
|
||||
|
||||
# apply these flags if needed
|
||||
# -ffast-math -funsafe-math-optimizations
|
||||
|
||||
# apply this to disable optimization
|
||||
# TARGET_CFLAGS := $(TARGET_CFLAGS) -O0
|
||||
|
||||
# apply these 2 to turn on assembly output (*.c/*.cpp to *.s file)
|
||||
#compile-cpp-source = $(eval $(call ev-compile-cpp-source,$1,$(1:%$(LOCAL_CPP_EXTENSION)=%.s)))
|
||||
#TARGET_CFLAGS := $(TARGET_CFLAGS) -S
|
||||
|
||||
# Enable or disable NEON. Don't forget to apply, or not apply, -mfpu=neon and -mfloat-abi=softfp
|
||||
# flags in addition, e.g., if this is true both of those need to be included in LOCAL_CFLAGS
|
||||
# to avoid the possibility that ndk-build will "forget" to add them on some files
|
||||
LOCAL_ARM_NEON := true
|
||||
|
||||
TARGET_CFLAGS := $(filter-out -ffpu=vfp,$(TARGET_CFLAGS))
|
||||
|
||||
# setup to build static library
|
||||
LOCAL_MODULE := libBullet
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/src
|
||||
|
||||
#find all the file recursively under jni/
|
||||
FILE_LIST := $(wildcard \
|
||||
$(LOCAL_PATH)/src/LinearMath/*.cpp \
|
||||
$(LOCAL_PATH)/src/Bullet3Common/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletCollision/BroadphaseCollision/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletCollision/CollisionDispatch/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletCollision/CollisionShapes/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletCollision/NarrowPhaseCollision/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletDynamics/ConstraintSolver/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletDynamics/Dynamics/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletDynamics/Featherstone/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletDynamics/MLCPSolvers/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletDynamics/Vehicle/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletDynamics/Character/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletSoftBody/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletInverseDynamics/*.cpp \
|
||||
$(LOCAL_PATH)/src/BulletInverseDynamics/details/*.cpp \
|
||||
)
|
||||
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
7
thirdparty/bullet/build3/Android/jni/Application.mk
vendored
Normal file
7
thirdparty/bullet/build3/Android/jni/Application.mk
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
APP_MODULES := libBullet
|
||||
APP_ABI := armeabi-v7a
|
||||
APP_OPTIM := release
|
||||
|
||||
#We only need STL for placement new (#include <new>)
|
||||
#We don't use STL in Bullet
|
||||
APP_STL := stlport_static
|
7
thirdparty/bullet/build3/bin2cpp.bat
vendored
Normal file
7
thirdparty/bullet/build3/bin2cpp.bat
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
rem @echo off
|
||||
|
||||
|
||||
premake4 --file=bin2cpp.lua --binfile="../btgui/OpenGLWindow/OpenSans.ttf" --cppfile="../btgui/OpenGLWindow/OpenSans.cpp" --stringname="OpenSansData" bin2cpp
|
||||
|
||||
pause
|
48
thirdparty/bullet/build3/bin2cpp.lua
vendored
Normal file
48
thirdparty/bullet/build3/bin2cpp.lua
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
function convertFile(filenameIn, filenameOut, stringname)
|
||||
print("\nfilenameOut = " .. filenameOut)
|
||||
local f = assert(io.open(filenameIn, "rb"))
|
||||
|
||||
local fw = io.open(filenameOut,"w")
|
||||
fw:write(string.format("char %s[]={", stringname))
|
||||
local block = 10
|
||||
while true do
|
||||
local bytes = f:read(block)
|
||||
if not bytes then break end
|
||||
for b in string.gfind(bytes, ".") do
|
||||
fw:write(string.format("%u,", string.byte(b)))
|
||||
end
|
||||
--io.write(string.rep(" ", block - string.len(bytes) + 1))
|
||||
--io.write(string.gsub(bytes, "%c", "."), "\n")
|
||||
fw:write(string.format("\n"))
|
||||
end
|
||||
fw:write(string.format("\n};"))
|
||||
|
||||
end
|
||||
|
||||
|
||||
newoption {
|
||||
trigger = "binfile",
|
||||
value = "binpath",
|
||||
description = "full path to the binary input file"
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "cppfile",
|
||||
value = "path",
|
||||
description = "full path to the cpp output file"
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "stringname",
|
||||
value = "var",
|
||||
description = "name of the variable name in the cppfile that contains the binary data"
|
||||
}
|
||||
|
||||
newaction {
|
||||
trigger = "bin2cpp",
|
||||
description = "convert binary file into cpp source",
|
||||
execute = function ()
|
||||
convertFile( _OPTIONS["binfile"] , _OPTIONS["cppfile"], _OPTIONS["stringname"])
|
||||
|
||||
end
|
||||
}
|
17
thirdparty/bullet/build3/bullet.rc
vendored
Normal file
17
thirdparty/bullet/build3/bullet.rc
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
// This file is generated automatically.
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEFLAGS 0x0
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "040904E4"
|
||||
{
|
||||
VALUE "ProductName", "Bullet Physics Library"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2005-2014 Erwin Coumans"
|
||||
VALUE "Comments", "Test build"
|
||||
VALUE "WWW", "http://www.bulletphysics.org"
|
||||
}
|
||||
}
|
||||
}
|
||||
1 ICON "bullet_ico.ico"
|
BIN
thirdparty/bullet/build3/bullet_ico.ico
vendored
Normal file
BIN
thirdparty/bullet/build3/bullet_ico.ico
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
25
thirdparty/bullet/build3/cmake/FindLibPython.py
vendored
Normal file
25
thirdparty/bullet/build3/cmake/FindLibPython.py
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# Note by Nikolaus Demmel 28.03.2014: My contributions are licensend under the
|
||||
# same as CMake (BSD). My adaptations are in part based
|
||||
# https://github.com/qgis/QGIS/tree/master/cmake which has the following
|
||||
# copyright note:
|
||||
|
||||
# FindLibPython.py
|
||||
# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
import sys
|
||||
import distutils.sysconfig
|
||||
|
||||
print("exec_prefix:%s" % sys.exec_prefix)
|
||||
print("major_version:%s" % str(sys.version_info[0]))
|
||||
print("minor_version:%s" % str(sys.version_info[1]))
|
||||
print("patch_version:%s" % str(sys.version_info[2]))
|
||||
print("short_version:%s" % '.'.join(map(lambda x: str(x), sys.version_info[0:2])))
|
||||
print("long_version:%s" % '.'.join(map(lambda x: str(x), sys.version_info[0:3])))
|
||||
print("py_inc_dir:%s" % distutils.sysconfig.get_python_inc())
|
||||
print("site_packages_dir:%s" % distutils.sysconfig.get_python_lib(plat_specific=1))
|
||||
for e in distutils.sysconfig.get_config_vars('LIBDIR'):
|
||||
if e != None:
|
||||
print("py_lib_dir:%s" % e)
|
||||
break
|
59
thirdparty/bullet/build3/cmake/FindNumPy.cmake
vendored
Normal file
59
thirdparty/bullet/build3/cmake/FindNumPy.cmake
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
# - Find the NumPy libraries
|
||||
# This module finds if NumPy is installed, and sets the following variables
|
||||
# indicating where it is.
|
||||
#
|
||||
# TODO: Update to provide the libraries and paths for linking npymath lib.
|
||||
#
|
||||
# PYTHON_NUMPY_FOUND - was NumPy found
|
||||
# PYTHON_NUMPY_VERSION - the version of NumPy found as a string
|
||||
# PYTHON_NUMPY_VERSION_MAJOR - the major version number of NumPy
|
||||
# PYTHON_NUMPY_VERSION_MINOR - the minor version number of NumPy
|
||||
# PYTHON_NUMPY_VERSION_PATCH - the patch version number of NumPy
|
||||
# PYTHON_NUMPY_VERSION_DECIMAL - e.g. version 1.6.1 is 10601
|
||||
# PYTHON_NUMPY_INCLUDE_DIR - path to the NumPy include files
|
||||
|
||||
unset(PYTHON_NUMPY_VERSION)
|
||||
unset(PYTHON_NUMPY_INCLUDE_DIR)
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
|
||||
"import numpy as n; print(n.__version__); print(n.get_include());"
|
||||
RESULT_VARIABLE __result
|
||||
OUTPUT_VARIABLE __output
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(__result MATCHES 0)
|
||||
string(REGEX REPLACE ";" "\\\\;" __values ${__output})
|
||||
string(REGEX REPLACE "\r?\n" ";" __values ${__values})
|
||||
list(GET __values 0 PYTHON_NUMPY_VERSION)
|
||||
list(GET __values 1 PYTHON_NUMPY_INCLUDE_DIR)
|
||||
|
||||
string(REGEX MATCH "^([0-9])+\\.([0-9])+\\.([0-9])+" __ver_check "${PYTHON_NUMPY_VERSION}")
|
||||
if(NOT "${__ver_check}" STREQUAL "")
|
||||
set(PYTHON_NUMPY_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
set(PYTHON_NUMPY_VERSION_MINOR ${CMAKE_MATCH_2})
|
||||
set(PYTHON_NUMPY_VERSION_PATCH ${CMAKE_MATCH_3})
|
||||
math(EXPR PYTHON_NUMPY_VERSION_DECIMAL
|
||||
"(${PYTHON_NUMPY_VERSION_MAJOR} * 10000) + (${PYTHON_NUMPY_VERSION_MINOR} * 100) + ${PYTHON_NUMPY_VERSION_PATCH}")
|
||||
string(REGEX REPLACE "\\\\" "/" PYTHON_NUMPY_INCLUDE_DIR ${PYTHON_NUMPY_INCLUDE_DIR})
|
||||
else()
|
||||
unset(PYTHON_NUMPY_VERSION)
|
||||
unset(PYTHON_NUMPY_INCLUDE_DIR)
|
||||
message(STATUS "Requested NumPy version and include path, but got instead:\n${__output}\n")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "To find NumPy Python interpretor is required to be found.")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(NumPy REQUIRED_VARS PYTHON_NUMPY_INCLUDE_DIR PYTHON_NUMPY_VERSION
|
||||
VERSION_VAR PYTHON_NUMPY_VERSION)
|
||||
|
||||
if(NUMPY_FOUND)
|
||||
set(PYTHON_NUMPY_FOUND TRUE)
|
||||
message(STATUS "NumPy ver. ${PYTHON_NUMPY_VERSION} found (include: ${PYTHON_NUMPY_INCLUDE_DIR})")
|
||||
endif()
|
||||
|
||||
# caffe_clear_vars(__result __output __error_value __values __ver_check __error_value)
|
||||
|
358
thirdparty/bullet/build3/cmake/FindPythonLibs.cmake
vendored
Normal file
358
thirdparty/bullet/build3/cmake/FindPythonLibs.cmake
vendored
Normal file
@ -0,0 +1,358 @@
|
||||
# - Find python libraries
|
||||
# This module finds if Python is installed and determines where the
|
||||
# include files and libraries are. It also determines what the name of
|
||||
# the library is. This code sets the following variables:
|
||||
#
|
||||
# PYTHONLIBS_FOUND - have the Python libs been found
|
||||
# PYTHON_LIBRARIES - path to the python library
|
||||
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
|
||||
# PYTHON_INCLUDE_DIRS - path to where Python.h is found
|
||||
# PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated)
|
||||
# PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8)
|
||||
#
|
||||
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
|
||||
# version numbers that should be taken into account when searching for Python.
|
||||
# You need to set this variable before calling find_package(PythonLibs).
|
||||
#
|
||||
# If you'd like to specify the installation of Python to use, you should modify
|
||||
# the following cache variables:
|
||||
# PYTHON_LIBRARY - path to the python library
|
||||
# PYTHON_INCLUDE_DIR - path to where Python.h is found
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2001-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Note by Nikolaus Demmel 28.03.2014: My contributions are licensend under the
|
||||
# same as CMake (BSD). My adaptations are in part based
|
||||
# https://github.com/qgis/QGIS/tree/master/cmake which has the following
|
||||
# copyright note:
|
||||
|
||||
# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
if(NOT DEFINED PYTHON_INCLUDE_DIR)
|
||||
if(DEFINED PYTHON_INCLUDE_PATH)
|
||||
# For backward compatibility, repect PYTHON_INCLUDE_PATH.
|
||||
set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
|
||||
"Path to where Python.h is found" FORCE)
|
||||
else()
|
||||
set(PYTHON_INCLUDE_DIR "" CACHE PATH
|
||||
"Path to where Python.h is found" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EXISTS "${PYTHON_INCLUDE_DIR}" AND EXISTS "${PYTHON_LIBRARY}")
|
||||
if(EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
|
||||
file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" _PYTHON_VERSION_STR
|
||||
REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
|
||||
string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
|
||||
PYTHONLIBS_VERSION_STRING "${_PYTHON_VERSION_STR}")
|
||||
unset(_PYTHON_VERSION_STR)
|
||||
endif()
|
||||
else()
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
|
||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||
if(PythonLibs_FIND_VERSION)
|
||||
if(PythonLibs_FIND_VERSION_COUNT GREATER 1)
|
||||
set(_PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION_MAJOR}.${PythonLibs_FIND_VERSION_MINOR}")
|
||||
if(NOT PythonLibs_FIND_VERSION_EXACT)
|
||||
foreach(_PYTHON_V ${_PYTHON${PythonLibs_FIND_VERSION_MAJOR}_VERSIONS})
|
||||
if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
|
||||
if(NOT _PYTHON_V STREQUAL PythonLibs_FIND_VERSION)
|
||||
list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
unset(_PYTHON_FIND_MAJ_MIN)
|
||||
else()
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION_MAJOR}_VERSIONS})
|
||||
endif()
|
||||
else()
|
||||
# add an empty version to check the `python` executable first in case no version is requested
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
|
||||
endif()
|
||||
|
||||
unset(_PYTHON1_VERSIONS)
|
||||
unset(_PYTHON2_VERSIONS)
|
||||
unset(_PYTHON3_VERSIONS)
|
||||
|
||||
# Set up the versions we know about, in the order we will search. Always add
|
||||
# the user supplied additional versions to the front.
|
||||
# If FindPythonInterp has already found the major and minor version,
|
||||
# insert that version between the user supplied versions and the stock
|
||||
# version list.
|
||||
# If no specific version is requested or suggested by PythonInterp, always look
|
||||
# for "python" executable first
|
||||
set(_PYTHON_VERSIONS ${PythonLibs_FIND_VERSION} ${PythonLibs_ADDITIONAL_VERSIONS} )
|
||||
if(DEFINED PYTHON_VERSION_MAJOR AND DEFINED PYTHON_VERSION_MINOR)
|
||||
list(APPEND _PYTHON_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
endif()
|
||||
if (NOT _PYTHON_VERSIONS)
|
||||
set(_PYTHON_VERSIONS ";") # empty entry at the front makeing sure we search for "python" first
|
||||
endif()
|
||||
list(APPEND _PYTHON_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS})
|
||||
|
||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||
|
||||
message(STATUS "Looking for versions: ${_PYTHON_VERSIONS}")
|
||||
|
||||
FIND_FILE(_FIND_LIB_PYTHON_PY FindLibPython.py PATHS ${CMAKE_MODULE_PATH} ${CMAKE_ROOT}/Modules)
|
||||
|
||||
if(NOT _FIND_LIB_PYTHON_PY)
|
||||
message(FATAL_ERROR "Could not find required file 'FindLibPython.py'")
|
||||
endif()
|
||||
|
||||
unset(PYTHONLIBS_VERSION_STRING)
|
||||
foreach(_CURRENT_VERSION IN LISTS _PYTHON_VERSIONS)
|
||||
|
||||
STRING(REGEX REPLACE "^([0-9]+).*$" "\\1" _VERSION_MAJOR "${_CURRENT_VERSION}")
|
||||
STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*$" "\\1" _VERSION_MINOR "${_CURRENT_VERSION}")
|
||||
|
||||
set(_PYTHON_NAMES ${PYTHON_EXECUTABLE} python)
|
||||
|
||||
if (_CURRENT_VERSION MATCHES "^[0-9]+.*$")
|
||||
list(APPEND _PYTHON_NAMES "python${_VERSION_MAJOR}")
|
||||
if (_CURRENT_VERSION MATCHES "^[0-9]+\\.[0-9].*$")
|
||||
list(APPEND _PYTHON_NAMES "python${_VERSION_MAJOR}.${_VERSION_MINOR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Looking for python version '${_CURRENT_VERSION}' by checking executables: ${_PYTHON_NAMES}.")
|
||||
|
||||
foreach(_CURRENT_PYTHON_NAME IN LISTS _PYTHON_NAMES)
|
||||
|
||||
unset(_PYTHON_EXECUTABLE CACHE)
|
||||
find_program(_PYTHON_EXECUTABLE ${_CURRENT_PYTHON_NAME}
|
||||
PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath])
|
||||
|
||||
if(_PYTHON_EXECUTABLE)
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND "${_PYTHON_EXECUTABLE}" "${_FIND_LIB_PYTHON_PY}"
|
||||
OUTPUT_VARIABLE _PYTHON_CONFIG
|
||||
RESULT_VARIABLE _PYTHON_CONFIG_RESULT
|
||||
ERROR_QUIET)
|
||||
|
||||
if(NOT ${_PYTHON_CONFIG_RESULT} AND (NOT ${_PYTHON_CONFIG} STREQUAL ""))
|
||||
STRING(REGEX REPLACE ".*\nmajor_version:([0-9]+).*$" "\\1" _PYTHON_MAJOR_VERSION ${_PYTHON_CONFIG})
|
||||
STRING(REGEX REPLACE ".*\nminor_version:([0-9]+).*$" "\\1" _PYTHON_MINOR_VERSION ${_PYTHON_CONFIG})
|
||||
STRING(REGEX REPLACE ".*\npatch_version:([0-9]+).*$" "\\1" _PYTHON_PATCH_VERSION ${_PYTHON_CONFIG})
|
||||
STRING(REGEX REPLACE ".*\nshort_version:([^\n]+).*$" "\\1" _PYTHON_SHORT_VERSION ${_PYTHON_CONFIG})
|
||||
STRING(REGEX REPLACE ".*\nlong_version:([^\n]+).*$" "\\1" _PYTHON_LONG_VERSION ${_PYTHON_CONFIG})
|
||||
STRING(REGEX REPLACE ".*\npy_inc_dir:([^\n]+).*$" "\\1" _PYTHON_INCLUDE_DIR ${_PYTHON_CONFIG})
|
||||
STRING(REGEX REPLACE ".*\npy_lib_dir:([^\n]+).*$" "\\1" _PYTHON_LIBRARY_DIR ${_PYTHON_CONFIG})
|
||||
STRING(REGEX REPLACE ".*\nexec_prefix:(^\n+).*$" "\\1" _PYTHON_PREFIX ${_PYTHON_CONFIG})
|
||||
|
||||
if ("${_CURRENT_VERSION}" STREQUAL "" OR
|
||||
"${_CURRENT_VERSION}" STREQUAL "${_PYTHON_MAJOR_VERSION}" OR
|
||||
"${_CURRENT_VERSION}" STREQUAL "${_PYTHON_SHORT_VERSION}" OR
|
||||
"${_CURRENT_VERSION}" STREQUAL "${_PYTHON_LONG_VERSION}")
|
||||
|
||||
message(STATUS "Found executable ${_PYTHON_EXECUTABLE} with suitable version ${_PYTHON_LONG_VERSION}")
|
||||
|
||||
if(NOT EXISTS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_INCLUDE_DIR "${_PYTHON_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${PYTHON_LIBRARY}")
|
||||
set(_PYTHON_SHORT_VERSION_NO_DOT "${_PYTHON_MAJOR_VERSION}${_PYTHON_MINOR_VERSION}")
|
||||
set(_PYTHON_LIBRARY_NAMES python${_PYTHON_SHORT_VERSION} python${_PYTHON_SHORT_VERSION_NO_DOT} python${_PYTHON_SHORT_VERSION}m python${_PYTHON_SHORT_VERSION_NO_DOT}m)
|
||||
FIND_LIBRARY(PYTHON_LIBRARY
|
||||
NAMES ${_PYTHON_LIBRARY_NAMES}
|
||||
PATH_SUFFIXES
|
||||
"python${_PYTHON_SHORT_VERSION}/config"
|
||||
"python${_PYTHON_SHORT_VERSION_NO_DOT}/config"
|
||||
PATHS
|
||||
${_PYTHON_LIBRARY_DIR}
|
||||
${_PYTHON_PREFIX}/lib
|
||||
${_PYTHON_PREFIX}/libs
|
||||
${_PYTHON_LIBRARY_DIR}/x86_64-linux-gnu/
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if(WIN32)
|
||||
find_library(PYTHON_DEBUG_LIBRARY
|
||||
NAMES python${_PYTHON_SHORT_VERSION_NO_DOT}_d python
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PYTHONLIBS_VERSION_STRING ${_PYTHON_LONG_VERSION})
|
||||
if(_PYTHON_PATCH_VERSION STREQUAL "0")
|
||||
# it's called "Python 2.7", not "2.7.0"
|
||||
string(REGEX REPLACE "\\.0$" "" PYTHONLIBS_VERSION_STRING "${PYTHONLIBS_VERSION_STRING}")
|
||||
endif()
|
||||
|
||||
break()
|
||||
else()
|
||||
message(STATUS "Found executable ${_PYTHON_EXECUTABLE} with UNsuitable version ${_PYTHON_LONG_VERSION}")
|
||||
endif() # version ok
|
||||
else()
|
||||
message(WARNING "Found executable ${_PYTHON_EXECUTABLE}, but could not extract version info.")
|
||||
endif() # could extract config
|
||||
endif() # found executable
|
||||
endforeach() # python names
|
||||
if (PYTHONLIBS_VERSION_STRING)
|
||||
break()
|
||||
endif()
|
||||
endforeach() # python versions
|
||||
endif()
|
||||
|
||||
unset(_PYTHON_NAMES)
|
||||
unset(_PYTHON_VERSIONS)
|
||||
unset(_PYTHON_EXECUTABLE CACHE)
|
||||
unset(_PYTHON_MAJOR_VERSION)
|
||||
unset(_PYTHON_MINOR_VERSION)
|
||||
unset(_PYTHON_PATCH_VERSION)
|
||||
unset(_PYTHON_SHORT_VERSION)
|
||||
unset(_PYTHON_LONG_VERSION)
|
||||
unset(_PYTHON_LIBRARY_DIR)
|
||||
unset(_PYTHON_INCLUDE_DIR)
|
||||
unset(_PYTHON_PREFIX)
|
||||
unset(_PYTHON_SHORT_VERSION_NO_DOT)
|
||||
unset(_PYTHON_LIBRARY_NAMES)
|
||||
|
||||
|
||||
# For backward compatibility, set PYTHON_INCLUDE_PATH.
|
||||
set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
|
||||
|
||||
mark_as_advanced(
|
||||
PYTHON_DEBUG_LIBRARY
|
||||
PYTHON_LIBRARY
|
||||
PYTHON_INCLUDE_DIR
|
||||
)
|
||||
|
||||
# We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
|
||||
# cache entries because they are meant to specify the location of a single
|
||||
# library. We now set the variables listed by the documentation for this
|
||||
# module.
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
|
||||
|
||||
# These variables have been historically named in this module different from
|
||||
# what SELECT_LIBRARY_CONFIGURATIONS() expects.
|
||||
set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
|
||||
set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||
SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
|
||||
|
||||
if(PYTHON_LIBRARY AND NOT PYTHON_LIBRARIES)
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
endif()
|
||||
# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library.
|
||||
# Unset this, this prefix doesn't match the module prefix, they are different
|
||||
# for historical reasons.
|
||||
unset(PYTHON_FOUND)
|
||||
|
||||
# include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs
|
||||
REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS
|
||||
VERSION_VAR PYTHONLIBS_VERSION_STRING)
|
||||
|
||||
# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
|
||||
# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
|
||||
# in your sources to initialize the static python modules
|
||||
function(PYTHON_ADD_MODULE _NAME )
|
||||
get_property(_TARGET_SUPPORTS_SHARED_LIBS
|
||||
GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
|
||||
option(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
|
||||
option(PYTHON_MODULE_${_NAME}_BUILD_SHARED
|
||||
"Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})
|
||||
|
||||
# Mark these options as advanced
|
||||
mark_as_advanced(PYTHON_ENABLE_MODULE_${_NAME}
|
||||
PYTHON_MODULE_${_NAME}_BUILD_SHARED)
|
||||
|
||||
if(PYTHON_ENABLE_MODULE_${_NAME})
|
||||
if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
|
||||
set(PY_MODULE_TYPE MODULE)
|
||||
else()
|
||||
set(PY_MODULE_TYPE STATIC)
|
||||
set_property(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME})
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME})
|
||||
add_library(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
|
||||
# target_link_libraries(${_NAME} ${PYTHON_LIBRARIES})
|
||||
|
||||
if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
|
||||
set_target_properties(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
|
||||
if(WIN32 AND NOT CYGWIN)
|
||||
set_target_properties(${_NAME} PROPERTIES SUFFIX ".pyd")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(PYTHON_WRITE_MODULES_HEADER _filename)
|
||||
|
||||
get_property(PY_STATIC_MODULES_LIST GLOBAL PROPERTY PY_STATIC_MODULES_LIST)
|
||||
|
||||
get_filename_component(_name "${_filename}" NAME)
|
||||
string(REPLACE "." "_" _name "${_name}")
|
||||
string(TOUPPER ${_name} _nameUpper)
|
||||
set(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
|
||||
|
||||
set(_filenameTmp "${_filename}.in")
|
||||
file(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
|
||||
file(APPEND ${_filenameTmp}
|
||||
"#ifndef ${_nameUpper}
|
||||
#define ${_nameUpper}
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern \"C\" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
")
|
||||
|
||||
foreach(_currentModule ${PY_STATIC_MODULES_LIST})
|
||||
file(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n")
|
||||
endforeach()
|
||||
|
||||
file(APPEND ${_filenameTmp}
|
||||
"#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
")
|
||||
|
||||
|
||||
foreach(_currentModule ${PY_STATIC_MODULES_LIST})
|
||||
file(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
|
||||
endforeach()
|
||||
|
||||
file(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n")
|
||||
foreach(_currentModule ${PY_STATIC_MODULES_LIST})
|
||||
file(APPEND ${_filenameTmp} " ${_name}_${_currentModule}();\n")
|
||||
endforeach()
|
||||
file(APPEND ${_filenameTmp} "}\n\n")
|
||||
file(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")
|
||||
|
||||
# with configure_file() cmake complains that you may not use a file created using file(WRITE) as input file for configure_file()
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET)
|
||||
|
||||
endfunction()
|
70
thirdparty/bullet/build3/cmake/SelectLibraryConfigurations.cmake
vendored
Normal file
70
thirdparty/bullet/build3/cmake/SelectLibraryConfigurations.cmake
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# SelectLibraryConfigurations
|
||||
# ---------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
# select_library_configurations( basename )
|
||||
#
|
||||
# This macro takes a library base name as an argument, and will choose
|
||||
# good values for basename_LIBRARY, basename_LIBRARIES,
|
||||
# basename_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE depending on what
|
||||
# has been found and set. If only basename_LIBRARY_RELEASE is defined,
|
||||
# basename_LIBRARY will be set to the release value, and
|
||||
# basename_LIBRARY_DEBUG will be set to basename_LIBRARY_DEBUG-NOTFOUND.
|
||||
# If only basename_LIBRARY_DEBUG is defined, then basename_LIBRARY will
|
||||
# take the debug value, and basename_LIBRARY_RELEASE will be set to
|
||||
# basename_LIBRARY_RELEASE-NOTFOUND.
|
||||
#
|
||||
# If the generator supports configuration types, then basename_LIBRARY
|
||||
# and basename_LIBRARIES will be set with debug and optimized flags
|
||||
# specifying the library to be used for the given configuration. If no
|
||||
# build type has been set or the generator in use does not support
|
||||
# configuration types, then basename_LIBRARY and basename_LIBRARIES will
|
||||
# take only the release value, or the debug value if the release one is
|
||||
# not set.
|
||||
|
||||
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
|
||||
# Dicharry <wdicharry@stellarscience.com>.
|
||||
|
||||
macro( select_library_configurations basename )
|
||||
if(NOT ${basename}_LIBRARY_RELEASE)
|
||||
set(${basename}_LIBRARY_RELEASE "${basename}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.")
|
||||
endif()
|
||||
if(NOT ${basename}_LIBRARY_DEBUG)
|
||||
set(${basename}_LIBRARY_DEBUG "${basename}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.")
|
||||
endif()
|
||||
|
||||
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
|
||||
NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE AND
|
||||
( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) )
|
||||
# if the generator supports configuration types or CMAKE_BUILD_TYPE
|
||||
# is set, then set optimized and debug options.
|
||||
set( ${basename}_LIBRARY "" )
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE )
|
||||
list( APPEND ${basename}_LIBRARY optimized "${_libname}" )
|
||||
endforeach()
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG )
|
||||
list( APPEND ${basename}_LIBRARY debug "${_libname}" )
|
||||
endforeach()
|
||||
elseif( ${basename}_LIBRARY_RELEASE )
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
|
||||
elseif( ${basename}_LIBRARY_DEBUG )
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG} )
|
||||
else()
|
||||
set( ${basename}_LIBRARY "${basename}_LIBRARY-NOTFOUND")
|
||||
endif()
|
||||
|
||||
set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" )
|
||||
|
||||
if( ${basename}_LIBRARY )
|
||||
set( ${basename}_FOUND TRUE )
|
||||
endif()
|
||||
|
||||
mark_as_advanced( ${basename}_LIBRARY_RELEASE
|
||||
${basename}_LIBRARY_DEBUG
|
||||
)
|
||||
endmacro()
|
36
thirdparty/bullet/build3/findDirectX11.lua
vendored
Normal file
36
thirdparty/bullet/build3/findDirectX11.lua
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
function findDirectX11()
|
||||
local dx11path = os.getenv("DXSDK_DIR")
|
||||
if (dx11path) then
|
||||
local filepath = string.format("%s%s",dx11path,"Include/D3D11.h")
|
||||
headerdx11 = io.open(filepath, "r")
|
||||
if (headerdx11) then
|
||||
printf("Found DX11: '%s'", filepath)
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function initDirectX11()
|
||||
configuration {}
|
||||
|
||||
local dx11path = os.getenv("DXSDK_DIR")
|
||||
defines { "ADL_ENABLE_DX11"}
|
||||
includedirs {"$(DXSDK_DIR)/include"}
|
||||
|
||||
configuration "x32"
|
||||
libdirs {"$(DXSDK_DIR)/Lib/x86"}
|
||||
configuration "x64"
|
||||
libdirs {"$(DXSDK_DIR)/Lib/x64"}
|
||||
configuration {}
|
||||
links {"d3dcompiler",
|
||||
"dxerr",
|
||||
"dxguid",
|
||||
"d3dx9",
|
||||
"d3d9",
|
||||
"winmm",
|
||||
"comctl32",
|
||||
"d3dx11"
|
||||
}
|
||||
return true
|
||||
end
|
175
thirdparty/bullet/build3/findOpenCL.lua
vendored
Normal file
175
thirdparty/bullet/build3/findOpenCL.lua
vendored
Normal file
@ -0,0 +1,175 @@
|
||||
|
||||
function findOpenCL_clew()
|
||||
return true;
|
||||
end
|
||||
|
||||
function findOpenCL_Apple()
|
||||
-- if os.is("macosx") then
|
||||
-- return true
|
||||
-- else
|
||||
return false
|
||||
-- end
|
||||
end
|
||||
|
||||
|
||||
function findOpenCL_AMD()
|
||||
-- local amdopenclpath = os.getenv("AMDAPPSDKROOT")
|
||||
-- if (amdopenclpath) then
|
||||
-- return true
|
||||
-- end
|
||||
return false
|
||||
end
|
||||
|
||||
function findOpenCL_NVIDIA()
|
||||
-- local nvidiaopenclpath = os.getenv("CUDA_PATH")
|
||||
-- if (nvidiaopenclpath) then
|
||||
-- return true
|
||||
-- end
|
||||
return false
|
||||
end
|
||||
|
||||
function findOpenCL_Intel()
|
||||
-- if os.is("Windows") then
|
||||
-- local intelopenclpath = os.getenv("INTELOCLSDKROOT")
|
||||
-- if (intelopenclpath) then
|
||||
-- return true
|
||||
-- end
|
||||
-- end
|
||||
-- if os.is("Linux") then
|
||||
-- local intelsdk = io.open("/usr/include/CL/opencl.h","r")
|
||||
-- if (intelsdk) then
|
||||
-- return true;
|
||||
-- end
|
||||
-- end
|
||||
return false
|
||||
end
|
||||
|
||||
function initOpenCL_clew()
|
||||
configuration{}
|
||||
includedirs {
|
||||
projectRootDir .. "src/clew"
|
||||
}
|
||||
defines {"B3_USE_CLEW"}
|
||||
files {
|
||||
projectRootDir .. "src/clew/clew.c",
|
||||
projectRootDir .. "src/clew/clew.h"
|
||||
}
|
||||
if os.is("Linux") then
|
||||
links {"dl"}
|
||||
end
|
||||
end
|
||||
|
||||
function initOpenCL_Apple()
|
||||
configuration{}
|
||||
includedirs {
|
||||
"/System/Library/Frameworks/OpenCL.framework"
|
||||
}
|
||||
libdirs "/System/Library/Frameworks/OpenCL.framework"
|
||||
links
|
||||
{
|
||||
"OpenCL.framework"
|
||||
}
|
||||
end
|
||||
|
||||
function initOpenCL_AMD()
|
||||
configuration {}
|
||||
local amdopenclpath = os.getenv("AMDAPPSDKROOT")
|
||||
if (amdopenclpath) then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_AMD"}
|
||||
includedirs {
|
||||
"$(AMDAPPSDKROOT)/include"
|
||||
}
|
||||
configuration "x32"
|
||||
libdirs {"$(AMDAPPSDKROOT)/lib/x86"}
|
||||
configuration "x64"
|
||||
libdirs {"$(AMDAPPSDKROOT)/lib/x86_64"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
function initOpenCL_NVIDIA()
|
||||
configuration {}
|
||||
local nvidiaopenclpath = os.getenv("CUDA_PATH")
|
||||
if (nvidiaopenclpath) then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_NVIDIA"}
|
||||
includedirs {
|
||||
"$(CUDA_PATH)/include"
|
||||
}
|
||||
configuration "x32"
|
||||
libdirs {"$(CUDA_PATH)/lib/Win32"}
|
||||
configuration "x64"
|
||||
libdirs {"$(CUDA_PATH)/lib/x64"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function initOpenCL_Intel()
|
||||
configuration {}
|
||||
if os.is("Windows") then
|
||||
local intelopenclpath = os.getenv("INTELOCLSDKROOT")
|
||||
if (intelopenclpath) then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_INTEL"}
|
||||
includedirs {
|
||||
"$(INTELOCLSDKROOT)/include"
|
||||
}
|
||||
configuration "x32"
|
||||
libdirs {"$(INTELOCLSDKROOT)/lib/x86"}
|
||||
configuration "x64"
|
||||
libdirs {"$(INTELOCLSDKROOT)/lib/x64"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
return true
|
||||
end
|
||||
end
|
||||
if os.is("Linux") then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_INTEL"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function findOpenCL (vendor )
|
||||
if vendor=="clew" then
|
||||
return findOpenCL_clew()
|
||||
end
|
||||
if vendor=="AMD" then
|
||||
return findOpenCL_AMD()
|
||||
end
|
||||
if vendor=="NVIDIA" then
|
||||
return findOpenCL_NVIDIA()
|
||||
end
|
||||
if vendor=="Intel" then
|
||||
return findOpenCL_Intel()
|
||||
end
|
||||
if vendor=="Apple" then
|
||||
return findOpenCL_Apple()
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function initOpenCL ( vendor )
|
||||
if vendor=="clew" then
|
||||
initOpenCL_clew()
|
||||
end
|
||||
if vendor=="AMD" then
|
||||
initOpenCL_AMD()
|
||||
end
|
||||
if vendor=="NVIDIA" then
|
||||
return initOpenCL_NVIDIA()
|
||||
end
|
||||
if vendor=="Intel" then
|
||||
initOpenCL_Intel()
|
||||
end
|
||||
if vendor=="Apple" then
|
||||
return initOpenCL_Apple()
|
||||
end
|
||||
end
|
||||
|
121
thirdparty/bullet/build3/findOpenGLGlewGlut.lua
vendored
Normal file
121
thirdparty/bullet/build3/findOpenGLGlewGlut.lua
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
|
||||
function findOpenGL()
|
||||
configuration{}
|
||||
if os.is("Linux") then
|
||||
return true
|
||||
end
|
||||
--assume OpenGL is available on Mac OSX, Windows etc
|
||||
return true
|
||||
end
|
||||
|
||||
function findOpenGL3()
|
||||
configuration{}
|
||||
if os.is("MacOSX") then
|
||||
local osversion = os.getversion()
|
||||
--Mac OSX 10.9 and above supports OpenGL 3, below doesn't, so ...
|
||||
if osversion.majorversion > 10 or (osversion.majorversion == 10 and osversion.minorversion >=9) then
|
||||
return findOpenGL()
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
return findOpenGL()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function initOpenGL()
|
||||
configuration {}
|
||||
configuration {"Windows"}
|
||||
links {"opengl32","glu32"}
|
||||
configuration {"MacOSX"}
|
||||
links { "OpenGL.framework"}
|
||||
configuration {"not Windows", "not MacOSX"}
|
||||
if os.is("Linux") then
|
||||
if _OPTIONS["enable_system_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h")) then
|
||||
links {"GL"}
|
||||
else
|
||||
print("No GL/gl.h found, using dynamic loading of GL using glad")
|
||||
defines {"GLEW_INIT_OPENGL11_FUNCTIONS=1"}
|
||||
links {"dl"}
|
||||
end
|
||||
end
|
||||
configuration{}
|
||||
end
|
||||
|
||||
function initX11()
|
||||
if os.is("Linux") then
|
||||
if _OPTIONS["enable_system_x11"] and (os.isdir("/usr/include") and os.isfile("/usr/include/X11/X.h")) then
|
||||
links{"X11","pthread"}
|
||||
else
|
||||
print("No X11/X.h found, using dynamic loading of X11")
|
||||
includedirs {
|
||||
projectRootDir .. "examples/ThirdPartyLibs/optionalX11"
|
||||
}
|
||||
defines {"DYNAMIC_LOAD_X11_FUNCTIONS"}
|
||||
links {"dl","pthread"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function initX11()
|
||||
if os.is("Linux") then
|
||||
if _OPTIONS["enable_system_x11"] and (os.isdir("/usr/include") and os.isfile("/usr/include/X11/X.h")) then
|
||||
links{"X11","pthread"}
|
||||
else
|
||||
print("No X11/X.h found, using dynamic loading of X11")
|
||||
includedirs {
|
||||
projectRootDir .. "examples/ThirdPartyLibs/optionalX11"
|
||||
}
|
||||
defines {"DYNAMIC_LOAD_X11_FUNCTIONS"}
|
||||
links {"dl","pthread"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function initGlew()
|
||||
configuration {}
|
||||
if os.is("Windows") then
|
||||
configuration {"Windows"}
|
||||
defines { "GLEW_STATIC"}
|
||||
includedirs {
|
||||
projectRootDir .. "examples/ThirdPartyLibs/glad"
|
||||
}
|
||||
files { projectRootDir .. "examples/ThirdPartyLibs/glad/gl.c"}
|
||||
end
|
||||
if os.is("MacOSX") then
|
||||
includedirs {
|
||||
projectRootDir .. "examples/ThirdPartyLibs/glad"
|
||||
}
|
||||
files { projectRootDir .. "examples/ThirdPartyLibs/glad/gl.c"}
|
||||
end
|
||||
|
||||
if os.is("Linux") then
|
||||
configuration{"Linux"}
|
||||
initX11()
|
||||
if _OPTIONS["enable_system_glx"] then --# and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/glx.h")) then
|
||||
links{"pthread"}
|
||||
print("Using system GL/glx.h")
|
||||
else
|
||||
print("Using glad_glx")
|
||||
defines { "GLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1"}
|
||||
files {
|
||||
projectRootDir .. "examples/ThirdPartyLibs/glad/glx.c"}
|
||||
end
|
||||
|
||||
print("Using glad and dynamic loading of GL functions")
|
||||
defines { "GLEW_STATIC"}
|
||||
includedirs {
|
||||
projectRootDir .. "examples/ThirdPartyLibs/glad"
|
||||
}
|
||||
files { projectRootDir .. "examples/ThirdPartyLibs/glad/gl.c",
|
||||
projectRootDir .. "examples/ThirdPartyLibs/glad/glx.c"}
|
||||
links {"dl"}
|
||||
|
||||
end
|
||||
configuration{}
|
||||
end
|
||||
|
||||
|
939
thirdparty/bullet/build3/lcpp.lua
vendored
Normal file
939
thirdparty/bullet/build3/lcpp.lua
vendored
Normal file
@ -0,0 +1,939 @@
|
||||
----------------------------------------------------------------------------
|
||||
--## lcpp - a C-PreProcessor in Lua 5.1 for LuaJIT ffi
|
||||
--
|
||||
-- Copyright (C) 2012-2013 Michael Schmoock <michael@willigens.de>
|
||||
--
|
||||
--### Links
|
||||
-- * GitHub page: [http://github.com/willsteel/lcpp](http://github.com/willsteel/lcpp)
|
||||
-- * Project page: [http://lcpp.schmoock.net](http://lcpp.schmoock.net)
|
||||
-- * Lua: [http://www.lua.org](http://www.lua.org)
|
||||
-- * LuaJIT: [http://luajit.org](http://luajit.org)
|
||||
-- * Sponsored by: [http://mmbbq.org](http://mmbbq.org)
|
||||
--
|
||||
-- It can be used to pre-process LuaJIT ffi C header file input.
|
||||
-- It can also be used to preprocess any other code (i.e. Lua itself)
|
||||
--
|
||||
-- git clone https://github.com/willsteel/lcpp.git
|
||||
----------------------------------------------------------------------------
|
||||
--## USAGE
|
||||
-- -- load lcpp
|
||||
-- local lcpp = require("lcpp")
|
||||
--
|
||||
-- -- use LuaJIT ffi and lcpp to parse cpp code
|
||||
-- ffi.cdef("#include <your_header.h>")
|
||||
--
|
||||
-- -- compile some input
|
||||
-- local out = lcpp.compile([[
|
||||
-- #include "myheader.h"
|
||||
-- #define MAXPATH 260
|
||||
-- typedef struct somestruct_t {
|
||||
-- void* base;
|
||||
-- size_t size;
|
||||
-- wchar_t path[MAXPATH];
|
||||
-- } t_exe;
|
||||
-- ]])
|
||||
--
|
||||
-- -- the result should be
|
||||
-- out = [[
|
||||
-- // <preprocessed content of file "myheader.h">
|
||||
-- typedef struct somestruct_t {
|
||||
-- void* base;
|
||||
-- size_t size;
|
||||
-- wchar_t path[260];
|
||||
-- } t_exe;
|
||||
-- ]]
|
||||
--
|
||||
--## This CPPs BNF:
|
||||
-- RULES:
|
||||
-- CODE := {LINE}
|
||||
-- LINE := {STUFF NEWML} STUFF NEWL
|
||||
-- STUFF := DIRECTIVE | IGNORED_CONTENT
|
||||
-- DIRECTIVE := OPTSPACES CMD OPTSPACES DIRECTIVE_NAME WHITESPACES DIRECTIVE_CONTENT WHITESPACES NEWL
|
||||
--
|
||||
-- LEAVES:
|
||||
-- NEWL := "\n"
|
||||
-- NEWL_ESC := "\\n"
|
||||
-- WHITESPACES := "[ \t]+"
|
||||
-- OPTSPACES := "[ \t]*"
|
||||
-- COMMENT := "//(.-)$"
|
||||
-- MLCOMMENT := "/[*](.-)[*]/"
|
||||
-- IGNORED_CONTENT := "[^#].*"
|
||||
-- CMD := "#"
|
||||
-- DIRECTIVE_NAME := "include"|"define"|"undef"|"if"|"else"|"elif"|"else if"|"endif"|"ifdef"|"ifndef"|"pragma"|"version"
|
||||
-- DIRECTIVE_CONTENT := ".*?"
|
||||
--
|
||||
--## TODOs:
|
||||
-- - lcpp.LCPP_LUA for: load, loadfile
|
||||
-- - "#" operator for stringification
|
||||
-- - literal concatenation: "foo" "bar" -> "foobar"
|
||||
--
|
||||
--## License (MIT)
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
-- of this software and associated documentation files (the "Software"), to deal
|
||||
-- in the Software without restriction, including without limitation the rights
|
||||
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
-- copies of the Software, and to permit persons to whom the Software is
|
||||
-- furnished to do so, subject to the following conditions:
|
||||
--
|
||||
-- The above copyright notice and this permission notice shall be included in
|
||||
-- all copies or substantial portions of the Software.
|
||||
--
|
||||
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
-- THE SOFTWARE.
|
||||
--
|
||||
-- MIT license: http://www.opensource.org/licenses/mit-license.php
|
||||
-- -----------------------------------------------------------------------------
|
||||
--
|
||||
-- @module lcpp
|
||||
local lcpp = {}
|
||||
|
||||
-- CONFIG
|
||||
lcpp.LCPP_LUA = false -- whether to use lcpp to preprocess Lua code (load, loadfile, loadstring...)
|
||||
lcpp.LCPP_FFI = true -- whether to use lcpp as LuaJIT ffi PreProcessor (if used in luaJIT)
|
||||
lcpp.LCPP_TEST = false -- whether to run lcpp unit tests when loading lcpp module
|
||||
lcpp.ENV = {} -- static predefines (env-like)
|
||||
lcpp.FAST = true -- perf. tweaks when enabled. con: breaks minor stuff like __LINE__ macros
|
||||
lcpp.DEBUG = false
|
||||
|
||||
-- PREDEFINES
|
||||
local __FILE__ = "__FILE__"
|
||||
local __LINE__ = "__LINE__"
|
||||
local __DATE__ = "__DATE__"
|
||||
local __TIME__ = "__TIME__"
|
||||
local __LCPP_INDENT__ = "__LCPP_INDENT__"
|
||||
local __LCPP_INSIDE_HEADERFILE__ = "__LCPP_INSIDE_HEADERFILE__"
|
||||
|
||||
-- BNF LEAVES
|
||||
local ENDL = "$"
|
||||
local STARTL = "^"
|
||||
local NEWL = "\n"
|
||||
local NEWL_BYTE = NEWL:byte(1)
|
||||
local NEWL_ESC = "\\"
|
||||
local NEWML = "\\\n"
|
||||
local CMD = "#"
|
||||
local CMD_BYTE = CMD:byte(1)
|
||||
local COMMENT = "^(.-)//.-$"
|
||||
local MLCOMMENT = "/[*].-[*]/"
|
||||
local WHITESPACES = "%s+"
|
||||
local OPTSPACES = "%s*"
|
||||
local IDENTIFIER = "[_%a][_%w]*"
|
||||
local NOIDENTIFIER = "[^%w_]+"
|
||||
local FILENAME = "[0-9a-zA-Z.-_/\\]+"
|
||||
local TEXT = ".+"
|
||||
|
||||
-- BNF WORDS
|
||||
local _INCLUDE = "include"
|
||||
local _DEFINE = "define"
|
||||
local _IFDEF = "ifdef"
|
||||
local _IFNDEF = "ifndef"
|
||||
local _ENDIF = "endif"
|
||||
local _UNDEF = "undef"
|
||||
local _IF = "if"
|
||||
local _ELSE = "else"
|
||||
local _ELIF = "elif"
|
||||
local _NOT = "!"
|
||||
local _ERROR = "error"
|
||||
local _PRAGMA = "pragma"
|
||||
local _VERSION = "version"
|
||||
|
||||
-- BNF RULES
|
||||
local INCLUDE = STARTL.._INCLUDE..WHITESPACES.."[\"<]("..FILENAME..")[\">]"..OPTSPACES..ENDL
|
||||
local DEFINE = STARTL.._DEFINE
|
||||
local IFDEF = STARTL.._IFDEF..WHITESPACES.."("..IDENTIFIER..")"..OPTSPACES..ENDL
|
||||
local IFNDEF = STARTL.._IFNDEF..WHITESPACES.."("..IDENTIFIER..")"..OPTSPACES..ENDL
|
||||
local ENDIF = STARTL.._ENDIF..OPTSPACES.."(.*)"..ENDL
|
||||
local UNDEF = STARTL.._UNDEF..WHITESPACES.."("..IDENTIFIER..")"..OPTSPACES..ENDL
|
||||
local IF = STARTL.._IF..WHITESPACES.."(.*)"..ENDL
|
||||
local ELSE = STARTL.._ELSE..OPTSPACES.."(.*)"..ENDL
|
||||
local ELIF = STARTL.._ELIF..WHITESPACES.."(.*)"..ENDL
|
||||
local ELSEIF = STARTL.._ELSE..WHITESPACES.._IF..WHITESPACES.."(.*)"..ENDL
|
||||
local ERROR = STARTL.._ERROR..WHITESPACES.."("..TEXT..")"..OPTSPACES..ENDL
|
||||
local ERROR_NOTEXT = STARTL.._ERROR..OPTSPACES..ENDL --> not required when we have POSIX regex
|
||||
local PRAGMA = STARTL.._PRAGMA
|
||||
local VERSION = STARTL.._VERSION
|
||||
|
||||
|
||||
|
||||
-- speedups
|
||||
local TRUEMACRO = STARTL.."("..IDENTIFIER..")%s*$"
|
||||
local REPLMACRO = STARTL.."("..IDENTIFIER..")"..WHITESPACES.."(.+)$"
|
||||
local FUNCMACRO = STARTL.."("..IDENTIFIER..")%s*%(([%s%w,]*)%)%s*(.*)"
|
||||
|
||||
|
||||
-- ------------
|
||||
-- LOCAL UTILS
|
||||
-- ------------
|
||||
lcpp.STATE = {lineno = 0} -- current state for debugging the last operation
|
||||
local function error(msg) _G.print(debug.traceback()); _G.error(string.format("lcpp ERR [%04i] %s", lcpp.STATE.lineno, msg)) end
|
||||
local function print(msg) _G.print(string.format("lcpp INF [%04i] %s", lcpp.STATE.lineno, msg)) end
|
||||
|
||||
-- splits a string using a pattern into a table of substrings
|
||||
local function gsplit(str, pat)
|
||||
local function _split(str, pat)
|
||||
local t = {} -- NOTE: use {n = 0} in Lua-5.0
|
||||
local fpat = "(.-)"..pat
|
||||
local last_end = 1
|
||||
local s, e, cap = str:find(fpat, 1)
|
||||
while s do
|
||||
if s ~= 1 or cap ~= "" then
|
||||
coroutine.yield(cap)
|
||||
end
|
||||
last_end = e + 1
|
||||
s, e, cap = str:find(fpat, last_end)
|
||||
end
|
||||
if last_end <= #str then
|
||||
cap = str:sub(last_end)
|
||||
coroutine.yield(cap)
|
||||
end
|
||||
end
|
||||
return coroutine.wrap(function() _split(str, pat) end)
|
||||
end
|
||||
local function split(str, pat)
|
||||
local t = {}
|
||||
for str in gsplit(str, pat) do table.insert(t, str) end
|
||||
return t
|
||||
end
|
||||
|
||||
-- Checks whether a string starts with a given substring
|
||||
-- offset is optional
|
||||
local function strsw(str, pat, offset)
|
||||
if not str then return false end
|
||||
if not offset then offset = 0 end
|
||||
return string.sub(str, 1+offset, string.len(pat)+offset) == pat
|
||||
end
|
||||
|
||||
-- Checks whether a string ends with a given substring
|
||||
local function strew(str, pat)
|
||||
if not str then return false end
|
||||
return pat=='' or string.sub(str,-string.len(pat)) == pat
|
||||
end
|
||||
|
||||
-- string trim12 from lua wiki
|
||||
local function trim(str)
|
||||
local from = str:match"^%s*()"
|
||||
return from > #str and "" or str:match(".*%S", from)
|
||||
end
|
||||
|
||||
-- returns the number of string occurrences
|
||||
local function findn(input, what)
|
||||
local count = 0
|
||||
local offset = 0
|
||||
while true do
|
||||
_, offset = string.find(input, what, offset+1, true)
|
||||
if not offset then return count end
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
|
||||
-- a lightweight and flexible tokenizer
|
||||
local function _tokenizer(str, setup)
|
||||
local defsetup = {
|
||||
-- EXAMPLE patterns have to be pretended with "^" for the tokenizer
|
||||
["identifier"] = '^[_%a][_%w]*',
|
||||
["number"] = '^[%+%-]?%d+[%.]?%d*',
|
||||
["ignore"] = '^%s+',
|
||||
["string"] = true,
|
||||
["keywords"] = {
|
||||
-- ["NAME"] = '^pattern',
|
||||
-- ...
|
||||
},
|
||||
}
|
||||
if not setup then
|
||||
setup = defsetup
|
||||
end
|
||||
setup.identifier = setup.identifier or defsetup.identifier
|
||||
setup.number = setup.number or defsetup.number
|
||||
setup.ignore = setup.number or defsetup.ignore
|
||||
if nil == setup.string then setup.string = true end
|
||||
setup.keywords = setup.keywords or {}
|
||||
|
||||
local strlen = #str
|
||||
local i = 1
|
||||
local i1, i2
|
||||
local keyword
|
||||
|
||||
local function find(pat)
|
||||
i1, i2 = str:find(pat,i)
|
||||
return i1 ~= nil
|
||||
end
|
||||
|
||||
local function cut()
|
||||
return str:sub(i, i2)
|
||||
end
|
||||
|
||||
local function findKeyword()
|
||||
for name, pat in pairs(setup.keywords) do
|
||||
local result = find(pat)
|
||||
if result then
|
||||
keyword = name
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
while true do
|
||||
if i > strlen then return 'eof', nil, strlen, strlen end
|
||||
if find(setup.ignore) then
|
||||
coroutine.yield("ignore", cut(), i1, i2)
|
||||
elseif findKeyword() then
|
||||
coroutine.yield(keyword, cut(), i1, i2)
|
||||
elseif find(setup.number) then
|
||||
coroutine.yield('number', tonumber(cut()), i1, i2)
|
||||
elseif find(setup.identifier) then
|
||||
coroutine.yield('identifier', cut(), i1, i2)
|
||||
elseif setup.string and (find('^"[^"]*"') or find("^'[^']*'")) then
|
||||
-- strip the quotes
|
||||
coroutine.yield('string', cut():sub(2,-2), i1, i2)
|
||||
else -- any other unknown character
|
||||
i1 = i
|
||||
i2 = i
|
||||
coroutine.yield('unknown', cut(), i1, i2)
|
||||
end
|
||||
i = i2+1
|
||||
end
|
||||
end
|
||||
local function tokenizer(str, setup)
|
||||
return coroutine.wrap(function() _tokenizer(str, setup) end)
|
||||
end
|
||||
|
||||
|
||||
-- ------------
|
||||
-- PARSER
|
||||
-- ------------
|
||||
|
||||
-- hint: LuaJIT ffi does not rely on us to remove the comments, but maybe other usecases
|
||||
local function removeComments(input)
|
||||
input = string.gsub(input, "//.-\n", "\n") -- remove sl comments
|
||||
-- remove multiline comments in a way that it does not break __LINE__ macro
|
||||
if lcpp.FAST then
|
||||
input = string.gsub(input, "/%*.-%*/", "") -- remove ml comments (stupid method)
|
||||
else
|
||||
local offset = 0
|
||||
local output = {}
|
||||
local starti, endi, match, lastendi
|
||||
while offset do
|
||||
starti, endi, match = input:find("/%*(.-)%*/", offset, false)
|
||||
if starti then
|
||||
lastendi = endi
|
||||
local newlineCount = findn(match, "\n")
|
||||
local newlines = string.rep("\n", newlineCount)
|
||||
table.insert(output, input:sub(offset+1, starti-1))
|
||||
table.insert(output, newlines)
|
||||
offset = endi
|
||||
else
|
||||
offset = nil
|
||||
table.insert(output, input:sub((lastendi or 0) + 1))
|
||||
end
|
||||
end
|
||||
input = table.concat(output)
|
||||
--error(input)
|
||||
end
|
||||
|
||||
return input
|
||||
end
|
||||
|
||||
-- screener: revmoce comments, trim, ml concat...
|
||||
-- it only splits to cpp input lines and removes comments. it does not tokenize.
|
||||
local function screener(input)
|
||||
local function _screener(input)
|
||||
--input = removeComments(input)
|
||||
|
||||
-- concat mulit-line input.
|
||||
local count = 1
|
||||
while count > 0 do input, count = string.gsub(input, "^(.-)\\\n(.-)$", "%1 %2\n") end
|
||||
|
||||
-- trim and join blocks not starting with "#"
|
||||
local buffer = {}
|
||||
for line in gsplit(input, NEWL) do
|
||||
--line = trim(line)
|
||||
if #line > 0 then
|
||||
if line:byte(1) == CMD_BYTE then
|
||||
--line = line:gsub("#%s*(.*)", "#%1") -- remove optinal whitespaces after "#". reduce triming later.
|
||||
if #buffer > 0 then
|
||||
coroutine.yield(table.concat(buffer, NEWL))
|
||||
buffer = {}
|
||||
end
|
||||
coroutine.yield(line)
|
||||
else
|
||||
if lcpp.FAST then
|
||||
table.insert(buffer, line)
|
||||
else
|
||||
coroutine.yield(line)
|
||||
end
|
||||
end
|
||||
elseif not lcpp.FAST then
|
||||
coroutine.yield(line)
|
||||
end
|
||||
end
|
||||
if #buffer > 0 then
|
||||
coroutine.yield(table.concat(buffer, NEWL))
|
||||
end
|
||||
end
|
||||
|
||||
return coroutine.wrap(function() _screener(input) end)
|
||||
end
|
||||
|
||||
-- apply currently known macros to input (and returns it)
|
||||
local function apply(state, input)
|
||||
local out = {}
|
||||
local functions = {}
|
||||
|
||||
for k, v, start, end_ in tokenizer(input) do
|
||||
if k == "identifier" then
|
||||
local repl = v
|
||||
local macro = state.defines[v]
|
||||
if macro then
|
||||
if type(macro) == "boolean" then
|
||||
repl = ""
|
||||
elseif type(macro) == "string" then
|
||||
repl = macro
|
||||
elseif type(macro) == "number" then
|
||||
repl = tostring(macro)
|
||||
elseif type(macro) == "function" then
|
||||
table.insert(functions, macro) -- we apply functions in a later step
|
||||
end
|
||||
end
|
||||
table.insert(out, repl)
|
||||
else
|
||||
table.insert(out, input:sub(start, end_))
|
||||
end
|
||||
end
|
||||
input = table.concat(out)
|
||||
for _, func in pairs(functions) do -- TODO: looks sucky (but works quite nice)
|
||||
input = func(input)
|
||||
end
|
||||
|
||||
return input
|
||||
end
|
||||
|
||||
-- processes an input line. called from lcpp doWork loop
|
||||
local function processLine(state, line)
|
||||
if not line or #line == 0 then return line end
|
||||
local cmd = nil
|
||||
if line:byte(1) == CMD_BYTE then cmd = line:sub(2) end
|
||||
--print("processLine(): "..line)
|
||||
|
||||
|
||||
--[[ SKIPPING ]]--
|
||||
if state:skip() then return end
|
||||
|
||||
|
||||
--[[ READ NEW DIRECTIVES ]]--
|
||||
if cmd then
|
||||
-- handle #include ...
|
||||
local filename = cmd:match(INCLUDE)
|
||||
if filename then
|
||||
print("processing header " .. filename)
|
||||
return state:includeFile(filename)
|
||||
end
|
||||
|
||||
return line
|
||||
end
|
||||
|
||||
|
||||
--[[ APPLY MACROS ]]--
|
||||
--line = state:apply(line);
|
||||
|
||||
return line
|
||||
end
|
||||
|
||||
|
||||
local function processLine2(state, line)
|
||||
if not line or #line == 0 then return line end
|
||||
local cmd = nil
|
||||
if line:byte(1) == CMD_BYTE then cmd = line:sub(2) end
|
||||
--print("processLine(): "..line)
|
||||
|
||||
if state:defined(__LCPP_INSIDE_HEADERFILE__) then
|
||||
--[[ IF/THEN/ELSE STRUCTURAL BLOCKS ]]--
|
||||
if cmd then
|
||||
local ifdef = cmd:match(IFDEF)
|
||||
local ifexp = cmd:match(IF)
|
||||
local ifndef = cmd:match(IFNDEF)
|
||||
local elif = cmd:match(ELIF)
|
||||
local elseif_ = cmd:match(ELSEIF)
|
||||
local else_ = cmd:match(ELSE)
|
||||
local endif = cmd:match(ENDIF)
|
||||
local struct = ifdef or ifexp or ifndef or elif or elseif_ or else_ or endif
|
||||
|
||||
if struct then
|
||||
if ifdef then state:openBlock(state:defined(ifdef)) end
|
||||
if ifexp then state:openBlock(state:parseExpr(ifexp)) end
|
||||
if ifndef then state:openBlock(not state:defined(ifndef)) end
|
||||
if elif then state:elseBlock(state:parseExpr(elif)) end
|
||||
if elseif_ then state:elseBlock(state:parseExpr(elseif_)) end
|
||||
if else_ then state:elseBlock(true) end
|
||||
if endif then state:closeBlock() end
|
||||
return line
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[ SKIPPING ]]--
|
||||
if state:skip() then return end
|
||||
|
||||
|
||||
--[[ READ NEW DIRECTIVES ]]--
|
||||
if cmd then
|
||||
-- handle #include ...
|
||||
local filename = cmd:match(INCLUDE)
|
||||
if filename then
|
||||
print("processing header " .. filename)
|
||||
return state:includeFile(filename)
|
||||
end
|
||||
|
||||
if state:defined(__LCPP_INSIDE_HEADERFILE__) then
|
||||
-- handle #undef ...
|
||||
local key = cmd:match(UNDEF)
|
||||
if type(key) == "string" then
|
||||
state:undefine(key)
|
||||
return
|
||||
end
|
||||
|
||||
-- read "#define >FooBar...<" directives
|
||||
if cmd:match(DEFINE) then
|
||||
local define = trim(cmd:sub(DEFINE:len()+1))
|
||||
local macroname, replacement
|
||||
|
||||
-- simple "true" defines
|
||||
macroname = define:match(TRUEMACRO)
|
||||
if macroname then
|
||||
state:define(macroname, true)
|
||||
end
|
||||
|
||||
-- replace macro defines
|
||||
macroname, replacement = define:match(REPLMACRO)
|
||||
if macroname and replacement then
|
||||
state:define(macroname, replacement)
|
||||
end
|
||||
|
||||
-- read functional macros
|
||||
macroname, replacement = state:parseFunction(define)
|
||||
if macroname and replacement then
|
||||
state:define(macroname, replacement)
|
||||
end
|
||||
|
||||
return line
|
||||
end
|
||||
|
||||
-- ignore, because we dont have any pragma directives yet
|
||||
if cmd:match(PRAGMA) then
|
||||
return line
|
||||
end
|
||||
|
||||
-- abort on unknown keywords
|
||||
error("unknown directive: "..line)
|
||||
else
|
||||
return line
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[ APPLY MACROS ]]--
|
||||
--line = state:apply(line);
|
||||
|
||||
return line
|
||||
end
|
||||
|
||||
|
||||
local function doWork(state)
|
||||
local function _doWork(state)
|
||||
if not state:defined(__FILE__) then state:define(__FILE__, "<USER_CHUNK>", true) end
|
||||
local oldIndent = state:getIndent()
|
||||
while true do
|
||||
local input = state:getLine()
|
||||
if not input then break end
|
||||
local output = processLine(state, input)
|
||||
if not lcpp.FAST and not output then
|
||||
output = "" end -- output empty skipped lines
|
||||
|
||||
if lcpp.DEBUG then output = output.." -- "..input end -- input as comment when DEBUG
|
||||
|
||||
if output then coroutine.yield(output) end
|
||||
end
|
||||
if (oldIndent ~= state:getIndent()) then error("indentation level must be balanced within a file. was:"..oldIndent.." is:"..state:getIndent()) end
|
||||
end
|
||||
return coroutine.wrap(function() _doWork(state) end)
|
||||
end
|
||||
|
||||
local function doWork2(state)
|
||||
local function _doWork2(state)
|
||||
if not state:defined(__FILE__) then state:define(__FILE__, "<USER_CHUNK>", true) end
|
||||
local oldIndent = state:getIndent()
|
||||
while true do
|
||||
local input = state:getLine()
|
||||
if not input then break end
|
||||
local output = processLine2(state, input)
|
||||
if not lcpp.FAST and not output then output = "" end -- output empty skipped lines
|
||||
if lcpp.DEBUG then output = output.." -- "..input end -- input as comment when DEBUG
|
||||
if output then coroutine.yield(output) end
|
||||
end
|
||||
if (oldIndent ~= state:getIndent()) then error("indentation level must be balanced within a file. was:"..oldIndent.." is:"..state:getIndent()) end
|
||||
end
|
||||
return coroutine.wrap(function() _doWork2(state) end)
|
||||
end
|
||||
|
||||
local function includeFile(state, filename)
|
||||
local result, result_state = lcpp.compileHeaderFile("../src/" .. filename, state.defines)
|
||||
-- now, we take the define table of the sub file for further processing
|
||||
state.defines = result_state.defines
|
||||
-- and return the compiled result
|
||||
return result
|
||||
end
|
||||
|
||||
-- sets a global define
|
||||
local function define(state, key, value, override)
|
||||
--print("define:"..key.." type:"..type(value))
|
||||
--if value and not override and state:defined(key) then error("already defined: "..key) end
|
||||
value = state:prepareMacro(value)
|
||||
state.defines[key] = value
|
||||
end
|
||||
|
||||
-- parses CPP exressions
|
||||
-- i.e.: #if !defined(_UNICODE) && !defined(UNICODE)
|
||||
--
|
||||
--BNF:
|
||||
-- EXPR -> (BRACKET_OPEN)(EXPR)(BRACKET_CLOSE)
|
||||
-- EXPR -> (EXPR)(OR)(EXPR)
|
||||
-- EXPR -> (EXPR)(AND)(EXPR)
|
||||
-- EXPR -> (NOT)(EXPR)
|
||||
-- EXPR -> (FUNCTION)
|
||||
-- FUNCTION -> (IDENTIFIER)(BRACKET_OPEN)(ARGS)(BRACKET_CLOSE)
|
||||
-- ARGS -> ((IDENTIFIER)[(COMMA)(IDENTIFIER)])?
|
||||
--LEAVES:
|
||||
-- IGNORE -> " \t"
|
||||
-- BRACKET_OPEN -> "("
|
||||
-- BRACKET_CLOSE -> ")"
|
||||
-- OR -> "||"
|
||||
-- AND -> "&&"
|
||||
-- NOT -> "!"
|
||||
-- IDENTIFIER -> "[0-9a-zA-Z_]"
|
||||
--
|
||||
|
||||
local LCPP_TOKENIZE_MACRO = {
|
||||
string = true,
|
||||
keywords = {
|
||||
CONCAT = "^##",
|
||||
},
|
||||
}
|
||||
local LCPP_TOKENIZE_EXPR = {
|
||||
string = false,
|
||||
keywords = {
|
||||
NOT = '^!',
|
||||
DEFINED = '^defined',
|
||||
BROPEN = '^[(]',
|
||||
BRCLOSE = '^[)]',
|
||||
AND = '^&&',
|
||||
OR = '^||',
|
||||
},
|
||||
}
|
||||
|
||||
local function parseDefined(state, input)
|
||||
local result = false
|
||||
local bropen = false
|
||||
local brclose = false
|
||||
local ident = nil
|
||||
|
||||
for key, value in input do
|
||||
if key == "BROPEN" then
|
||||
bropen = true
|
||||
end
|
||||
if key == "identifier" then
|
||||
ident = value
|
||||
if not bropen then break end
|
||||
end
|
||||
if key == "BRCLOSE" and ident then
|
||||
brclose = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- wiht and w/o brackets allowed
|
||||
if ident and ((bropen and brclose) or (not bropen and not brclose)) then
|
||||
return state:defined(ident)
|
||||
end
|
||||
|
||||
error("expression parse error: defined(ident)")
|
||||
end
|
||||
|
||||
local function parseExpr(state, input)
|
||||
-- first call gets string input. rest uses tokenizer
|
||||
if type(input) == "string" then input = tokenizer(input, LCPP_TOKENIZE_EXPR) end
|
||||
local result = false
|
||||
local _not = false
|
||||
|
||||
for type, value in input do
|
||||
-- print("type:"..type.." value:"..value)
|
||||
if type == "NOT" then
|
||||
_not = true
|
||||
end
|
||||
if type == "BROPEN" then
|
||||
return state:parseExpr(input)
|
||||
end
|
||||
if type == "BRCLOSE" then
|
||||
return result
|
||||
end
|
||||
if type == "AND" then
|
||||
return result and state:parseExpr(input)
|
||||
end
|
||||
if type == "OR" then
|
||||
return result or state:parseExpr(input)
|
||||
end
|
||||
|
||||
if type == "DEFINED" then
|
||||
if _not then
|
||||
result = not parseDefined(state, input)
|
||||
else
|
||||
result = parseDefined(state, input)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
-- apply macros chaining and string ops "##" and "#"
|
||||
local function prepareMacro(state, input)
|
||||
if type(input) ~= "string" then return input end
|
||||
input = state:apply(input)
|
||||
local out = {}
|
||||
for k, v, start, end_ in tokenizer(input, LCPP_TOKENIZE_MACRO) do
|
||||
if k == "CONCAT" then
|
||||
-- remove concat op "##"
|
||||
else
|
||||
table.insert(out, input:sub(start, end_))
|
||||
end
|
||||
end
|
||||
return table.concat(out)
|
||||
end
|
||||
|
||||
-- i.e.: "MAX(x, y) (((x) > (y)) ? (x) : (y))"
|
||||
local function parseFunction(state, input)
|
||||
if not input then return end
|
||||
local name, argsstr, repl = input:match(FUNCMACRO)
|
||||
if not name or not argsstr or not repl then return end
|
||||
repl = state:prepareMacro(repl)
|
||||
|
||||
-- rename args to %1,%2... for later gsub
|
||||
local noargs = 0
|
||||
for argname in argsstr:gmatch(IDENTIFIER) do
|
||||
noargs = noargs + 1
|
||||
repl = repl:gsub(argname, "%%"..noargs)
|
||||
end
|
||||
|
||||
-- build pattern string: name(arg, arg, ...)
|
||||
local pattern
|
||||
if noargs == 0 then pattern = name.."%s*%(%s*%)" -- quick 0 arg version
|
||||
elseif noargs == 1 then pattern = name.."%s*%(%s*([^,%)]*)%s*%)" -- quick 1 arg version
|
||||
elseif noargs == 2 then pattern = name.."%s*%(%s*([^,%)]*)%s*,%s*([^,%)]*)%s*%)" -- quick 2 arg version
|
||||
else -- arbitrary arg version
|
||||
local buf = {}
|
||||
table.insert(buf, name)
|
||||
table.insert(buf, "%s*%(%s*")
|
||||
for i = 1, noargs do
|
||||
table.insert(buf, "([^,%)]*)%s*")
|
||||
if i < noargs then
|
||||
table.insert(buf, ",%s*")
|
||||
end
|
||||
end
|
||||
table.insert(buf, "%)")
|
||||
pattern = table.concat(buf)
|
||||
end
|
||||
|
||||
-- build macro funcion
|
||||
local func = function(input)
|
||||
return input:gsub(pattern, repl)
|
||||
end
|
||||
|
||||
return name, func
|
||||
end
|
||||
|
||||
|
||||
-- ------------
|
||||
-- LCPP INTERFACE
|
||||
-- ------------
|
||||
|
||||
--- initialies a lcpp state. not needed manually. handy for testing
|
||||
function lcpp.init(input, predefines)
|
||||
-- create sate var
|
||||
local state = {} -- init the state object
|
||||
state.defines = {} -- the table of known defines and replacements
|
||||
state.screener = screener(input)
|
||||
state.lineno = 0 -- the current line number
|
||||
state.stack = {} -- stores wether the current stack level is to be included
|
||||
state.once = {} -- stack level was once true (first if that evals to true)
|
||||
|
||||
-- funcs
|
||||
state.define = define
|
||||
state.undefine = function(state, key)
|
||||
state:define(key, nil)
|
||||
end
|
||||
state.defined = function(state, key)
|
||||
return state.defines[key] ~= nil
|
||||
end
|
||||
state.apply = apply
|
||||
state.includeFile = includeFile
|
||||
state.doWork = doWork
|
||||
state.doWork2 = doWork2
|
||||
state.getIndent = function(state)
|
||||
return #state.stack
|
||||
end
|
||||
state.openBlock = function(state, bool)
|
||||
state.stack[#state.stack+1] = bool
|
||||
state.once [#state.once+1] = bool
|
||||
state:define(__LCPP_INDENT__, state:getIndent(), true)
|
||||
end
|
||||
state.elseBlock = function(state, bool)
|
||||
if state.once[#state.once] then
|
||||
state.stack[#state.stack] = false
|
||||
else
|
||||
state.stack[#state.stack] = bool
|
||||
if bool then state.once[#state.once] = true end
|
||||
end
|
||||
end
|
||||
state.closeBlock = function(state)
|
||||
state.stack[#state.stack] = nil
|
||||
state.once [#state.once] = nil
|
||||
state:define(__LCPP_INDENT__, state:getIndent(), true)
|
||||
if state:getIndent() < 0 then error("Unopened block detected. Indentaion problem.") end
|
||||
end
|
||||
state.skip = function(state)
|
||||
for i = 1, #state.stack do
|
||||
if not state.stack[i] then return true end
|
||||
end
|
||||
return false
|
||||
end
|
||||
state.getLine = function(state)
|
||||
state.lineno = state.lineno + 1
|
||||
state:define(__LINE__, state.lineno, true)
|
||||
return state.screener()
|
||||
end
|
||||
state.prepareMacro = prepareMacro
|
||||
state.parseExpr = parseExpr
|
||||
state.parseFunction = parseFunction
|
||||
|
||||
-- predefines
|
||||
state:define(__DATE__, os.date("%B %d %Y"), true)
|
||||
state:define(__TIME__, os.date("%H:%M:%S"), true)
|
||||
state:define(__LINE__, state.lineno, true)
|
||||
state:define(__LCPP_INDENT__, state:getIndent(), true)
|
||||
predefines = predefines or {}
|
||||
for k,v in pairs(lcpp.ENV) do state:define(k, v, true) end -- static ones
|
||||
for k,v in pairs(predefines) do state:define(k, v, true) end
|
||||
|
||||
if lcpp.LCPP_TEST then lcpp.STATE = state end -- activate static state debugging
|
||||
|
||||
return state
|
||||
end
|
||||
|
||||
--- the preprocessors main function.
|
||||
-- returns the preprocessed output as a string.
|
||||
-- @param code data as string
|
||||
-- @param predefines OPTIONAL a table of predefined variables
|
||||
-- @usage lcpp.compile("#define bar 0x1337\nstatic const int foo = bar;")
|
||||
-- @usage lcpp.compile("#define bar 0x1337\nstatic const int foo = bar;", {["bar"] = "0x1338"})
|
||||
function lcpp.compile(code, predefines)
|
||||
local state = lcpp.init(code, predefines)
|
||||
local buf = {}
|
||||
for output in state:doWork() do
|
||||
table.insert(buf, output)
|
||||
end
|
||||
local output = table.concat(buf, NEWL)
|
||||
if lcpp.DEBUG then print(output) end
|
||||
return output, state
|
||||
end
|
||||
|
||||
function lcpp.compile2(code, predefines)
|
||||
local state = lcpp.init(code, predefines)
|
||||
state:define(__LCPP_INSIDE_HEADERFILE__,true)
|
||||
local buf = {}
|
||||
for output in state:doWork2() do
|
||||
table.insert(buf, output)
|
||||
end
|
||||
local output = table.concat(buf, NEWL)
|
||||
if lcpp.DEBUG then print(output) end
|
||||
return output, state
|
||||
end
|
||||
|
||||
--- preprocesses a file
|
||||
-- @param filename the file to read
|
||||
-- @param predefines OPTIONAL a table of predefined variables
|
||||
-- @usage out, state = lcpp.compileFile("../odbg/plugin.h", {["MAXPATH"]=260, ["UNICODE"]=true})
|
||||
function lcpp.compileFile(filename, predefines)
|
||||
if not filename then error("processFile() arg1 has to be a string") end
|
||||
local file = io.open(filename, 'r')
|
||||
if not file then error("file not found: "..filename) end
|
||||
local code = file:read('*a')
|
||||
predefines = predefines or {}
|
||||
predefines[__FILE__] = filename
|
||||
return lcpp.compile(code, predefines)
|
||||
end
|
||||
|
||||
function lcpp.compileHeaderFile(filename, predefines)
|
||||
if not filename then error("processFile() arg1 has to be a string") end
|
||||
local file = io.open(filename, 'r')
|
||||
if not file then error("file not found: "..filename) end
|
||||
local code = file:read('*a')
|
||||
predefines = predefines or {}
|
||||
predefines[__FILE__] = filename
|
||||
return lcpp.compile2(code, predefines)
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- ------------
|
||||
-- REGISTER LCPP
|
||||
-- ------------
|
||||
|
||||
--- disable lcpp processing for ffi, loadstring and such
|
||||
lcpp.disable = function()
|
||||
if lcpp.LCPP_LUA then
|
||||
-- activate LCPP_LUA actually does anything useful
|
||||
-- _G.loadstring = _G.loadstring_lcpp_backup
|
||||
end
|
||||
|
||||
if lcpp.LCPP_FFI and pcall(require, "ffi") then
|
||||
ffi = require("ffi")
|
||||
if ffi.lcpp_cdef_backup then
|
||||
ffi.cdef = ffi.lcpp_cdef_backup
|
||||
ffi.lcpp_cdef_backup = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- (re)enable lcpp processing for ffi, loadstring and such
|
||||
lcpp.enable = function()
|
||||
-- Use LCPP to process Lua code (load, loadfile, loadstring...)
|
||||
if lcpp.LCPP_LUA then
|
||||
-- TODO: make it properly work on all functions
|
||||
error("lcpp.LCPP_LUA = true -- not properly implemented yet");
|
||||
_G.loadstring_lcpp_backup = _G.loadstring
|
||||
_G.loadstring = function(str, chunk)
|
||||
return loadstring_lcpp_backup(lcpp.compile(str), chunk)
|
||||
end
|
||||
end
|
||||
-- Use LCPP as LuaJIT PreProcessor if used inside LuaJIT. i.e. Hook ffi.cdef
|
||||
if lcpp.LCPP_FFI and pcall(require, "ffi") then
|
||||
ffi = require("ffi")
|
||||
if not ffi.lcpp_cdef_backup then
|
||||
if not ffi.lcpp_defs then ffi.lcpp_defs = {} end -- defs are stored and reused
|
||||
ffi.lcpp = function(input)
|
||||
local output, state = lcpp.compile(input, ffi.lcpp_defs)
|
||||
ffi.lcpp_defs = state.defines
|
||||
return output
|
||||
end
|
||||
ffi.lcpp_cdef_backup = ffi.cdef
|
||||
ffi.cdef = function(input) return ffi.lcpp_cdef_backup(ffi.lcpp(input)) end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
lcpp.enable()
|
||||
return lcpp
|
BIN
thirdparty/bullet/build3/premake4.exe
vendored
Normal file
BIN
thirdparty/bullet/build3/premake4.exe
vendored
Normal file
Binary file not shown.
677
thirdparty/bullet/build3/premake4.lua
vendored
Normal file
677
thirdparty/bullet/build3/premake4.lua
vendored
Normal file
@ -0,0 +1,677 @@
|
||||
|
||||
solution "0_Bullet3Solution"
|
||||
|
||||
local osversion = os.getversion()
|
||||
print(string.format(" %d.%d.%d (%s)",
|
||||
osversion.majorversion, osversion.minorversion, osversion.revision,
|
||||
osversion.description))
|
||||
|
||||
if _ACTION == "vs2010" or _ACTION=="vs2008" then
|
||||
buildoptions
|
||||
{
|
||||
-- Multithreaded compiling
|
||||
"/MP",
|
||||
-- Disable a few useless warnings
|
||||
"/wd4244",
|
||||
"/wd4267"
|
||||
}
|
||||
end
|
||||
|
||||
act = ""
|
||||
|
||||
if _ACTION then
|
||||
act = _ACTION
|
||||
end
|
||||
|
||||
projectRootDir = os.getcwd() .. "/../"
|
||||
print("Project root directory: " .. projectRootDir);
|
||||
|
||||
newoption {
|
||||
trigger = "ios",
|
||||
description = "Enable iOS target (requires xcode4)"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_system_glx",
|
||||
description = "Try to link against system glx instead of using glad_glx (default)"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_system_opengl",
|
||||
description = "Try to link and use the system OpenGL headers version instead of dynamically loading OpenGL (dlopen is default)"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_openvr",
|
||||
description = "Enable experimental Virtual Reality examples, using OpenVR for HTC Vive and Oculus Rift"
|
||||
}
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_system_x11",
|
||||
description = "Try to link and use system X11 headers instead of dynamically loading X11 (dlopen is default)"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_stable_pd",
|
||||
description = "Enable Stable PD control in PyBullet"
|
||||
}
|
||||
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_static_vr_plugin",
|
||||
description = "Statically link vr plugin (in examples/SharedMemory/plugins/vrSyncPlugin)"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_physx",
|
||||
description = "Allow optional PhysX backend for PyBullet, use pybullet.connect(pybullet.PhysX)."
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "noopengl3",
|
||||
description = "Don't compile any OpenGL3+ code"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "midi",
|
||||
description = "Use Midi controller to control parameters"
|
||||
}
|
||||
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_egl",
|
||||
value = false,
|
||||
description = "Build an experimental eglPlugin"
|
||||
}
|
||||
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_grpc",
|
||||
description = "Build GRPC server/client features for PyBullet/BulletRobotics"
|
||||
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
default_grpc_include_dir = "usr/local/include/GRPC"
|
||||
default_grpc_lib_dir = "/usr/local/lib"
|
||||
default_protobuf_include_dir = "/usr/local/include/protobuf"
|
||||
default_protobuf_lib_dir = "/usr/local/lib"
|
||||
end
|
||||
|
||||
if os.is("macosx") then
|
||||
default_grpc_include_dir = "/usr/local/Cellar/grpc/1.14.1/include"
|
||||
default_grpc_lib_dir = "/usr/local/Cellar/grpc/1.14.1/lib"
|
||||
default_protobuf_include_dir = "/usr/local/Cellar/protobuf/3.6.0/include"
|
||||
default_protobuf_lib_dir = "/usr/local/Cellar/protobuf/3.6.0/lib"
|
||||
end
|
||||
|
||||
if os.is("Windows") then
|
||||
default_grpc_include_dir = projectRootDir .. "examples/ThirdPartyLibs/grpc/include"
|
||||
default_grpc_lib_dir = projectRootDir .. "examples/ThirdPartyLibs/grpc/lib"
|
||||
default_protobuf_include_dir =projectRootDir .. "examples/ThirdPartyLibs/grpc/include"
|
||||
default_protobuf_lib_dir = projectRootDir .. "examples/ThirdPartyLibs/grpc/lib"
|
||||
end
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "grpc_include_dir",
|
||||
value = default_grpc_include_dir,
|
||||
description = "(optional) GRPC include directory"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "grpc_lib_dir",
|
||||
value = default_grpc_lib_dir,
|
||||
description = "(optional) GRPC library directory "
|
||||
}
|
||||
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "protobuf_include_dir",
|
||||
value = default_protobuf_include_dir,
|
||||
description = "(optional) protobuf include directory"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "protobuf_lib_dir",
|
||||
value = default_protobuf_lib_dir,
|
||||
description = "(optional) protobuf library directory "
|
||||
}
|
||||
|
||||
|
||||
if not _OPTIONS["grpc_lib_dir"] then
|
||||
_OPTIONS["grpc_lib_dir"] = default_grpc_lib_dir
|
||||
end
|
||||
if not _OPTIONS["grpc_include_dir"] then
|
||||
_OPTIONS["grpc_include_dir"] = default_grpc_include_dir
|
||||
end
|
||||
if not _OPTIONS["protobuf_include_dir"] then
|
||||
_OPTIONS["protobuf_include_dir"] = default_protobuf_include_dir
|
||||
end
|
||||
|
||||
if not _OPTIONS["protobuf_lib_dir"] then
|
||||
_OPTIONS["protobuf_lib_dir"] = default_protobuf_lib_dir
|
||||
end
|
||||
|
||||
|
||||
if _OPTIONS["enable_egl"] then
|
||||
function initEGL()
|
||||
defines {"BT_USE_EGL"}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if _OPTIONS["enable_grpc"] then
|
||||
function initGRPC()
|
||||
|
||||
|
||||
print "BT_ENABLE_GRPC"
|
||||
|
||||
print("grpc_include_dir=")
|
||||
print(_OPTIONS["grpc_include_dir"])
|
||||
print("grpc_lib_dir=")
|
||||
print(_OPTIONS["grpc_lib_dir"])
|
||||
print("protobuf_include_dir=")
|
||||
print(_OPTIONS["protobuf_include_dir"])
|
||||
print("protobuf_lib_dir=")
|
||||
print(_OPTIONS["protobuf_lib_dir"])
|
||||
|
||||
defines {"BT_ENABLE_GRPC"}
|
||||
|
||||
if os.is("macosx") then
|
||||
buildoptions { "-std=c++11" }
|
||||
links{ "dl"}
|
||||
end
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions { "-std=c++11" }
|
||||
links{ "dl"}
|
||||
end
|
||||
|
||||
if os.is("Windows") then
|
||||
defines {"_WIN32_WINNT=0x0600"}
|
||||
links{ "zlibstatic","ssl","crypto"}
|
||||
end
|
||||
|
||||
includedirs {
|
||||
projectRootDir .. "examples", _OPTIONS["grpc_include_dir"], _OPTIONS["protobuf_include_dir"],
|
||||
}
|
||||
|
||||
if os.is("Windows") then
|
||||
configuration {"x64", "debug"}
|
||||
libdirs {_OPTIONS["grpc_lib_dir"] .. "/win64_debug" , _OPTIONS["protobuf_lib_dir"] .. "win64_debug",}
|
||||
configuration {"x86", "debug"}
|
||||
libdirs {_OPTIONS["grpc_lib_dir"] .. "/win32_debug" , _OPTIONS["protobuf_lib_dir"] .. "win32_debug",}
|
||||
configuration {"x64", "release"}
|
||||
libdirs {_OPTIONS["grpc_lib_dir"] .. "/win64_release", _OPTIONS["protobuf_lib_dir"] .. "win64_release",}
|
||||
configuration {"x86", "release"}
|
||||
libdirs {_OPTIONS["grpc_lib_dir"] .. "/win32_release" , _OPTIONS["protobuf_lib_dir"] .. "win32_release",}
|
||||
configuration{}
|
||||
|
||||
else
|
||||
libdirs {_OPTIONS["grpc_lib_dir"], _OPTIONS["protobuf_lib_dir"],}
|
||||
end
|
||||
|
||||
links { "grpc","grpc++", "grpc++_reflection", "gpr", "protobuf"}
|
||||
files {
|
||||
projectRootDir .. "examples/SharedMemory/grpc/ConvertGRPCBullet.cpp",
|
||||
projectRootDir .. "examples/SharedMemory/grpc/ConvertGRPCBullet.h",
|
||||
projectRootDir .. "examples/SharedMemory/grpc/proto/pybullet.grpc.pb.cpp",
|
||||
projectRootDir .. "examples/SharedMemory/grpc/proto/pybullet.grpc.pb.h",
|
||||
projectRootDir .. "examples/SharedMemory/grpc/proto/pybullet.pb.cpp",
|
||||
projectRootDir .. "examples/SharedMemory/grpc/proto/pybullet.pb.h", }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- _OPTIONS["midi"] = "1";
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "no-demos",
|
||||
description = "Don't build demos"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "no-extras",
|
||||
description = "Don't build Extras"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "standalone-examples",
|
||||
description = "Build standalone examples with reduced dependencies."
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "no-clsocket",
|
||||
description = "Disable clsocket and clsocket tests (used for optional TCP networking in pybullet and shared memory C-API)"
|
||||
}
|
||||
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "no-enet",
|
||||
description = "Disable enet and enet tests (used for optional UDP networking in pybullet and shared memory C-API)"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "lua",
|
||||
description = "Enable Lua scipting support in Example Browser"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_pybullet",
|
||||
description = "Enable high-level Python scripting of Bullet with URDF/SDF import and synthetic camera."
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
default_python_include_dir = "/usr/include/python2.7"
|
||||
default_python_lib_dir = "/usr/local/lib/"
|
||||
end
|
||||
|
||||
|
||||
if os.is("Windows") then
|
||||
default_python_include_dir = "C:/Python-3.5.2/include"
|
||||
default_python_lib_dir = "C:/Python-3.5.2/libs"
|
||||
end
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "python_include_dir",
|
||||
value = default_python_include_dir,
|
||||
description = "Python (2.x or 3.x) include directory"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "python_lib_dir",
|
||||
value = default_python_lib_dir,
|
||||
description = "Python (2.x or 3.x) library directory "
|
||||
}
|
||||
|
||||
|
||||
newoption {
|
||||
trigger = "targetdir",
|
||||
value = "path such as ../bin",
|
||||
description = "Set the output location for the generated project files"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "no-test",
|
||||
description = "Disable all tests"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "no-gtest",
|
||||
description = "Disable unit tests using gtest"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "no-bullet3",
|
||||
description = "Do not build bullet3 libs"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "double",
|
||||
description = "Double precision version of Bullet"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "clamp-velocities",
|
||||
description = "Limit maximum velocities to reduce FP exception risk"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "serial",
|
||||
description = "Enable serial, for testing the VR glove in C++"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "audio",
|
||||
description = "Enable audio"
|
||||
}
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_multithreading",
|
||||
description = "enable CPU multithreading for bullet2 libs"
|
||||
}
|
||||
if _OPTIONS["enable_multithreading"] then
|
||||
defines {"BT_THREADSAFE=1"}
|
||||
end
|
||||
if _OPTIONS["double"] then
|
||||
defines {"BT_USE_DOUBLE_PRECISION"}
|
||||
end
|
||||
if _OPTIONS["clamp-velocities"] then
|
||||
defines {"BT_CLAMP_VELOCITY_TO=9999"}
|
||||
end
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "dynamic-runtime",
|
||||
description = "Enable dynamic DLL CRT runtime"
|
||||
}
|
||||
configurations {"Release", "Debug"}
|
||||
configuration "Release"
|
||||
flags { "Optimize", "EnableSSE2", "NoMinimalRebuild", "FloatFast"}
|
||||
if not _OPTIONS["dynamic-runtime"] then
|
||||
flags { "StaticRuntime" }
|
||||
end
|
||||
configuration "Debug"
|
||||
defines {"_DEBUG=1"}
|
||||
flags { "Symbols" , "NoMinimalRebuild", "NoEditAndContinue" ,"FloatFast"}
|
||||
if not _OPTIONS["dynamic-runtime"] then
|
||||
flags { "StaticRuntime" }
|
||||
end
|
||||
|
||||
|
||||
if os.is("Linux") or os.is("macosx") then
|
||||
if os.is64bit() then
|
||||
platforms {"x64"}
|
||||
else
|
||||
platforms {"x32"}
|
||||
end
|
||||
else
|
||||
platforms {"x32","x64"}
|
||||
end
|
||||
|
||||
configuration {"x32"}
|
||||
targetsuffix ("_" .. act)
|
||||
configuration "x64"
|
||||
targetsuffix ("_" .. act .. "_64" )
|
||||
configuration {"x64", "debug"}
|
||||
targetsuffix ("_" .. act .. "_x64_debug")
|
||||
configuration {"x64", "release"}
|
||||
targetsuffix ("_" .. act .. "_x64_release" )
|
||||
configuration {"x32", "debug"}
|
||||
targetsuffix ("_" .. act .. "_debug" )
|
||||
|
||||
configuration{}
|
||||
|
||||
postfix=""
|
||||
|
||||
if _ACTION == "xcode4" then
|
||||
if _OPTIONS["ios"] then
|
||||
_OPTIONS["no-bullet3"] = "1"
|
||||
_OPTIONS["no-gtest"] = "1"
|
||||
|
||||
postfix = "ios";
|
||||
xcodebuildsettings
|
||||
{
|
||||
'INFOPLIST_FILE = "../../test/Bullet2/Info.plist"',
|
||||
'CODE_SIGN_IDENTITY = "iPhone Developer"',
|
||||
"SDKROOT = iphoneos",
|
||||
'ARCHS = "armv7"',
|
||||
'TARGETED_DEVICE_FAMILY = "1,2"',
|
||||
'VALID_ARCHS = "armv7"',
|
||||
}
|
||||
else
|
||||
xcodebuildsettings
|
||||
{
|
||||
'ARCHS = "$(ARCHS_STANDARD_64_BIT)"',
|
||||
'VALID_ARCHS = "x86_64"',
|
||||
-- 'SDKROOT = "macosx10.9"',
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
-- comment-out for now, URDF reader needs exceptions
|
||||
-- flags { "NoRTTI", "NoExceptions"}
|
||||
-- defines { "_HAS_EXCEPTIONS=0" }
|
||||
--printf ( _OPTIONS["targetdir"] )
|
||||
|
||||
targetdir( _OPTIONS["targetdir"] or "../bin" )
|
||||
location("./" .. act .. postfix)
|
||||
|
||||
|
||||
|
||||
if not _OPTIONS["python_include_dir"] then
|
||||
_OPTIONS["python_include_dir"] = default_python_include_dir
|
||||
end
|
||||
|
||||
if not _OPTIONS["python_lib_dir"] then
|
||||
_OPTIONS["python_lib_dir"] = default_python_lib_dir
|
||||
end
|
||||
|
||||
if os.is("Linux") then
|
||||
default_glfw_include_dir = "usr/local/include/GLFW"
|
||||
default_glfw_lib_dir = "/usr/local/lib/"
|
||||
default_glfw_lib_name = "glfw3"
|
||||
end
|
||||
|
||||
if os.is("macosx") then
|
||||
default_glfw_include_dir = "/usr/local/Cellar/glfw/3.2.1/include"
|
||||
default_glfw_lib_dir = "/usr/local/Cellar/glfw/3.2.1/lib"
|
||||
default_glfw_lib_name = "glfw"
|
||||
end
|
||||
|
||||
if os.is("Windows") then
|
||||
default_glfw_include_dir = "c:/glfw/include"
|
||||
default_glfw_lib_dir = "c:/glfw/lib"
|
||||
default_glfw_lib_name = "glfw3"
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
if not _OPTIONS["glfw_lib_dir"] then
|
||||
_OPTIONS["glfw_lib_dir"] = default_glfw_lib_dir
|
||||
end
|
||||
if not _OPTIONS["glfw_include_dir"] then
|
||||
_OPTIONS["glfw_include_dir"] = default_glfw_include_dir
|
||||
end
|
||||
if not _OPTIONS["glfw_lib_name"] then
|
||||
_OPTIONS["glfw_lib_name"] = default_glfw_lib_name
|
||||
end
|
||||
|
||||
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "glfw_include_dir",
|
||||
value = default_glfw_include_dir,
|
||||
description = "GLFW 3.x include directory"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "glfw_lib_name",
|
||||
value = default_glfw_lib_name,
|
||||
description = "GLFW 3.x library name (glfw, glfw3)"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "glfw_lib_dir",
|
||||
value = default_glfw_lib_dir,
|
||||
description = "(optional) GLFW 3.x library directory "
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "enable_glfw",
|
||||
value = false,
|
||||
description = "(optional) use GLFW 3.x library"
|
||||
}
|
||||
|
||||
if _OPTIONS["enable_glfw"] then
|
||||
defines {"B3_USE_GLFW"}
|
||||
|
||||
function initOpenGL()
|
||||
includedirs {
|
||||
projectRootDir .. "examples/ThirdPartyLibs/glad"
|
||||
}
|
||||
|
||||
includedirs {
|
||||
_OPTIONS["glfw_include_dir"],
|
||||
}
|
||||
|
||||
libdirs {
|
||||
_OPTIONS["glfw_lib_dir"]
|
||||
}
|
||||
links { _OPTIONS["glfw_lib_name"]}
|
||||
files { projectRootDir .. "examples/ThirdPartyLibs/glad/glad.c" }
|
||||
end
|
||||
function findOpenGL3()
|
||||
return true
|
||||
end
|
||||
function initGlew()
|
||||
end
|
||||
function initX11()
|
||||
links {"X11", "dl","pthread"}
|
||||
|
||||
end
|
||||
|
||||
else
|
||||
dofile ("findOpenGLGlewGlut.lua")
|
||||
if (not findOpenGL3()) then
|
||||
defines {"NO_OPENGL3"}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
dofile ("findOpenCL.lua")
|
||||
dofile ("findDirectX11.lua")
|
||||
|
||||
|
||||
|
||||
language "C++"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if _OPTIONS["audio"] then
|
||||
include "../examples/TinyAudio"
|
||||
end
|
||||
|
||||
if _OPTIONS["serial"] then
|
||||
include "../examples/ThirdPartyLibs/serial"
|
||||
end
|
||||
|
||||
if not _OPTIONS["no-demos"] then
|
||||
include "../examples/ExampleBrowser"
|
||||
include "../examples/RobotSimulator"
|
||||
include "../examples/OpenGLWindow"
|
||||
include "../examples/ThirdPartyLibs/Gwen"
|
||||
include "../examples/HelloWorld"
|
||||
include "../examples/SharedMemory"
|
||||
include "../examples/ThirdPartyLibs/BussIK"
|
||||
|
||||
if _OPTIONS["lua"] then
|
||||
include "../examples/ThirdPartyLibs/lua-5.2.3"
|
||||
end
|
||||
if _OPTIONS["enable_pybullet"] then
|
||||
include "../examples/pybullet"
|
||||
end
|
||||
include "../examples/SimpleOpenGL3"
|
||||
|
||||
if _OPTIONS["standalone-examples"] then
|
||||
|
||||
include "../examples/TinyRenderer"
|
||||
include "../examples/BasicDemo"
|
||||
include "../examples/InverseDynamics"
|
||||
include "../examples/ExtendedTutorials"
|
||||
include "../examples/MultiThreading"
|
||||
end
|
||||
|
||||
if not _OPTIONS["no-test"] then
|
||||
include "../test/SharedMemory"
|
||||
end
|
||||
end
|
||||
|
||||
if _OPTIONS["midi"] then
|
||||
include "../examples/ThirdPartyLibs/midi"
|
||||
end
|
||||
|
||||
if not _OPTIONS["no-clsocket"] then
|
||||
defines {"BT_ENABLE_CLSOCKET"}
|
||||
include "../examples/ThirdPartyLibs/clsocket"
|
||||
include "../test/clsocket"
|
||||
end
|
||||
|
||||
if not _OPTIONS["no-enet"] then
|
||||
defines {"BT_ENABLE_ENET"}
|
||||
|
||||
include "../examples/ThirdPartyLibs/enet"
|
||||
include "../test/enet/nat_punchthrough/client"
|
||||
include "../test/enet/nat_punchthrough/server"
|
||||
include "../test/enet/chat/client"
|
||||
include "../test/enet/chat/server"
|
||||
end
|
||||
|
||||
if _OPTIONS["no-bullet3"] then
|
||||
print "--no-bullet3 implies --no-demos"
|
||||
_OPTIONS["no-demos"] = "1"
|
||||
else
|
||||
include "../src/Bullet3Common"
|
||||
include "../src/Bullet3Geometry"
|
||||
include "../src/Bullet3Collision"
|
||||
include "../src/Bullet3Dynamics"
|
||||
include "../src/Bullet3OpenCL"
|
||||
include "../src/Bullet3Serialize/Bullet2FileLoader"
|
||||
end
|
||||
|
||||
if _OPTIONS["no-extras"] then
|
||||
print "--no-extras implies --no-demos"
|
||||
_OPTIONS["no-demos"] = "1"
|
||||
else
|
||||
include "../Extras"
|
||||
end
|
||||
|
||||
if not _OPTIONS["no-test"] then
|
||||
include "../test/Bullet2"
|
||||
|
||||
if not _OPTIONS["no-gtest"] then
|
||||
include "../test/gtest-1.7.0"
|
||||
-- include "../test/hello_gtest"
|
||||
include "../test/collision"
|
||||
include "../test/BulletDynamics/pendulum"
|
||||
if not _OPTIONS["no-bullet3"] then
|
||||
if not _OPTIONS["no-extras"] then
|
||||
include "../test/InverseDynamics"
|
||||
end
|
||||
include "../test/TestBullet3OpenCL"
|
||||
end
|
||||
if not _OPTIONS["no-demos"] then
|
||||
-- Gwen is only used for demos
|
||||
include "../test/GwenOpenGLTest"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
include "../src/BulletInverseDynamics"
|
||||
include "../src/BulletSoftBody"
|
||||
include "../src/BulletDynamics"
|
||||
include "../src/BulletCollision"
|
||||
include "../src/LinearMath"
|
||||
if _OPTIONS["enable_physx"] then
|
||||
include "../src/physx"
|
||||
end
|
||||
|
BIN
thirdparty/bullet/build3/premake4_arm64
vendored
Executable file
BIN
thirdparty/bullet/build3/premake4_arm64
vendored
Executable file
Binary file not shown.
BIN
thirdparty/bullet/build3/premake4_linux
vendored
Executable file
BIN
thirdparty/bullet/build3/premake4_linux
vendored
Executable file
Binary file not shown.
BIN
thirdparty/bullet/build3/premake4_linux64
vendored
Executable file
BIN
thirdparty/bullet/build3/premake4_linux64
vendored
Executable file
Binary file not shown.
BIN
thirdparty/bullet/build3/premake4_osx
vendored
Executable file
BIN
thirdparty/bullet/build3/premake4_osx
vendored
Executable file
Binary file not shown.
BIN
thirdparty/bullet/build3/premake4_osx32
vendored
Executable file
BIN
thirdparty/bullet/build3/premake4_osx32
vendored
Executable file
Binary file not shown.
BIN
thirdparty/bullet/build3/premake5.exe
vendored
Normal file
BIN
thirdparty/bullet/build3/premake5.exe
vendored
Normal file
Binary file not shown.
67
thirdparty/bullet/build3/stringify.bat
vendored
Normal file
67
thirdparty/bullet/build3/stringify.bat
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
|
||||
rem @echo off
|
||||
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/RadixSort32Kernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/RadixSort32KernelsCL.h" --stringname="radixSort32KernelsCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/BoundSearchKernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/BoundSearchKernelsCL.h" --stringname="boundSearchKernelsCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/PrefixScanKernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/PrefixScanKernelsCL.h" --stringname="prefixScanKernelsCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/PrefixScanFloat4Kernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/PrefixScanKernelsFloat4CL.h" --stringname="prefixScanKernelsFloat4CL" stringify
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/FillKernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/FillKernelsCL.h" --stringname="fillKernelsCL" stringify
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/sap.cl" --headerfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/sapKernels.h" --stringname="sapCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/sapFast.cl" --headerfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/sapFastKernels.h" --stringname="sapFastCL" stringify
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/gridBroadphase.cl" --headerfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/gridBroadphaseKernels.h" --stringname="gridBroadphaseCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/parallelLinearBvh.cl" --headerfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/parallelLinearBvhKernels.h" --stringname="parallelLinearBvhCL" stringify
|
||||
|
||||
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/sat.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satKernels.h" --stringname="satKernelsCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satConcave.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satConcaveKernels.h" --stringname="satConcaveKernelsCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/mpr.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/mprKernels.h" --stringname="mprKernelsCL" stringify
|
||||
|
||||
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satClipHullContacts.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satClipHullContacts.h" --stringname="satClipKernelsCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/primitiveContacts.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/primitiveContacts.h" --stringname="primitiveContactsKernelsCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/bvhTraversal.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/bvhTraversal.h" --stringname="bvhTraversalKernelCL" stringify
|
||||
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/integrateKernel.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/integrateKernel.h" --stringname="integrateKernelCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/updateAabbsKernel.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/updateAabbsKernel.h" --stringname="updateAabbsKernelCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solverSetup.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solverSetup.h" --stringname="solverSetupCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solverSetup2.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solverSetup2.h" --stringname="solverSetup2CL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/batchingKernels.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/batchingKernels.h" --stringname="batchingKernelsCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/batchingKernelsNew.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/batchingKernelsNew.h" --stringname="batchingKernelsNewCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solverUtils.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solverUtils.h" --stringname="solverUtilsCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solveContact.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solveContact.h" --stringname="solveContactCL" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solveFriction.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solveFriction.h" --stringname="solveFrictionCL" stringify
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/jointSolver.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/jointSolver.h" --stringname="solveConstraintRowsCL" stringify
|
||||
|
||||
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/Raycast/kernels/rayCastKernels.cl" --headerfile="../src/Bullet3OpenCL/Raycast/kernels/rayCastKernels.h" --stringname="rayCastKernelCL" stringify
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/instancingVS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/instancingVS.h" --stringname="instancingVertexShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/instancingPS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/instancingPS.h" --stringname="instancingFragmentShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/pointSpriteVS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/pointSpriteVS.h" --stringname="pointSpriteVertexShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/pointSpritePS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/pointSpritePS.h" --stringname="pointSpriteFragmentShader" stringify
|
||||
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/createShadowMapInstancingPS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/createShadowMapInstancingPS.h" --stringname="createShadowMapInstancingFragmentShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/createShadowMapInstancingVS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/createShadowMapInstancingVS.h" --stringname="createShadowMapInstancingVertexShader" stringify
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingPS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingPS.h" --stringname="useShadowMapInstancingFragmentShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingVS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingVS.h" --stringname="useShadowMapInstancingVertexShader" stringify
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/projectiveTextureInstancingPS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/projectiveTextureInstancingPS.h" --stringname="projectiveTextureInstancingFragmentShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/projectiveTextureInstancingVS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/projectiveTextureInstancingVS.h" --stringname="projectiveTextureInstancingVertexShader" stringify
|
||||
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../Demos3/GpuDemos/broadphase/pairsKernel.cl" --headerfile="../Demos3/GpuDemos/broadphase/pairsKernel.h" --stringname="pairsKernelsCL" stringify
|
||||
|
||||
|
||||
|
||||
pause
|
70
thirdparty/bullet/build3/stringify.sh
vendored
Executable file
70
thirdparty/bullet/build3/stringify.sh
vendored
Executable file
@ -0,0 +1,70 @@
|
||||
#!/bin/sh
|
||||
unamestr=`uname`
|
||||
|
||||
if [ $unamestr = 'Linux' ]; then
|
||||
echo "Using Linux"
|
||||
mypremake="./premake4_linux64"
|
||||
else
|
||||
echo "Assuming Mac OSX"
|
||||
mypremake="./premake4_osx"
|
||||
fi
|
||||
|
||||
#rem @echo off
|
||||
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/RadixSort32Kernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/RadixSort32KernelsCL.h" --stringname="radixSort32KernelsCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/BoundSearchKernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/BoundSearchKernelsCL.h" --stringname="boundSearchKernelsCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/PrefixScanKernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/PrefixScanKernelsCL.h" --stringname="prefixScanKernelsCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/PrefixScanFloat4Kernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/PrefixScanKernelsFloat4CL.h" --stringname="prefixScanKernelsFloat4CL" stringify'
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/FillKernels.cl" --headerfile="../src/Bullet3OpenCL/ParallelPrimitives/kernels/FillKernelsCL.h" --stringname="fillKernelsCL" stringify'
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/sap.cl" --headerfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/sapKernels.h" --stringname="sapCL" stringify'
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/gridBroadphase.cl" --headerfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/gridBroadphaseKernels.h" --stringname="gridBroadphaseCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/parallelLinearBvh.cl" --headerfile="../src/Bullet3OpenCL/BroadphaseCollision/kernels/parallelLinearBvhKernels.h" --stringname="parallelLinearBvhCL" stringify'
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/sat.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satKernels.h" --stringname="satKernelsCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satConcave.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satConcaveKernels.h" --stringname="satConcaveKernelsCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/mpr.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/mprKernels.h" --stringname="mprKernelsCL" stringify'
|
||||
|
||||
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satClipHullContacts.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/satClipHullContacts.h" --stringname="satClipKernelsCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/primitiveContacts.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/primitiveContacts.h" --stringname="primitiveContactsKernelsCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/bvhTraversal.cl" --headerfile="../src/Bullet3OpenCL/NarrowphaseCollision/kernels/bvhTraversal.h" --stringname="bvhTraversalKernelCL" stringify'
|
||||
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/integrateKernel.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/integrateKernel.h" --stringname="integrateKernelCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/updateAabbsKernel.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/updateAabbsKernel.h" --stringname="updateAabbsKernelCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solverSetup.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solverSetup.h" --stringname="solverSetupCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solverSetup2.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solverSetup2.h" --stringname="solverSetup2CL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/batchingKernels.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/batchingKernels.h" --stringname="batchingKernelsCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/batchingKernelsNew.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/batchingKernelsNew.h" --stringname="batchingKernelsNewCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solverUtils.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solverUtils.h" --stringname="solverUtilsCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solveContact.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solveContact.h" --stringname="solveContactCL" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/solveFriction.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/solveFriction.h" --stringname="solveFrictionCL" stringify'
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/RigidBody/kernels/jointSolver.cl" --headerfile="../src/Bullet3OpenCL/RigidBody/kernels/jointSolver.h" --stringname="solveConstraintRowsCL" stringify'
|
||||
|
||||
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../src/Bullet3OpenCL/Raycast/kernels/rayCastKernels.cl" --headerfile="../src/Bullet3OpenCL/Raycast/kernels/rayCastKernels.h" --stringname="rayCastKernelCL" stringify'
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/instancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/instancingVS.h" --stringname="instancingVertexShader" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/instancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/instancingPS.h" --stringname="instancingFragmentShader" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/pointSpriteVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/pointSpriteVS.h" --stringname="pointSpriteVertexShader" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/pointSpritePS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/pointSpritePS.h" --stringname="pointSpriteFragmentShader" stringify'
|
||||
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingPS.h" --stringname="createShadowMapInstancingFragmentShader" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingVS.h" --stringname="createShadowMapInstancingVertexShader" stringify'
|
||||
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.h" --stringname="useShadowMapInstancingFragmentShader" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.h" --stringname="useShadowMapInstancingVertexShader" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingPS.h" --stringname="projectiveTextureInstancingFragmentShader" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingVS.h" --stringname="projectiveTextureInstancingVertexShader" stringify'
|
||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenCL/broadphase/pairsKernel.cl" --headerfile="../examples/OpenCL/broadphase/pairsKernel.h" --stringname="pairsKernelsCL" stringify'
|
||||
|
||||
|
||||
|
98
thirdparty/bullet/build3/stringifyKernel.lua
vendored
Normal file
98
thirdparty/bullet/build3/stringifyKernel.lua
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
|
||||
|
||||
function stringifyKernel(filenameIn, filenameOut, kernelMethod)
|
||||
local BUFSIZE = 10*1024*1024 -- 10MB
|
||||
local f = io.open(filenameIn,"r");
|
||||
local fw = io.open(filenameOut,"w");
|
||||
fw:write("//this file is autogenerated using stringify.bat (premake --stringify) in the build folder of this project\n")
|
||||
fw:write("static const char* " .. kernelMethod .. "= \\\n")
|
||||
local cc, lc, wc = 0, 0, 0 -- char, line, and word counts
|
||||
while true do
|
||||
local lines, rest = f:read(BUFSIZE, "*line")
|
||||
if not lines then break end
|
||||
|
||||
local i = 0
|
||||
local startpos = 0
|
||||
local slen = string.len(lines)
|
||||
local endpos = 0
|
||||
while true do
|
||||
i = string.find(lines, "\n", i+1) -- find 'next' newline
|
||||
if i == nil then
|
||||
endpos = slen
|
||||
else
|
||||
endpos = i
|
||||
end
|
||||
|
||||
oneline = string.sub(lines,startpos,endpos)
|
||||
oneline = string.gsub(oneline,"\n","")
|
||||
oneline = string.gsub(oneline,"\"","\\\"");
|
||||
oneline = '\"' .. oneline .. '\\n\"'
|
||||
oneline = string.gsub(oneline,"\\\\n","")
|
||||
oneline = oneline .. "\n"
|
||||
--print(oneline)
|
||||
fw:write(oneline);
|
||||
|
||||
if i == nil then break end
|
||||
startpos = i+1
|
||||
end
|
||||
|
||||
if rest then lines = lines .. rest .. '\n' end
|
||||
cc = cc + string.len(lines)
|
||||
-- count words in the chunk
|
||||
local _,t = string.gsub(lines, "%S+", "")
|
||||
wc = wc + t
|
||||
-- count newlines in the chunk
|
||||
_,t = string.gsub(lines, "\n", "\n")
|
||||
lc = lc + t
|
||||
end
|
||||
--print("stringified " .. filenameIn .. " into " .. filenameOut .. " processed " .. lc .. " lines")
|
||||
print(filenameIn .. " (" .. lc .. " lines)")
|
||||
|
||||
f:close()
|
||||
fw:write(";\n")
|
||||
fw:close()
|
||||
end
|
||||
|
||||
|
||||
|
||||
function preprocessKernel(kernelfile, filenameOut, kernelMethod)
|
||||
lcpp=require('lcpp');
|
||||
local out=lcpp.compileFile(kernelfile);
|
||||
local embedFileName = kernelfile .. ".embed"
|
||||
local fw = io.open(embedFileName,"w");
|
||||
fw:write(out)
|
||||
fw:close()
|
||||
stringifyKernel(embedFileName,filenameOut, kernelMethod);
|
||||
end
|
||||
|
||||
|
||||
newoption {
|
||||
trigger = "kernelfile",
|
||||
value = "kernelpath",
|
||||
description = "full path to the kernel source input file"
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "headerfile",
|
||||
value = "path",
|
||||
description = "full path to the header output file"
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "stringname",
|
||||
value = "var",
|
||||
description = "name of the kernel string variable"
|
||||
}
|
||||
|
||||
|
||||
|
||||
newaction {
|
||||
trigger = "stringify",
|
||||
description = "stringify kernels source code into strings",
|
||||
execute = function()
|
||||
preprocessKernel( _OPTIONS["kernelfile"] , _OPTIONS["headerfile"], _OPTIONS["stringname"])
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
|
27
thirdparty/bullet/build3/stringifyShaders.bat
vendored
Normal file
27
thirdparty/bullet/build3/stringifyShaders.bat
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
rem @echo off
|
||||
|
||||
|
||||
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/segmentationMaskInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/segmentationMaskInstancingVS.h" --stringname="segmentationMaskInstancingVertexShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/segmentationMaskInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/segmentationMaskInstancingPS.h" --stringname="segmentationMaskInstancingFragmentShader" stringify
|
||||
|
||||
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/instancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/instancingVS.h" --stringname="instancingVertexShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/instancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/instancingPS.h" --stringname="instancingFragmentShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/pointSpriteVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/pointSpriteVS.h" --stringname="pointSpriteVertexShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/pointSpritePS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/pointSpritePS.h" --stringname="pointSpriteFragmentShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingPS.h" --stringname="createShadowMapInstancingFragmentShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingVS.h" --stringname="createShadowMapInstancingVertexShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.h" --stringname="useShadowMapInstancingFragmentShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.h" --stringname="useShadowMapInstancingVertexShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingPS.h" --stringname="projectiveTextureInstancingFragmentShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingVS.h" --stringname="projectiveTextureInstancingVertexShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/linesVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/linesVS.h" --stringname="linesVertexShader" stringify
|
||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/linesPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/linesPS.h" --stringname="linesFragmentShader" stringify
|
||||
|
||||
|
||||
|
||||
|
||||
pause
|
27
thirdparty/bullet/build_cmake_pybullet_double.sh
vendored
Executable file
27
thirdparty/bullet/build_cmake_pybullet_double.sh
vendored
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -e CMakeCache.txt ]; then
|
||||
rm CMakeCache.txt
|
||||
fi
|
||||
mkdir -p build_cmake
|
||||
cd build_cmake
|
||||
cmake -DBUILD_PYBULLET=ON -DBUILD_PYBULLET_NUMPY=ON -DUSE_DOUBLE_PRECISION=ON -DBT_USE_EGL=ON -DCMAKE_BUILD_TYPE=Release .. || exit 1
|
||||
make -j $(command nproc 2>/dev/null || echo 12) || exit 1
|
||||
cd examples
|
||||
cd pybullet
|
||||
if [ -e pybullet.dylib ]; then
|
||||
ln -f -s pybullet.dylib pybullet.so
|
||||
fi
|
||||
if [ -e pybullet_envs ]; then
|
||||
rm pybullet_envs
|
||||
fi
|
||||
if [ -e pybullet_data ]; then
|
||||
rm pybullet_data
|
||||
fi
|
||||
if [ -e pybullet_utils ]; then
|
||||
rm pybullet_utils
|
||||
fi
|
||||
ln -s ../../../examples/pybullet/gym/pybullet_envs .
|
||||
ln -s ../../../examples/pybullet/gym/pybullet_data .
|
||||
ln -s ../../../examples/pybullet/gym/pybullet_utils .
|
||||
echo "Completed build of Bullet."
|
28
thirdparty/bullet/build_visual_studio_vr_pybullet_double.bat
vendored
Normal file
28
thirdparty/bullet/build_visual_studio_vr_pybullet_double.bat
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
IF NOT EXIST bin mkdir bin
|
||||
IF NOT EXIST bin\openvr_api.dll copy examples\ThirdPartyLibs\openvr\bin\win32\openvr_api.dll bin
|
||||
IF NOT EXIST bin\openvr64pi.dll copy examples\ThirdPartyLibs\openvr\bin\win64\openvr_api.dll bin\openvr64pi.dll
|
||||
|
||||
#aargh, see https://github.com/ValveSoftware/openvr/issues/412
|
||||
|
||||
|
||||
#find a python version (hopefully just 1) and use this
|
||||
dir c:\python* /b /ad > tmp1234.txt
|
||||
|
||||
set /p myvar1= < tmp1234.txt
|
||||
set myvar=c:/%myvar1%
|
||||
del tmp1234.txt
|
||||
|
||||
rem you can also override and hardcode the Python path like this (just remove the # hashmark in next line)
|
||||
rem SET myvar=c:\python-3.5.2
|
||||
|
||||
cd build3
|
||||
|
||||
|
||||
premake4 --double --enable_stable_pd --enable_multithreading --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
||||
|
||||
rem premake4 --double --enable_multithreading --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../binserver" vs2010
|
||||
rem premake4 --double --enable_grpc --enable_multithreading --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../binserver" vs2010
|
||||
rem premake4 --serial --audio --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
||||
|
||||
start vs2010
|
||||
|
4
thirdparty/bullet/build_visual_studio_vr_pybullet_double_cmake.bat
vendored
Normal file
4
thirdparty/bullet/build_visual_studio_vr_pybullet_double_cmake.bat
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
mkdir build_cmake
|
||||
cd build_cmake
|
||||
cmake -DBUILD_PYBULLET=ON -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release -DPYTHON_INCLUDE_DIR=c:\python-3.5.3.amd64\include -DPYTHON_LIBRARY=c:\python-3.5.3.amd64\libs\python35.lib -DPYTHON_DEBUG_LIBRARY=c:\python-3.5.3.amd64\libs\python35_d.lib -G "Visual Studio 16 2019" ..
|
||||
start .
|
28
thirdparty/bullet/build_visual_studio_vr_pybullet_double_dynamic.bat
vendored
Normal file
28
thirdparty/bullet/build_visual_studio_vr_pybullet_double_dynamic.bat
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
IF NOT EXIST bin mkdir bin
|
||||
IF NOT EXIST bin\openvr_api.dll copy examples\ThirdPartyLibs\openvr\bin\win32\openvr_api.dll bin
|
||||
IF NOT EXIST bin\openvr64pi.dll copy examples\ThirdPartyLibs\openvr\bin\win64\openvr_api.dll bin\openvr64pi.dll
|
||||
|
||||
#aargh, see https://github.com/ValveSoftware/openvr/issues/412
|
||||
|
||||
|
||||
#find a python version (hopefully just 1) and use this
|
||||
dir c:\python* /b /ad > tmp1234.txt
|
||||
|
||||
set /p myvar1= < tmp1234.txt
|
||||
set myvar=c:/%myvar1%
|
||||
del tmp1234.txt
|
||||
|
||||
rem you can also override and hardcode the Python path like this (just remove the # hashmark in next line)
|
||||
rem SET myvar=c:\python-3.5.2
|
||||
|
||||
cd build3
|
||||
|
||||
|
||||
premake4 --dynamic-runtime --double --standalone-examples --enable_stable_pd --enable_multithreading --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
||||
|
||||
rem premake4 --double --enable_multithreading --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../binserver" vs2010
|
||||
rem premake4 --double --enable_grpc --enable_multithreading --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../binserver" vs2010
|
||||
rem premake4 --serial --audio --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
||||
|
||||
start vs2010
|
||||
|
3
thirdparty/bullet/build_visual_studio_without_pybullet_vr.bat
vendored
Normal file
3
thirdparty/bullet/build_visual_studio_without_pybullet_vr.bat
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
cd build3
|
||||
premake5 --targetdir="../bin" vs2010
|
||||
start vs2010
|
11
thirdparty/bullet/bullet.pc.cmake
vendored
Normal file
11
thirdparty/bullet/bullet.pc.cmake
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/@LIB_DESTINATION@
|
||||
includedir=${prefix}/@INCLUDE_INSTALL_DIR@
|
||||
|
||||
Name: bullet
|
||||
Description: Bullet Continuous Collision Detection and Physics Library
|
||||
Version: @BULLET_VERSION@
|
||||
Requires:
|
||||
Libs: -L${libdir} -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath
|
||||
Cflags: @BULLET_DOUBLE_DEF@ -I${includedir} -I${prefix}/include
|
84
thirdparty/bullet/clang-format-all.sh
vendored
Executable file
84
thirdparty/bullet/clang-format-all.sh
vendored
Executable file
@ -0,0 +1,84 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# clang-format-all: a tool to run clang-format on an entire project
|
||||
# Copyright (C) 2016 Evan Klitzke <evan@eklitzke.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
function usage {
|
||||
echo "Usage: $0 DIR..."
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Variable that will hold the name of the clang-format command
|
||||
FMT=""
|
||||
|
||||
# Some distros just call it clang-format. Others (e.g. Ubuntu) are insistent
|
||||
# that the version number be part of the command. We prefer clang-format if
|
||||
# that's present, otherwise we work backwards from highest version to lowest
|
||||
# version.
|
||||
for clangfmt in clang-format{,-{4,3}.{9,8,7,6,5,4,3,2,1,0}}; do
|
||||
if which "$clangfmt" &>/dev/null; then
|
||||
FMT="$clangfmt"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Check if we found a working clang-format
|
||||
if [ -z "$FMT" ]; then
|
||||
echo "failed to find clang-format"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check all of the arguments first to make sure they're all directories
|
||||
for dir in "$@"; do
|
||||
if [ ! -d "${dir}" ]; then
|
||||
echo "${dir} is not a directory"
|
||||
usage
|
||||
fi
|
||||
done
|
||||
|
||||
# Find a dominating file, starting from a given directory and going up.
|
||||
find-dominating-file() {
|
||||
if [ -r "$1"/"$2" ]; then
|
||||
return 0
|
||||
fi
|
||||
if [ "$1" = "/" ]; then
|
||||
return 1
|
||||
fi
|
||||
find-dominating-file "$(realpath "$1"/..)" "$2"
|
||||
return $?
|
||||
}
|
||||
|
||||
# Run clang-format -i on all of the things
|
||||
for dir in "$@"; do
|
||||
pushd "${dir}" &>/dev/null
|
||||
if ! find-dominating-file . _clang-format; then
|
||||
echo "Failed to find dominating .clang-format starting at $PWD"
|
||||
continue
|
||||
fi
|
||||
find . \
|
||||
\( -name '*.c' \
|
||||
-o -name '*.cc' \
|
||||
-o -name '*.cpp' \
|
||||
-o -name '*.h' \
|
||||
-o -name '*.hh' \
|
||||
-o -name '*.hpp' \) \
|
||||
-exec "${FMT}" -i -verbose '{}' \;
|
||||
popd &>/dev/null
|
||||
done
|
32006
thirdparty/bullet/data/32006GPUAABBs.txt
vendored
Normal file
32006
thirdparty/bullet/data/32006GPUAABBs.txt
vendored
Normal file
File diff suppressed because it is too large
Load Diff
64006
thirdparty/bullet/data/64006GPUAABBs.txt
vendored
Normal file
64006
thirdparty/bullet/data/64006GPUAABBs.txt
vendored
Normal file
File diff suppressed because it is too large
Load Diff
65
thirdparty/bullet/data/Base_1.urdf
vendored
Normal file
65
thirdparty/bullet/data/Base_1.urdf
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--https://valerolab.org/-->
|
||||
<!--
|
||||
Code used for PID control of an inverted pendulum actuated by strings.
|
||||
-->
|
||||
<robot name="myfirst">
|
||||
<material name="blue">
|
||||
<color rgba="0 0 0.8 1"/>
|
||||
</material>
|
||||
<material name="white">
|
||||
<color rgba="1 1 1 1"/>
|
||||
</material>
|
||||
<material name="other">
|
||||
<color rgba="1 0 0.8 1"/>
|
||||
</material>
|
||||
<velocity name="vel">
|
||||
<speed spd="50"/>
|
||||
</velocity>
|
||||
|
||||
|
||||
<link name="Base">
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size="0.3 0.3 1.5"/>
|
||||
</geometry>
|
||||
<material name="other"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size="0.3 0.3 1.5"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="100"/>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<link name="pulley1">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".5"/>
|
||||
</geometry>
|
||||
<material name="blue"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".5"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="2"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="Base_pulley1" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="Base"/>
|
||||
<child link="pulley1"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="-1.57075 0 0" xyz="0 .35 .15"/>
|
||||
</joint>
|
||||
<!---->
|
||||
</robot>
|
415
thirdparty/bullet/data/Base_2.urdf
vendored
Normal file
415
thirdparty/bullet/data/Base_2.urdf
vendored
Normal file
@ -0,0 +1,415 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--https://valerolab.org/-->
|
||||
<!--
|
||||
Code used for PID control of an inverted pendulum actuated by strings.
|
||||
-->
|
||||
<robot name="myfirst">
|
||||
<material name="blue">
|
||||
<color rgba="0 0 0.8 1"/>
|
||||
</material>
|
||||
<material name="white">
|
||||
<color rgba="1 1 1 1"/>
|
||||
</material>
|
||||
<material name="other">
|
||||
<color rgba="1 0 0.8 1"/>
|
||||
</material>
|
||||
<velocity name="vel">
|
||||
<speed spd="50"/>
|
||||
</velocity>
|
||||
|
||||
|
||||
<link name="Base">
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size="0.3 0.3 1.5"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size="0.3 0.3 1.5"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="100"/>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<link name="pulley1">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".5"/>
|
||||
</geometry>
|
||||
<material name="blue"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".5"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="2"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="Base_pulley1" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="Base"/>
|
||||
<child link="pulley1"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="-1.57075 1.57075 0" xyz="0 .35 .15"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_1">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="blue"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="pulley1_tendon1_1" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="pulley1"/>
|
||||
<child link="tendon1_1"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 3.1416" xyz="0 .55 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_2">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_1_tendon1_2" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_1"/>
|
||||
<child link="tendon1_2"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_3">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_2_tendon1_3" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_2"/>
|
||||
<child link="tendon1_3"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_4">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_3_tendon1_4" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_3"/>
|
||||
<child link="tendon1_4"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 1" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_5">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_4_tendon1_5" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_4"/>
|
||||
<child link="tendon1_5"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 1" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_6">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_5_tendon1_6" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_5"/>
|
||||
<child link="tendon1_6"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_7">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_6_tendon1_7" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_6"/>
|
||||
<child link="tendon1_7"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_8">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_7_tendon1_8" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_7"/>
|
||||
<child link="tendon1_8"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_9">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_8_tendon1_9" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_8"/>
|
||||
<child link="tendon1_9"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_10">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_9_tendon1_10" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_9"/>
|
||||
<child link="tendon1_10"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_11">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_10_tendon1_11" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_10"/>
|
||||
<child link="tendon1_11"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_12">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_11_tendon1_12" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_11"/>
|
||||
<child link="tendon1_12"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_13">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_12_tendon1_13" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_12"/>
|
||||
<child link="tendon1_13"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
<link name="tendon1_14">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius=".05"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="tendon1_13_tendon1_14" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="tendon1_13"/>
|
||||
<child link="tendon1_14"/>
|
||||
<limit effort="0" lower="1" upper="0" velocity="50"/>
|
||||
<origin rpy="0 0 0" xyz=".2 0 0"/>
|
||||
</joint>
|
||||
|
||||
</robot>
|
BIN
thirdparty/bullet/data/BspDemo.bsp
vendored
Normal file
BIN
thirdparty/bullet/data/BspDemo.bsp
vendored
Normal file
Binary file not shown.
15
thirdparty/bullet/data/LICENSE.txt
vendored
Normal file
15
thirdparty/bullet/data/LICENSE.txt
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
URDF files in this directory were created by Erwin Coumans
|
||||
Check the subdirectories for various license files.
|
||||
|
||||
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.
|
19
thirdparty/bullet/data/MPL/LICENSE.txt
vendored
Normal file
19
thirdparty/bullet/data/MPL/LICENSE.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<!--
|
||||
This file and the .stl mesh files referenced from it have been derived by Roboti LLC from the model of the Modular Prosthetic Limb developed by The Johns Hopkins University / Applied Physics Laboratory. The modifications are as follows: the original meshes have been replaced with their convex hulls; the original URDF model has been converted to the MJCF format and a number of MJCF-specific fields have been added.
|
||||
|
||||
The Johns Hopkins University / Applied Physics Laboratory has given Roboti LLC permission to distribute the modified model under the following license:
|
||||
|
||||
=========================
|
||||
|
||||
(C) 2013 The Johns Hopkins University / Applied Physics Laboratory All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
========================
|
||||
|
||||
The modifications made by Roboti LLC are also licensed under the Apache License version 2.0.
|
||||
-->
|
473
thirdparty/bullet/data/MPL/MPL.xml
vendored
Normal file
473
thirdparty/bullet/data/MPL/MPL.xml
vendored
Normal file
@ -0,0 +1,473 @@
|
||||
<mujoco model="MPL">
|
||||
<!--
|
||||
This file and the .stl mesh files referenced from it have been derived by Roboti LLC from the model of the Modular Prosthetic Limb developed by The Johns Hopkins University / Applied Physics Laboratory. The modifications are as follows: the original meshes have been replaced with their convex hulls; the original URDF model has been converted to the MJCF format and a number of MJCF-specific fields have been added.
|
||||
|
||||
The Johns Hopkins University / Applied Physics Laboratory has given Roboti LLC permission to distribute the modified model under the following license:
|
||||
|
||||
=========================
|
||||
|
||||
(C) 2013 The Johns Hopkins University / Applied Physics Laboratory All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
========================
|
||||
|
||||
The modifications made by Roboti LLC are also licensed under the Apache License version 2.0.
|
||||
-->
|
||||
|
||||
<compiler angle="radian" meshdir="mesh/" texturedir="texture/"/>
|
||||
<option timestep="0.002" iterations="50" apirate="50"/>
|
||||
<size njmax="600" nconmax="150" nstack="300000"/>
|
||||
|
||||
<default>
|
||||
<default class="MPL">
|
||||
<geom material="MatMesh" contype="1" conaffinity="1" condim="4" margin="0.001"/>
|
||||
<joint limited="true" damping="0.2" armature=".01"/>
|
||||
<site material="MatTouch" type="ellipsoid" group="3"/>
|
||||
<position ctrllimited="true" kp="10"/>
|
||||
</default>
|
||||
|
||||
<default class="IMU">
|
||||
<site material="MatIMU" type="box" group="4"/>
|
||||
</default>
|
||||
|
||||
<default class="free">
|
||||
<joint type="free" damping="0" armature="0" limited="false"/>
|
||||
</default>
|
||||
</default>
|
||||
|
||||
<statistic extent="1" center="0 -0.2 0.2"/>
|
||||
|
||||
<visual>
|
||||
<quality shadowsize="2048"/>
|
||||
<map fogstart="6" fogend="10"/>
|
||||
<headlight diffuse=".6 .6 .6" specular="0 0 0"/>
|
||||
</visual>
|
||||
|
||||
<asset>
|
||||
<mesh name="index0" file="index0_collision.stl"/>
|
||||
<mesh name="index1" file="index1_collision.stl"/>
|
||||
<mesh name="index2" file="index2_collision.stl"/>
|
||||
<mesh name="index3" file="index3_collision.stl"/>
|
||||
<mesh name="middle0" file="middle0_collision.stl"/>
|
||||
<mesh name="middle1" file="middle1_collision.stl"/>
|
||||
<mesh name="middle2" file="middle2_collision.stl"/>
|
||||
<mesh name="middle3" file="middle3_collision.stl"/>
|
||||
<mesh name="palm" file="palm.stl"/>
|
||||
<mesh name="pinky0" file="pinky0_collision.stl"/>
|
||||
<mesh name="pinky1" file="pinky1_collision.stl"/>
|
||||
<mesh name="pinky2" file="pinky2_collision.stl"/>
|
||||
<mesh name="pinky3" file="pinky3_collision.stl"/>
|
||||
<mesh name="ring0" file="ring0_collision.stl"/>
|
||||
<mesh name="ring1" file="ring1_collision.stl"/>
|
||||
<mesh name="ring2" file="ring2_collision.stl"/>
|
||||
<mesh name="ring3" file="ring3_collision.stl"/>
|
||||
<mesh name="thumb0" file="thumb0_collision.stl"/>
|
||||
<mesh name="thumb1" file="thumb1_collision.stl"/>
|
||||
<mesh name="thumb2" file="thumb2_collision.stl"/>
|
||||
<mesh name="thumb3" file="thumb3_collision.stl"/>
|
||||
<mesh name="wristx" file="wristx_collision.stl"/>
|
||||
<mesh name="wristy" file="wristy_collision.stl"/>
|
||||
<mesh name="wristz" file="wristz_collision.stl"/>
|
||||
|
||||
<texture type="skybox" builtin="gradient" rgb1=".4 .6 .8" rgb2="0 0 0"
|
||||
width="100" height="100"/>
|
||||
<texture name="groundplane" type="2d" builtin="checker" rgb1=".2 .3 .4" rgb2=".1 .2 .3"
|
||||
width="100" height="100"/>
|
||||
<texture name="skin" type="cube" file="skin.png"/>
|
||||
<texture name="marble2d" type="2d" file="marble.png"/>
|
||||
<texture name="marblecube" type="cube" file="marble.png"/>
|
||||
|
||||
<material name="groundplane" texture="groundplane" texrepeat="10 10"/>
|
||||
<material name="table2d" texture="marble2d" reflectance="0.3" rgba=".8 .8 .8 1"/>
|
||||
<material name="tablecube" texture="marblecube" rgba=".8 .8 .8 1"/>
|
||||
<material name="MatTouch" rgba=".3 .9 .3 .3"/>
|
||||
<material name="MatIMU" rgba=".1 .1 .9 1"/>
|
||||
<material name="MatMesh" texture="skin"/>
|
||||
</asset>
|
||||
|
||||
<contact>
|
||||
<exclude body1="wristz" body2="wristy"/>
|
||||
<exclude body1="wristx" body2="thumb0"/>
|
||||
<exclude body1="palm" body2="thumb1"/>
|
||||
<exclude body1="palm" body2="index1"/>
|
||||
<exclude body1="palm" body2="middle1"/>
|
||||
<exclude body1="palm" body2="ring1"/>
|
||||
<exclude body1="palm" body2="pinky1"/>
|
||||
</contact>
|
||||
|
||||
<worldbody>
|
||||
|
||||
|
||||
<!-- ======= ROBOT ======= -->
|
||||
<body childclass="MPL" name="forearm" pos="0 -0.35 0.2" axisangle="0 0 1 3.141592">
|
||||
<geom type="cylinder" size="0.02 0.01" zaxis="0 1 0"/>
|
||||
<body name="wristy" pos="0 0 0">
|
||||
<inertial pos="-7.08369e-005 -0.0217787 -0.000286168" quat="0.707488 0.00581744 -0.0107421 0.70662" mass="0.0272932" diaginertia="2.46813e-005 1.77029e-005 1.71079e-005" />
|
||||
<geom type="mesh" mesh="wristy"/>
|
||||
<joint name="wrist_PRO" type="hinge" damping="0.4" pos="0 0 0" axis="0 1 0" range="-1.57 1.57"/>
|
||||
<body name="wristx" pos="-3.36826e-005 -0.0476452 0.00203763">
|
||||
<inertial pos="0.00139174 -0.00975189 -0.00252668" quat="-0.0729226 0.705959 0.0352732 0.703605" mass="0.010691" diaginertia="5.04455e-006 4.25035e-006 3.25677e-006" />
|
||||
<joint name="wrist_UDEV" damping="0.4" type="hinge" pos="0 0 0" axis="0 0 -1" range="-0.261 0.785"/>
|
||||
<geom type="mesh" mesh="wristx"/>
|
||||
<body name="wristz" pos="0.0001872 -0.03 -0.002094">
|
||||
<inertial pos="0.000579016 -0.00125952 0.000455968" quat="0.527723 0.475346 0.521597 0.472749" mass="0.00602247" diaginertia="1.58133e-006 1.43102e-006 1.26861e-006" />
|
||||
<joint name="wrist_FLEX" damping="0.4" type="hinge" pos="0 0 0" axis="1 0 0" range="-1.04 1.04"/>
|
||||
<geom type="mesh" mesh="wristz"/>
|
||||
|
||||
<!-- ======= PALM ======= -->
|
||||
<body name="palm" pos="0.025625 0 0">
|
||||
<inertial pos="-0.0217876 -0.0376147 0.00276997" quat="-0.146373 0.723094 0.0985561 0.66783" mass="0.119867" diaginertia="0.000123088 0.000100082 6.89467e-005" />
|
||||
<geom type="mesh" mesh="palm"/>
|
||||
<site name="palm_thumb" pos="-0.0052 -0.0438 -0.0182" size=".017 .03 .01"/>
|
||||
<site name="palm_pinky" pos="-0.0358 -0.0401 -0.0183" size=".017 .03 .01"/>
|
||||
<site name="palm_side" pos="-0.0604 -0.0329 -0.0048" size=".01 .03 .015"/>
|
||||
<site name="palm_back" pos="-0.0246 -0.0446 0.018" size=".03 .035 .015"/>
|
||||
|
||||
<!-- ======= THUMB ======= -->
|
||||
<body name="thumb0" pos="0.00835752 -0.0206978 -0.010093" quat="0.990237 0.0412644 -0.0209178 -0.13149">
|
||||
<inertial pos="0.00863339 -0.000156884 -0.000945846" quat="0.408795 0.551643 0.541079 0.485602" mass="0.00336696" diaginertia="4.50769e-007 4.48758e-007 2.35017e-007" />
|
||||
<joint name="thumb_ABD" type="hinge" pos="0 0 0" axis="0 1 0" range="0 2.07"/>
|
||||
<geom type="mesh" mesh="thumb0"/>
|
||||
<body name="thumb1" pos="0.0209172 -0.00084 0.0014476">
|
||||
<inertial pos="0.019024 0.000361131 -0.000186763" quat="0.5208 0.469572 0.484571 0.522934" mass="0.00596213" diaginertia="9.88001e-007 9.45125e-007 5.32989e-007" />
|
||||
<joint name="thumb_MCP" type="hinge" pos="0 0 0" axis="0 0 -1" range="0 1.03"/>
|
||||
<geom type="mesh" mesh="thumb1"/>
|
||||
<site name="thumb_proximal" pos="0.0173 -0.008 0.0009" size=".015 .0075 .01"/>
|
||||
<body name="thumb2" pos="0.0335 0 -0.0007426">
|
||||
<inertial pos="0.0188965 0.000375725 0.00065381" quat="0.502274 0.484638 0.475673 0.535333" mass="0.00599792" diaginertia="9.96692e-007 9.64948e-007 5.14416e-007" />
|
||||
<joint name="thumb_PIP" type="hinge" pos="0 0 0" axis="0 0 -1" range="0 1.03"/>
|
||||
<geom type="mesh" mesh="thumb2"/>
|
||||
<site name="thumb_medial" pos="0.0182 -0.008 0.0015" size=".015 .0075 .01"/>
|
||||
<body name="thumb3" pos="0.0335 0 0.0010854">
|
||||
<inertial pos="0.0188965 0.000375725 0.00065381" quat="0.502274 0.484638 0.475673 0.535333" mass="0.00599792" diaginertia="9.96692e-007 9.64948e-007 5.14416e-007" />
|
||||
<joint name="thumb_DIP" type="hinge" pos="0 0 0" axis="0 0 -1" range="-0.819 1.28"/>
|
||||
<geom type="mesh" mesh="thumb3"/>
|
||||
<site name="thumb_distal" pos="0.0156 -0.007 0.0003" size=".015 .0075 .01" axisangle="0 0 1 0.2"/>
|
||||
<site class="IMU" name="thumb_IMU" pos="0.0099 -0.00052 0" quat=".5 .5 .5 .5" size=".003 .003 .003"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
<!-- ======= INDEX ======= -->
|
||||
<body name="index0" pos="0.00986485 -0.0658 0.00101221" quat="0.996195 0 0.0871557 0">
|
||||
<inertial pos="-0.000142572 -0.00548494 0.000206145" quat="0.699132 0.714861 -0.000723869 0.013694" mass="0.00295579" diaginertia="4.22462e-007 4.02281e-007 1.93868e-007" />
|
||||
<joint name="index_ABD" type="hinge" pos="0 0 0" axis="0 0 1" range="0 0.345"/>
|
||||
<geom type="mesh" mesh="index0"/>
|
||||
<body name="index1" pos="6.26e-005 -0.018 0">
|
||||
<inertial pos="0.000406487 -0.0213125 0.000655609" quat="0.698452 0.715642 -0.00415384 0.0023049" mass="0.00478235" diaginertia="8.18599e-007 7.95693e-007 3.06254e-007" />
|
||||
<joint name="index_MCP" type="hinge" pos="0 0 0" axis="1 0 0" range="-0.785 1.57"/>
|
||||
<geom type="mesh" mesh="index1"/>
|
||||
<site name="index_proximal" pos="0 -0.0235 -0.007" size=".009 .015 .0075"/>
|
||||
<body name="index2" pos="0.001086 -0.0435 0.0005">
|
||||
<inertial pos="-0.000841462 -0.012689 0.000572665" quat="0.734882 0.677481 -0.028511 0.0124827" mass="0.00344764" diaginertia="3.63962e-007 3.59059e-007 1.05304e-007" />
|
||||
<joint name="index_PIP" type="hinge" pos="0 0 0" axis="1 0 0" range="0 1.72"/>
|
||||
<geom type="mesh" mesh="index2"/>
|
||||
<site name="index_medial" pos="0 -0.009 -0.0047" size=".0075 .01 .006"/>
|
||||
<body name="index3" pos="-0.000635 -0.0245 0">
|
||||
<inertial pos="4.32004e-005 -0.0125318 0.000903476" quat="0.516251 0.4829 -0.483241 0.516498" mass="0.00274415" diaginertia="1.19635e-007 1.09202e-007 7.77873e-008" />
|
||||
<joint name="index_DIP" type="hinge" pos="0 0 0" axis="1 0 0" range="0 1.38"/>
|
||||
<geom type="mesh" mesh="index3"/>
|
||||
<site name="index_distal" pos="0 -0.0132 -0.0038" size=".0075 .01 .006"/>
|
||||
<site class="IMU" name="index_IMU" pos="0 -0.0093 0.00063" quat=".5 .5 -.5 .5" size=".003 .003 .003"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
<!-- ======= MIDDLE ======= -->
|
||||
<body name="middle0" pos="-0.012814 -0.0779014 0.00544608" quat="-3.14 0.0436194 0 0">
|
||||
<inertial pos="-0.000142567 -0.00548493 0.000206162" quat="0.699131 0.714862 -0.000723874 0.013694" mass="0.00295579" diaginertia="4.22461e-007 4.02281e-007 1.93868e-007" />
|
||||
<!--<joint name="middle0" type="hinge" pos="0 0 0" range="-0.345 0" axis="0 0 -1" />-->
|
||||
<geom type="mesh" mesh="middle0"/>
|
||||
<body name="middle1" pos="6.26e-005 -0.018 0">
|
||||
<inertial pos="0.000406411 -0.0213125 0.00065565" quat="0.698451 0.715642 -0.00415503 0.00230486" mass="0.00478229" diaginertia="8.18595e-007 7.9569e-007 3.06253e-007" />
|
||||
<joint name="middle_MCP" type="hinge" pos="0 0 0" axis="1 0 0" range="-0.785 1.57"/>
|
||||
<geom type="mesh" mesh="middle1"/>
|
||||
<site name="middle_proximal" pos="0 -0.025 -0.007" size=".009 .015 .0075"/>
|
||||
<body name="middle2" pos="0.001086 -0.0435 0.0005">
|
||||
<inertial pos="-0.000841444 -0.012689 0.00057266" quat="0.734883 0.677482 -0.0284727 0.0124412" mass="0.00344765" diaginertia="3.63962e-007 3.5906e-007 1.05304e-007" />
|
||||
<joint name="middle_PIP" type="hinge" pos="0 0 0" axis="1 0 0" range="0 1.73"/>
|
||||
<geom type="mesh" mesh="middle2"/>
|
||||
<site name="middle_medial" pos="0 -0.0146 -0.0047" size=".0075 .01 .006"/>
|
||||
<body name="middle3" pos="-0.000635 -0.0245 0">
|
||||
<inertial pos="4.31236e-005 -0.0125318 0.000903446" quat="0.516263 0.482913 -0.483228 0.516487" mass="0.00274417" diaginertia="1.19635e-007 1.09202e-007 7.77884e-008" />
|
||||
<joint name="middle_DIP" type="hinge" pos="0 0 0" axis="1 0 0" range="0 1.38"/>
|
||||
<geom type="mesh" mesh="middle3"/>
|
||||
<site name="middle_distal" pos="0 -0.0129 -0.0038" size=".0075 .01 .006"/>
|
||||
<site class="IMU" name="middle_IMU" pos="0 -0.0093 0.00063" quat=".5 .5 -.5 .5" size=".003 .003 .003"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
<!-- ======= RING ======= -->
|
||||
<body name="ring0" pos="-0.0354928 -0.0666999 0.00151221" quat="0.996195 0 -0.0871557 0">
|
||||
<inertial pos="-0.000142559 -0.00548494 0.000206147" quat="0.699132 0.714861 -0.000720946 0.013691" mass="0.00295579" diaginertia="4.22462e-007 4.02281e-007 1.93868e-007" />
|
||||
<joint name="ring_ABD" type="hinge" pos="0 0 0" axis="0 0 -1" range="0 0.345"/>
|
||||
<geom type="mesh" mesh="ring0"/>
|
||||
<body name="ring1" pos="6.26e-005 -0.018 0">
|
||||
<inertial pos="0.000406447 -0.0213125 0.00065563" quat="0.698451 0.715642 -0.00415675 0.00230715" mass="0.00478232" diaginertia="8.18597e-007 7.95692e-007 3.06254e-007" />
|
||||
<joint name="ring_MCP" type="hinge" pos="0 0 0" axis="1 0 0" range="-0.785 1.57"/>
|
||||
<geom type="mesh" mesh="ring1"/>
|
||||
<site name="ring_proximal" pos="0 -0.0259 -0.007" size=".009 .015 .0075"/>
|
||||
<body name="ring2" pos="0.001086 -0.0435 0.0005">
|
||||
<inertial pos="-0.000841518 -0.012689 0.000572674" quat="0.73488 0.677478 -0.0285773 0.0125557" mass="0.00344767" diaginertia="3.63963e-007 3.59061e-007 1.05305e-007" />
|
||||
<joint name="ring_PIP" type="hinge" pos="0 0 0" axis="1 0 0" range="0 1.72"/>
|
||||
<geom type="mesh" mesh="ring2"/>
|
||||
<site name="ring_medial" pos="0 -0.0137 -0.0047" size=".0075 .01 .006"/>
|
||||
<body name="ring3" pos="-0.000635 -0.0245 0">
|
||||
<inertial pos="4.31973e-005 -0.0125318 0.000903457" quat="0.516255 0.482902 -0.483238 0.516495" mass="0.00274416" diaginertia="1.19635e-007 1.09202e-007 7.77877e-008" />
|
||||
<joint name="ring_DIP" type="hinge" pos="0 0 0" axis="1 0 0" range="0 1.38"/>
|
||||
<geom type="mesh" mesh="ring3"/>
|
||||
<site name="ring_distal" pos="0 -0.0117 -0.0038" size=".0075 .01 .006"/>
|
||||
<site class="IMU" name="ring_IMU" pos="0 -0.0093 0.00063" quat=".5 .5 -.5 .5" size=".003 .003 .003"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
<!-- ======= LITTLE ======= -->
|
||||
<body name="pinky0" pos="-0.0562459 -0.0554001 -0.00563858" quat="0.996195 0 -0.0871557 0">
|
||||
<inertial pos="-0.000142559 -0.00538484 0.000206147" quat="0.699132 0.714861 -0.000721037 0.0136911" mass="0.00295579" diaginertia="4.22462e-007 4.02281e-007 1.93868e-007" />
|
||||
<joint name="pinky_ABD" type="hinge" pos="0 0 0" axis="0 0 -1" range="0 0.345"/>
|
||||
<geom type="mesh" mesh="pinky0"/>
|
||||
<body name="pinky1" pos="6.26e-005 -0.0178999 0">
|
||||
<inertial pos="0.000458624 -0.0160478 0.000924735" quat="0.685529 0.72723 0.021252 -0.0270914" mass="0.0034099" diaginertia="4.03391e-007 3.84061e-007 2.19866e-007" />
|
||||
<joint name="pinky_MCP" type="hinge" pos="0 0 0" axis="1 0 0" range="-0.785 1.57"/>
|
||||
<geom type="mesh" mesh="pinky1"/>
|
||||
<site name="pinky_proximal" pos="0 -0.021 -0.0066" size=".009 .013 .0075"/>
|
||||
<body name="pinky2" pos="0.000578 -0.033 0.0005">
|
||||
<inertial pos="-0.000270832 -0.00914628 0.000738493" quat="0.746786 0.664476 -4.11065e-005 -0.0279675" mass="0.00250622" diaginertia="1.79089e-007 1.75934e-007 7.44543e-008" />
|
||||
<joint name="pinky_PIP" type="hinge" pos="0 0 0" axis="1 0 0" range="0 1.72"/>
|
||||
<geom type="mesh" mesh="pinky2"/>
|
||||
<site name="pinky_medial" pos="0 -0.0117 -0.0047" size=".0075 .01 .006"/>
|
||||
<body name="pinky3" pos="-4.78e-005 -0.0175 0">
|
||||
<inertial pos="3.85026e-005 -0.0125047 0.000912295" quat="0.516037 0.484447 -0.483043 0.515448" mass="0.00273265" diaginertia="1.19141e-007 1.08629e-007 7.77271e-008" />
|
||||
<joint name="pinky_DIP" type="hinge" pos="0 0 0" axis="1 0 0" range="0 1.38"/>
|
||||
<geom type="mesh" mesh="pinky3"/>
|
||||
<site name="pinky_distal" pos="0 -0.0121 -0.0038" size=".0075 .01 .006"/>
|
||||
<site class="IMU" name="pinky_IMU" pos="0 -0.0093 0.00063" quat=".5 .5 -.5 .5" size=".003 .003 .003"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</worldbody>
|
||||
|
||||
|
||||
<sensor>
|
||||
<jointpos name="Sjp_wrist_PRO" joint="wrist_PRO"/>
|
||||
<jointpos name="Sjp_wrist_UDEV" joint="wrist_UDEV"/>
|
||||
<jointpos name="Sjp_wrist_FLEX" joint="wrist_FLEX"/>
|
||||
<jointpos name="Sjp_thumb_ABD" joint="thumb_ABD"/>
|
||||
<jointpos name="Sjp_thumb_MCP" joint="thumb_MCP"/>
|
||||
<jointpos name="Sjp_thumb_PIP" joint="thumb_PIP"/>
|
||||
<jointpos name="Sjp_thumb_DIP" joint="thumb_DIP"/>
|
||||
<jointpos name="Sjp_index_ABD" joint="index_ABD"/>
|
||||
<jointpos name="Sjp_index_MCP" joint="index_MCP"/>
|
||||
<jointpos name="Sjp_index_PIP" joint="index_PIP"/>
|
||||
<jointpos name="Sjp_index_DIP" joint="index_DIP"/>
|
||||
<jointpos name="Sjp_middle_MCP" joint="middle_MCP"/>
|
||||
<jointpos name="Sjp_middle_PIP" joint="middle_PIP"/>
|
||||
<jointpos name="Sjp_middle_DIP" joint="middle_DIP"/>
|
||||
<jointpos name="Sjp_ring_ABD" joint="ring_ABD"/>
|
||||
<jointpos name="Sjp_ring_MCP" joint="ring_MCP"/>
|
||||
<jointpos name="Sjp_ring_PIP" joint="ring_PIP"/>
|
||||
<jointpos name="Sjp_ring_DIP" joint="ring_DIP"/>
|
||||
<jointpos name="Sjp_pinky_ABD" joint="pinky_ABD"/>
|
||||
<jointpos name="Sjp_pinky_MCP" joint="pinky_MCP"/>
|
||||
<jointpos name="Sjp_pinky_PIP" joint="pinky_PIP"/>
|
||||
<jointpos name="Sjp_pinky_DIP" joint="pinky_DIP"/>
|
||||
|
||||
<jointvel name="Sjv_wrist_PRO" joint="wrist_PRO"/>
|
||||
<jointvel name="Sjv_wrist_UDEV" joint="wrist_UDEV"/>
|
||||
<jointvel name="Sjv_wrist_FLEX" joint="wrist_FLEX"/>
|
||||
<jointvel name="Sjv_thumb_ABD" joint="thumb_ABD"/>
|
||||
<jointvel name="Sjv_thumb_MCP" joint="thumb_MCP"/>
|
||||
<jointvel name="Sjv_thumb_PIP" joint="thumb_PIP"/>
|
||||
<jointvel name="Sjv_thumb_DIP" joint="thumb_DIP"/>
|
||||
<jointvel name="Sjv_index_ABD" joint="index_ABD"/>
|
||||
<jointvel name="Sjv_index_MCP" joint="index_MCP"/>
|
||||
<jointvel name="Sjv_index_PIP" joint="index_PIP"/>
|
||||
<jointvel name="Sjv_index_DIP" joint="index_DIP"/>
|
||||
<jointvel name="Sjv_middle_MCP" joint="middle_MCP"/>
|
||||
<jointvel name="Sjv_middle_PIP" joint="middle_PIP"/>
|
||||
<jointvel name="Sjv_middle_DIP" joint="middle_DIP"/>
|
||||
<jointvel name="Sjv_ring_ABD" joint="ring_ABD"/>
|
||||
<jointvel name="Sjv_ring_MCP" joint="ring_MCP"/>
|
||||
<jointvel name="Sjv_ring_PIP" joint="ring_PIP"/>
|
||||
<jointvel name="Sjv_ring_DIP" joint="ring_DIP"/>
|
||||
<jointvel name="Sjv_pinky_ABD" joint="pinky_ABD"/>
|
||||
<jointvel name="Sjv_pinky_MCP" joint="pinky_MCP"/>
|
||||
<jointvel name="Sjv_pinky_PIP" joint="pinky_PIP"/>
|
||||
<jointvel name="Sjv_pinky_DIP" joint="pinky_DIP"/>
|
||||
|
||||
<actuatorpos name="Sap_wrist_PRO" actuator="A_wrist_PRO" />
|
||||
<actuatorpos name="Sap_wrist_UDEV" actuator="A_wrist_UDEV" />
|
||||
<actuatorpos name="Sap_wrist_FLEX" actuator="A_wrist_FLEX" />
|
||||
<actuatorpos name="Sap_thumb_ABD" actuator="A_thumb_ABD" />
|
||||
<actuatorpos name="Sap_thumb_MCP" actuator="A_thumb_MCP" />
|
||||
<actuatorpos name="Sap_thumb_PIP" actuator="A_thumb_PIP" />
|
||||
<actuatorpos name="Sap_thumb_DIP" actuator="A_thumb_DIP" />
|
||||
<actuatorpos name="Sap_index_ABD" actuator="A_index_ABD" />
|
||||
<actuatorpos name="Sap_index_MCP" actuator="A_index_MCP" />
|
||||
<actuatorpos name="Sap_middle_MCP" actuator="A_middle_MCP"/>
|
||||
<actuatorpos name="Sap_ring_MCP" actuator="A_ring_MCP" />
|
||||
<actuatorpos name="Sap_pinky_ABD" actuator="A_pinky_ABD" />
|
||||
<actuatorpos name="Sap_pinky_MCP" actuator="A_pinky_MCP" />
|
||||
|
||||
<actuatorvel name="Sav_wrist_PRO" actuator="A_wrist_PRO" />
|
||||
<actuatorvel name="Sav_wrist_UDEV" actuator="A_wrist_UDEV"/>
|
||||
<actuatorvel name="Sav_wrist_FLEX" actuator="A_wrist_FLEX"/>
|
||||
<actuatorvel name="Sav_thumb_ABD" actuator="A_thumb_ABD" />
|
||||
<actuatorvel name="Sav_thumb_MCP" actuator="A_thumb_MCP" />
|
||||
<actuatorvel name="Sav_thumb_PIP" actuator="A_thumb_PIP" />
|
||||
<actuatorvel name="Sav_thumb_DIP" actuator="A_thumb_DIP" />
|
||||
<actuatorvel name="Sav_index_ABD" actuator="A_index_ABD" />
|
||||
<actuatorvel name="Sav_index_MCP" actuator="A_index_MCP" />
|
||||
<actuatorvel name="Sav_middle_MCP" actuator="A_middle_MCP"/>
|
||||
<actuatorvel name="Sav_ring_MCP" actuator="A_ring_MCP" />
|
||||
<actuatorvel name="Sav_pinky_ABD" actuator="A_pinky_ABD" />
|
||||
<actuatorvel name="Sav_pinky_MCP" actuator="A_pinky_MCP" />
|
||||
|
||||
<actuatorfrc name="Saf_wrist_PRO" actuator="A_wrist_PRO"/>
|
||||
<actuatorfrc name="Saf_wrist_UDEV" actuator="A_wrist_UDEV"/>
|
||||
<actuatorfrc name="Saf_wrist_FLEX" actuator="A_wrist_FLEX"/>
|
||||
<actuatorfrc name="Saf_thumb_ABD" actuator="A_thumb_ABD"/>
|
||||
<actuatorfrc name="Saf_thumb_MCP" actuator="A_thumb_MCP"/>
|
||||
<actuatorfrc name="Saf_thumb_PIP" actuator="A_thumb_PIP"/>
|
||||
<actuatorfrc name="Saf_thumb_DIP" actuator="A_thumb_DIP"/>
|
||||
<actuatorfrc name="Saf_index_ABD" actuator="A_index_ABD"/>
|
||||
<actuatorfrc name="Saf_index_MCP" actuator="A_index_MCP"/>
|
||||
<actuatorfrc name="Saf_middle_MCP" actuator="A_middle_MCP"/>
|
||||
<actuatorfrc name="Saf_ring_MCP" actuator="A_ring_MCP"/>
|
||||
<actuatorfrc name="Saf_pinky_ABD" actuator="A_pinky_ABD"/>
|
||||
<actuatorfrc name="Saf_pinky_MCP" actuator="A_pinky_MCP"/>
|
||||
|
||||
<accelerometer name="S_thumb_IMU" site="thumb_IMU"/>
|
||||
<accelerometer name="S_index_IMU" site="index_IMU"/>
|
||||
<accelerometer name="S_middle_IMU" site="middle_IMU"/>
|
||||
<accelerometer name="S_ring_IMU" site="ring_IMU"/>
|
||||
<accelerometer name="S_pinky_IMU" site="pinky_IMU"/>
|
||||
|
||||
<gyro site="thumb_IMU"/>
|
||||
<gyro site="index_IMU"/>
|
||||
<gyro site="middle_IMU"/>
|
||||
<gyro site="ring_IMU"/>
|
||||
<gyro site="pinky_IMU"/>
|
||||
|
||||
<touch name="S_palm_thumb" site="palm_thumb"/>
|
||||
<touch name="S_palm_pinky" site="palm_pinky"/>
|
||||
<touch name="S_palm_side" site="palm_side"/>
|
||||
<touch name="S_palm_back" site="palm_back"/>
|
||||
<touch name="S_thumb_proximal" site="thumb_proximal"/>
|
||||
<touch name="S_thumb_medial" site="thumb_medial"/>
|
||||
<touch name="S_thumb_distal" site="thumb_distal"/>
|
||||
<touch name="S_index_proximal" site="index_proximal"/>
|
||||
<touch name="S_index_medial" site="index_medial"/>
|
||||
<touch name="S_index_distal" site="index_distal"/>
|
||||
<touch name="S_middle_proximal" site="middle_proximal"/>
|
||||
<touch name="S_middle_medial" site="middle_medial"/>
|
||||
<touch name="S_middle_distal" site="middle_distal"/>
|
||||
<touch name="S_ring_proximal" site="ring_proximal"/>
|
||||
<touch name="S_ring_medial" site="ring_medial"/>
|
||||
<touch name="S_ring_distal" site="ring_distal"/>
|
||||
<touch name="S_pinky_proximal" site="pinky_proximal"/>
|
||||
<touch name="S_pinky_medial" site="pinky_medial"/>
|
||||
<touch name="S_pinky_distal" site="pinky_distal"/>
|
||||
</sensor>
|
||||
|
||||
|
||||
<tendon>
|
||||
<!--Index coupler tendons-->
|
||||
<fixed name="T_index32_cpl" range="0 1">
|
||||
<joint joint="index_DIP" coef="0.00705"/>
|
||||
<joint joint="index_PIP" coef="-0.00805"/>
|
||||
</fixed>
|
||||
<fixed name="T_index21_cpl" range="0 1">
|
||||
<joint joint="index_PIP" coef="0.010"/>
|
||||
<joint joint="index_MCP" coef="-0.010"/>
|
||||
</fixed>
|
||||
|
||||
<!--Middle coupler tendons-->
|
||||
<fixed name="T_middle32_cpl">
|
||||
<joint joint="middle_DIP" coef="0.00705"/>
|
||||
<joint joint="middle_PIP" coef="-0.00805"/>
|
||||
</fixed>
|
||||
<fixed name="T_middle21_cpl">
|
||||
<joint joint="middle_PIP" coef="0.010"/>
|
||||
<joint joint="middle_MCP" coef="-0.010"/>
|
||||
</fixed>
|
||||
|
||||
<!--Ring coupler tendons-->
|
||||
<fixed name="T_ring32_cpl">
|
||||
<joint joint="ring_DIP" coef="0.00705"/>
|
||||
<joint joint="ring_PIP" coef="-0.00805"/>
|
||||
</fixed>
|
||||
<fixed name="T_ring21_cpl">
|
||||
<joint joint="ring_PIP" coef="0.010"/>
|
||||
<joint joint="ring_MCP" coef="-0.010"/>
|
||||
</fixed>
|
||||
|
||||
<!--Little coupler tendons-->
|
||||
<fixed name="T_pinky32_cpl">
|
||||
<joint joint="pinky_DIP" coef="0.00705"/>
|
||||
<joint joint="pinky_PIP" coef="-0.00805"/>
|
||||
</fixed>
|
||||
<fixed name="T_pinky21_cpl">
|
||||
<joint joint="pinky_PIP" coef="0.010"/>
|
||||
<joint joint="pinky_MCP" coef="-0.010"/>
|
||||
</fixed>
|
||||
|
||||
</tendon>
|
||||
|
||||
|
||||
<equality>
|
||||
<weld body1="mocap" body2="forearm" solref="0.01 1" solimp=".9 .9 0.01"/>
|
||||
|
||||
<!-- DIP-PIP-MCP Couplings -->
|
||||
<tendon name="E_index32_cpl" tendon1="T_index32_cpl"/>
|
||||
<tendon name="E_index21_cpl" tendon1="T_index21_cpl"/>
|
||||
<tendon name="E_middle32_cpl" tendon1="T_middle32_cpl"/>
|
||||
<tendon name="E_middle21_cpl" tendon1="T_middle21_cpl"/>
|
||||
<tendon name="E_ring32_cpl" tendon1="T_ring32_cpl"/>
|
||||
<tendon name="E_ring21_cpl" tendon1="T_ring21_cpl"/>
|
||||
<tendon name="E_pinky32_cpl" tendon1="T_pinky32_cpl"/>
|
||||
<tendon name="E_pinky21_cpl" tendon1="T_pinky21_cpl"/>
|
||||
|
||||
<!-- AD-AB Coupling -->
|
||||
<joint name="ring_pinky_cpl" joint1="ring_ABD" joint2="pinky_ABD" polycoef="0 0.5 0 0 0"/>
|
||||
</equality>
|
||||
|
||||
|
||||
<actuator>
|
||||
<!-- Wrist -->
|
||||
<position name="A_wrist_PRO" class="MPL" joint="wrist_PRO" ctrlrange="-1.57 1.57"/>
|
||||
<position name="A_wrist_UDEV" class="MPL" joint="wrist_UDEV" ctrlrange="-0.26 0.79"/>
|
||||
<position name="A_wrist_FLEX" class="MPL" joint="wrist_FLEX" ctrlrange="-1 1"/>
|
||||
|
||||
<!-- Thumb -->
|
||||
<position name="A_thumb_ABD" class="MPL" joint="thumb_ABD" ctrlrange="0 2.1"/>
|
||||
<position name="A_thumb_MCP" class="MPL" joint="thumb_MCP" ctrlrange="0 1.0"/>
|
||||
<position name="A_thumb_PIP" class="MPL" joint="thumb_PIP" ctrlrange="0 1.0"/>
|
||||
<position name="A_thumb_DIP" class="MPL" joint="thumb_DIP" ctrlrange="-0.82 1.3"/>
|
||||
|
||||
<!-- Fingers -->
|
||||
<position name="A_index_ABD" class="MPL" joint="index_ABD" ctrlrange="0 0.34"/>
|
||||
<position name="A_index_MCP" class="MPL" joint="index_MCP" ctrlrange="0 1.6"/>
|
||||
<position name="A_middle_MCP" class="MPL" joint="middle_MCP" ctrlrange="0 1.6"/>
|
||||
<position name="A_ring_MCP" class="MPL" joint="ring_MCP" ctrlrange="0 1.6"/>
|
||||
<position name="A_pinky_ABD" class="MPL" joint="pinky_ABD" ctrlrange="0 0.34"/>
|
||||
<position name="A_pinky_MCP" class="MPL" joint="pinky_MCP" ctrlrange="0 1.6"/>
|
||||
</actuator>
|
||||
</mujoco>
|
BIN
thirdparty/bullet/data/MPL/mesh/index0.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/index0.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/index0_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/index0_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/index1.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/index1.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/index1_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/index1_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/index2.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/index2.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/index2_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/index2_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/index3.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/index3.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/index3_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/index3_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/middle0.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/middle0.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/middle0_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/middle0_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/middle1.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/middle1.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/middle1_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/middle1_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/middle2.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/middle2.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/middle2_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/middle2_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/middle3.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/middle3.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/middle3_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/middle3_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/palm.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/palm.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/palm_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/palm_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/pinky0.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/pinky0.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/pinky0_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/pinky0_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/pinky1.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/pinky1.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/pinky1_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/pinky1_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/pinky2.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/pinky2.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/pinky2_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/pinky2_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/pinky3.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/pinky3.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/pinky3_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/pinky3_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/ring0.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/ring0.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/ring0_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/ring0_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/ring1.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/ring1.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/ring1_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/ring1_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/ring2.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/ring2.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/ring2_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/ring2_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/ring3.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/ring3.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/ring3_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/ring3_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/thumb0.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/thumb0.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/thumb0_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/thumb0_collision.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/thumb1.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/thumb1.stl
vendored
Normal file
Binary file not shown.
BIN
thirdparty/bullet/data/MPL/mesh/thumb1_collision.stl
vendored
Normal file
BIN
thirdparty/bullet/data/MPL/mesh/thumb1_collision.stl
vendored
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user