Split Bullet/src/LinearMath/btSerializer.cpp into btSerializer64.cpp to make it easier to rebuild serialization structure.
Add several MSVC optimization flags to cmake. Bump up VERSION because serialization format changed Expose btScalar& jointMaxForce, btScalar& jointMaxVelocity to 'getJointInfo2' API, add backwards compatibility to examples\Importers\ImportURDFDemo\URDFImporterInterface::getJointInfo. pybullet: expose 4 more fields to getJointInfo: jointLowerLimit/jointUpperLimit/jointMaxForce/jointMaxVelocity fix performance issue in CMD_ACTUAL_STATE_UPDATE_COMPLETED
This commit is contained in:
@@ -1368,6 +1368,10 @@ typedef struct bInvalidHandle {
|
||||
double m_jointTorque[6];
|
||||
double m_jointDamping;
|
||||
double m_jointFriction;
|
||||
double m_jointLowerLimit;
|
||||
double m_jointUpperLimit;
|
||||
double m_jointMaxForce;
|
||||
double m_jointMaxVelocity;
|
||||
char *m_linkName;
|
||||
char *m_jointName;
|
||||
btCollisionObjectDoubleData *m_linkCollider;
|
||||
@@ -1395,6 +1399,10 @@ typedef struct bInvalidHandle {
|
||||
int m_posVarCount;
|
||||
float m_jointDamping;
|
||||
float m_jointFriction;
|
||||
float m_jointLowerLimit;
|
||||
float m_jointUpperLimit;
|
||||
float m_jointMaxForce;
|
||||
float m_jointMaxVelocity;
|
||||
char *m_linkName;
|
||||
char *m_jointName;
|
||||
btCollisionObjectFloatData *m_linkCollider;
|
||||
|
||||
@@ -20,12 +20,13 @@
|
||||
#include "bDNA.h"
|
||||
#include "bBlenderFile.h"
|
||||
#include "btBulletFile.h"
|
||||
#include "LinearMath/btSerializer.h"
|
||||
#include "bCommon.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string.h>
|
||||
|
||||
bool isBulletFile = false;
|
||||
bool isBulletFile = true;
|
||||
|
||||
using namespace bParse;
|
||||
typedef std::string bString;
|
||||
@@ -216,10 +217,12 @@ int main(int argc,char** argv)
|
||||
using namespace bParse;
|
||||
dump = fopen("dump.py", "w");
|
||||
|
||||
|
||||
if (!dump) return 0;
|
||||
fprintf(dump, "%s\n", data);
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
char* filename = "../../../../data/r2d2_multibody.bullet";
|
||||
|
||||
if (argc==2)
|
||||
@@ -269,9 +272,12 @@ int main(int argc,char** argv)
|
||||
bBlenderFile f(memBuf,len);
|
||||
swap = (f.getFlags() & FD_ENDIAN_SWAP)!=0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#else
|
||||
isBulletFile = true;
|
||||
bool swap = false;
|
||||
char* memBuf = sBulletDNAstr;
|
||||
int len = sBulletDNAlen;
|
||||
#endif
|
||||
|
||||
|
||||
char *blenderData = memBuf;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import sys
|
||||
sys.path.append(".")
|
||||
import dump
|
||||
|
||||
|
||||
|
||||
header = """/* Copyright (C) 2011 Erwin Coumans & Charlie C
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
|
||||
@@ -23,15 +23,29 @@ SET (INC_FILES
|
||||
SET(SRC makesdna.cpp)
|
||||
ADD_EXECUTABLE(makesdna ${SRC} ${INC_FILES})
|
||||
|
||||
# Output BulletDNA.c
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp
|
||||
COMMAND ${CMAKE_CFG_INTDIR}/makesdna ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/CommonSerialize/
|
||||
DEPENDS makesdna
|
||||
)
|
||||
IF (CMAKE_CL_64)
|
||||
# Output BulletDNA.c
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer64.cpp
|
||||
COMMAND ${CMAKE_CFG_INTDIR}/makesdna ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer64.cpp ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/CommonSerialize/
|
||||
DEPENDS makesdna
|
||||
)
|
||||
SET(SRC ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer64.cpp)
|
||||
|
||||
ELSE()
|
||||
# Output BulletDNA.c
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp
|
||||
COMMAND ${CMAKE_CFG_INTDIR}/makesdna ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/CommonSerialize/
|
||||
DEPENDS makesdna
|
||||
)
|
||||
SET(SRC ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp)
|
||||
|
||||
ENDIF()
|
||||
|
||||
# Build bf_dna library
|
||||
SET(SRC ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp)
|
||||
|
||||
|
||||
ADD_LIBRARY(BulletDNA ${SRC} ${INC_FILES})
|
||||
|
||||
MESSAGE(STATUS "Configuring makesdna")
|
||||
|
||||
Reference in New Issue
Block a user