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
path: root/extern
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2005-09-06 20:45:48 +0400
committerErwin Coumans <blender@erwincoumans.com>2005-09-06 20:45:48 +0400
commitbbffe9b5b22b976923acfeafa1d6721a86774bfe (patch)
treebc949bcadf0dbbec2ee8a784bb53694d9cc5abe7 /extern
parent35734007dedc942a8a0122bbd28f9dcbec72ca80 (diff)
added some get methods and stuff
Diffstat (limited to 'extern')
-rw-r--r--extern/bullet/Bullet/CollisionShapes/CollisionShape.h1
-rw-r--r--extern/bullet/Bullet/CollisionShapes/ConvexShape.h4
-rw-r--r--extern/bullet/Bullet/CollisionShapes/CylinderShape.h5
-rw-r--r--extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.cpp7
-rw-r--r--extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.h1
-rw-r--r--extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp7
-rw-r--r--extern/bullet/Bullet/NarrowPhaseCollision/RaycastCallback.cpp2
-rw-r--r--extern/bullet/Bullet/NarrowPhaseCollision/SubSimplexConvexCast.cpp2
8 files changed, 26 insertions, 3 deletions
diff --git a/extern/bullet/Bullet/CollisionShapes/CollisionShape.h b/extern/bullet/Bullet/CollisionShapes/CollisionShape.h
index 2a2d0543bb2..c43ce933a2f 100644
--- a/extern/bullet/Bullet/CollisionShapes/CollisionShape.h
+++ b/extern/bullet/Bullet/CollisionShapes/CollisionShape.h
@@ -59,6 +59,7 @@ public:
virtual void setLocalScaling(const SimdVector3& scaling) =0;
+ virtual const SimdVector3& getLocalScaling() const =0;
virtual void CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia) = 0;
diff --git a/extern/bullet/Bullet/CollisionShapes/ConvexShape.h b/extern/bullet/Bullet/CollisionShapes/ConvexShape.h
index 345358e47fc..1ec962c591c 100644
--- a/extern/bullet/Bullet/CollisionShapes/ConvexShape.h
+++ b/extern/bullet/Bullet/CollisionShapes/ConvexShape.h
@@ -51,6 +51,10 @@ public:
virtual void setLocalScaling(const SimdVector3& scaling);
+ virtual const SimdVector3& getLocalScaling() const
+ {
+ return m_localScaling;
+ }
virtual void SetMargin(float margin)
diff --git a/extern/bullet/Bullet/CollisionShapes/CylinderShape.h b/extern/bullet/Bullet/CollisionShapes/CylinderShape.h
index 11f184db761..4fa40e92f1e 100644
--- a/extern/bullet/Bullet/CollisionShapes/CylinderShape.h
+++ b/extern/bullet/Bullet/CollisionShapes/CylinderShape.h
@@ -24,6 +24,11 @@ class CylinderShape : public BoxShape
public:
CylinderShape (const SimdVector3& halfExtents);
+ ///GetAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+ void GetAabb(const SimdTransform& t,SimdVector3& aabbMin,SimdVector3& aabbMax) const
+ {
+ GetAabbSlow(t,aabbMin,aabbMax);
+ }
virtual SimdVector3 LocalGetSupportingVertexWithoutMargin(const SimdVector3& vec)const;
diff --git a/extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.cpp b/extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.cpp
index c09599f39b1..259e673759a 100644
--- a/extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.cpp
+++ b/extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.cpp
@@ -100,6 +100,13 @@ void TriangleMeshShape::setLocalScaling(const SimdVector3& scaling)
m_meshInterface->setScaling(scaling);
}
+const SimdVector3& TriangleMeshShape::getLocalScaling() const
+{
+ return m_meshInterface->getScaling();
+}
+
+
+
void TriangleMeshShape::ProcessAllTriangles(TriangleCallback* callback,const SimdVector3& aabbMin,const SimdVector3& aabbMax) const
{
diff --git a/extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.h b/extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.h
index 2083985e6cc..6ca8fef8ef0 100644
--- a/extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.h
+++ b/extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.h
@@ -53,6 +53,7 @@ public:
virtual void CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia);
virtual void setLocalScaling(const SimdVector3& scaling);
+ virtual const SimdVector3& getLocalScaling() const;
//debugging
diff --git a/extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp b/extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp
index 2d4e7f01420..d923d6f51f1 100644
--- a/extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp
+++ b/extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp
@@ -103,8 +103,13 @@ void PersistentManifold::AddManifoldPoint(const ManifoldPoint& newPoint)
int insertIndex = GetNumContacts();
if (insertIndex == MANIFOLD_CACHE_SIZE)
{
- //sort cache so best points come first
+#if MANIFOLD_CACHE_SIZE >= 4
+ //sort cache so best points come first, based on area
insertIndex = SortCachedPoints(newPoint);
+#else
+ insertIndex = 0;
+#endif
+
} else
{
m_cachedPoints++;
diff --git a/extern/bullet/Bullet/NarrowPhaseCollision/RaycastCallback.cpp b/extern/bullet/Bullet/NarrowPhaseCollision/RaycastCallback.cpp
index 98eb1067063..62ca91f768c 100644
--- a/extern/bullet/Bullet/NarrowPhaseCollision/RaycastCallback.cpp
+++ b/extern/bullet/Bullet/NarrowPhaseCollision/RaycastCallback.cpp
@@ -26,6 +26,8 @@ RaycastCallback::RaycastCallback(const SimdVector3& from,const SimdVector3& to)
void RaycastCallback::ProcessTriangle(SimdVector3* triangle)
{
+
+
const SimdVector3 &vert0=triangle[0];
const SimdVector3 &vert1=triangle[1];
const SimdVector3 &vert2=triangle[2];
diff --git a/extern/bullet/Bullet/NarrowPhaseCollision/SubSimplexConvexCast.cpp b/extern/bullet/Bullet/NarrowPhaseCollision/SubSimplexConvexCast.cpp
index a280c031a27..80fea519887 100644
--- a/extern/bullet/Bullet/NarrowPhaseCollision/SubSimplexConvexCast.cpp
+++ b/extern/bullet/Bullet/NarrowPhaseCollision/SubSimplexConvexCast.cpp
@@ -114,8 +114,6 @@ bool SubsimplexConvexCast::calcTimeOfImpact(
int numiter = MAX_ITERATIONS - maxIter;
// printf("number of iterations: %d", numiter);
-
- //printf("lambd%f",lambda);
result.m_fraction = lambda;
result.m_normal = n;