Merge branch 'master' into allocators

This commit is contained in:
Daniel Chappuis 2019-03-11 11:14:27 +01:00
commit 246f2312b9
2 changed files with 16 additions and 9 deletions

View File

@ -19,7 +19,7 @@ def findReplaceText(directory, findRegex, substituteExpr, filePattern):
# ----- Code ----- # # ----- Code ----- #
# Read new version number from user # Read old version number from user
oldVersion = raw_input("Enter the old version string: ") oldVersion = raw_input("Enter the old version string: ")
# Read new version number from user # Read new version number from user
@ -32,10 +32,14 @@ file.write(newVersion + "\n")
file.close() file.close()
print("Version number has been updated in VERSION file") print("Version number has been updated in VERSION file")
# Update the RP3D version number in the documentation/API/Doxyfile # Update the RP3D version number in the documentation/API/Doxyfile file
findReplaceText("documentation/API/", r'(PROJECT_NUMBER[ \t]+=[ \t]+)"[\d\.]+"', r'\g<1>"' + newVersion + '"', "Doxyfile") findReplaceText("documentation/API/", r'(PROJECT_NUMBER[ \t]+=[ \t]+)"[\d\.]+"', r'\g<1>"' + newVersion + '"', "Doxyfile")
print("Version number has been updated in documentation/API/Doxyfile file") print("Version number has been updated in documentation/API/Doxyfile file")
# Update the RP3D version number in the documentation/UserManual/title.tex file
findReplaceText("documentation/UserManual/", r'(Version:[\s]+)[\d\.]+', r'\g<1>' + newVersion, "title.tex")
print("Version number has been updated in documentation/API/Doxyfile file")
# Update the RP3D version number in the src/configuration.h file # Update the RP3D version number in the src/configuration.h file
findReplaceText("src/", r'(RP3D_VERSION[ \t]+=[ \t]+std::string\()"[\d\.]+"', r'\g<1>"' + newVersion + '"', "configuration.h") findReplaceText("src/", r'(RP3D_VERSION[ \t]+=[ \t]+std::string\()"[\d\.]+"', r'\g<1>"' + newVersion + '"', "configuration.h")
print("Version number has been updated in src/configuration.h file") print("Version number has been updated in src/configuration.h file")
@ -48,4 +52,3 @@ print("Copyright date has been updated in LICENSE file")
findReplaceText("src/", '(Copyright ' + re.escape("(c)") + r' 2010-)[\d]+', r'\g<1>' + str(date.today().year), "*.h") findReplaceText("src/", '(Copyright ' + re.escape("(c)") + r' 2010-)[\d]+', r'\g<1>' + str(date.today().year), "*.h")
findReplaceText("src/", '(Copyright ' + re.escape("(c)") + r' 2010-)[\d]+', r'\g<1>' + str(date.today().year), "*.cpp") findReplaceText("src/", '(Copyright ' + re.escape("(c)") + r' 2010-)[\d]+', r'\g<1>' + str(date.today().year), "*.cpp")
print("Copyright date in license has been updated in all source code files") print("Copyright date in license has been updated in all source code files")

View File

@ -547,17 +547,21 @@ void RigidBody::updateBroadPhaseState() const {
RP3D_PROFILE("RigidBody::updateBroadPhaseState()", mProfiler); RP3D_PROFILE("RigidBody::updateBroadPhaseState()", mProfiler);
DynamicsWorld& world = static_cast<DynamicsWorld&>(mWorld); DynamicsWorld& world = static_cast<DynamicsWorld&>(mWorld);
const Vector3 displacement = world.mTimeStep * mLinearVelocity; const Vector3 displacement = world.mTimeStep * mLinearVelocity;
// For all the proxy collision shapes of the body // For all the proxy collision shapes of the body
for (ProxyShape* shape = mProxyCollisionShapes; shape != nullptr; shape = shape->mNext) { for (ProxyShape* shape = mProxyCollisionShapes; shape != nullptr; shape = shape->mNext) {
// Recompute the world-space AABB of the collision shape // If the proxy-shape shape is still part of the broad-phase
AABB aabb; if (shape->getBroadPhaseId() != -1) {
shape->getCollisionShape()->computeAABB(aabb, mTransform * shape->getLocalToBodyTransform());
// Update the broad-phase state for the proxy collision shape // Recompute the world-space AABB of the collision shape
mWorld.mCollisionDetection.updateProxyCollisionShape(shape, aabb, displacement); AABB aabb;
shape->getCollisionShape()->computeAABB(aabb, mTransform * shape->getLocalToBodyTransform());
// Update the broad-phase state for the proxy collision shape
mWorld.mCollisionDetection.updateProxyCollisionShape(shape, aabb, displacement);
}
} }
} }