Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2020-09-02 21:41:30 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-09-02 21:41:30 +0300
commit4446c3a593c51603e135e38951607b9b668ddec5 (patch)
tree9552dbd903b4fd05ea740e1bba9b1b87d97414a1 /extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp
parent6f6f6ee18695dad66ad8aa0eb2bcab72501df597 (diff)
Sync Bullet to upstream
This syncs Bullet to the latest upstream git version as of writing this. (commit 47b0259b9700455022b5cf79b651cc1dc71dd59e).
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp
index ecce028c2e6..a3d8075dafa 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp
@@ -15,28 +15,23 @@ subject to the following restrictions:
#include "btBox2dShape.h"
+//{
-//{
-
-
-void btBox2dShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+void btBox2dShape::getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const
{
- btTransformAabb(getHalfExtentsWithoutMargin(),getMargin(),t,aabbMin,aabbMax);
+ btTransformAabb(getHalfExtentsWithoutMargin(), getMargin(), t, aabbMin, aabbMax);
}
-
-void btBox2dShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+void btBox2dShape::calculateLocalInertia(btScalar mass, btVector3& inertia) const
{
//btScalar margin = btScalar(0.);
btVector3 halfExtents = getHalfExtentsWithMargin();
- btScalar lx=btScalar(2.)*(halfExtents.x());
- btScalar ly=btScalar(2.)*(halfExtents.y());
- btScalar lz=btScalar(2.)*(halfExtents.z());
-
- inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz),
- mass/(btScalar(12.0)) * (lx*lx + lz*lz),
- mass/(btScalar(12.0)) * (lx*lx + ly*ly));
+ btScalar lx = btScalar(2.) * (halfExtents.x());
+ btScalar ly = btScalar(2.) * (halfExtents.y());
+ btScalar lz = btScalar(2.) * (halfExtents.z());
+ inertia.setValue(mass / (btScalar(12.0)) * (ly * ly + lz * lz),
+ mass / (btScalar(12.0)) * (lx * lx + lz * lz),
+ mass / (btScalar(12.0)) * (lx * lx + ly * ly));
}
-