diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2005-07-31 18:40:51 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2005-07-31 18:40:51 +0400 |
commit | 49499c49be8283682d849157765644a57f895c71 (patch) | |
tree | d1b4b65ed8a19e97ce19b8df3b2e8597c30206ac /extern/bullet | |
parent | 3b7d40cfdb524403a094e50128d2b74e822f0351 (diff) |
updated vc7 projectfiles so they work with bullet
Diffstat (limited to 'extern/bullet')
3 files changed, 15 insertions, 11 deletions
diff --git a/extern/bullet/Bullet/CollisionShapes/BoxShape.cpp b/extern/bullet/Bullet/CollisionShapes/BoxShape.cpp index 37552194df0..12fbd895bb3 100644 --- a/extern/bullet/Bullet/CollisionShapes/BoxShape.cpp +++ b/extern/bullet/Bullet/CollisionShapes/BoxShape.cpp @@ -12,12 +12,10 @@ #include "BoxShape.h" SimdVector3 BoxShape::GetHalfExtents() const -{ - SimdVector3 scalingCorrectedHalfExtents = m_boxHalfExtents1 * m_localScaling; - SimdVector3 marginCorrection (CONVEX_DISTANCE_MARGIN,CONVEX_DISTANCE_MARGIN,CONVEX_DISTANCE_MARGIN); - return (scalingCorrectedHalfExtents - marginCorrection).absolute(); +{ + return m_boxHalfExtents1 * m_localScaling; } - +//{ void BoxShape::GetAabb(const SimdTransform& t,SimdVector3& aabbMin,SimdVector3& aabbMax) const @@ -33,9 +31,8 @@ void BoxShape::GetAabb(const SimdTransform& t,SimdVector3& aabbMin,SimdVector3& //todo: this is a quick fix, we need to enlarge the aabb dependent on several criteria - SimdVector3 extra(CONVEX_DISTANCE_MARGIN,CONVEX_DISTANCE_MARGIN,CONVEX_DISTANCE_MARGIN); - extent += extra; - + //extent += SimdVector3(.2f,.2f,.2f); + aabbMin = center - extent; aabbMax = center + extent; diff --git a/extern/bullet/Bullet/CollisionShapes/BoxShape.h b/extern/bullet/Bullet/CollisionShapes/BoxShape.h index 9d7806fc522..755de78dffb 100644 --- a/extern/bullet/Bullet/CollisionShapes/BoxShape.h +++ b/extern/bullet/Bullet/CollisionShapes/BoxShape.h @@ -33,6 +33,10 @@ public: } SimdVector3 GetHalfExtents() const; + //{ return m_boxHalfExtents1 * m_localScaling;} + //const SimdVector3& GetHalfExtents() const{ return m_boxHalfExtents1;} + + virtual int GetShapeType() const { return BOX_SHAPE_PROXYTYPE;} @@ -40,13 +44,14 @@ public: { SimdVector3 halfExtents = GetHalfExtents(); - + SimdVector3 margin(GetMargin(),GetMargin(),GetMargin()); + halfExtents -= margin; + SimdVector3 supVertex; supVertex = SimdPoint3(vec.x() < SimdScalar(0.0f) ? -halfExtents.x() : halfExtents.x(), vec.y() < SimdScalar(0.0f) ? -halfExtents.y() : halfExtents.y(), vec.z() < SimdScalar(0.0f) ? -halfExtents.z() : halfExtents.z()); - if ( GetMargin()!=0.f ) { SimdVector3 vecnorm = vec; @@ -64,6 +69,8 @@ public: virtual SimdVector3 LocalGetSupportingVertexWithoutMargin(const SimdVector3& vec)const { SimdVector3 halfExtents = GetHalfExtents(); + SimdVector3 margin(GetMargin(),GetMargin(),GetMargin()); + halfExtents -= margin; return SimdVector3(vec.x() < SimdScalar(0.0f) ? -halfExtents.x() : halfExtents.x(), vec.y() < SimdScalar(0.0f) ? -halfExtents.y() : halfExtents.y(), diff --git a/extern/bullet/BulletDynamics/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cpp b/extern/bullet/BulletDynamics/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cpp index 54cbd6ca5d6..b0415c75d61 100644 --- a/extern/bullet/BulletDynamics/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cpp +++ b/extern/bullet/BulletDynamics/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cpp @@ -143,7 +143,7 @@ void ConvexConcaveCollisionAlgorithm::ProcessCollision (BroadphaseProxy* ,Broadp if (m_convex.IsConvexShape()) { - float collisionMarginTriangle = triangleMesh->GetMargin(); + float collisionMarginTriangle = 0.02f;//triangleMesh->GetMargin(); m_boxTriangleCallback.SetTimeStepAndCounters(timeStep,stepCount, collisionMarginTriangle,useContinuous); #ifdef USE_BOX_TRIANGLE |