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:
authorErwin Coumans <blender@erwincoumans.com>2008-09-03 06:27:16 +0400
committerErwin Coumans <blender@erwincoumans.com>2008-09-03 06:27:16 +0400
commit1926e846500212d11061c23cacdbd08d88e375da (patch)
treead72fe64632cfc22a4878e065578b66d52de218d /extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h
parent33ac84e888ee3e3217f15f955e1b389a9c4bb230 (diff)
Finally upgraded to latest Bullet subversion, about to release 2.71. Some recent changes in extern/bullet2 need to be re-applied, will check with Benoit. Ray tests in 0_FPS_Template.blend is broken, didn't figure out why yet.
HELP BUILD SYSTEM MAINTAINERS: Please help with updating all build systems: the newly added files need to be added. Note that the src/SoftBody has been added for future extension of real-time soft bodies.
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h
index 66521664087..83421d69e0d 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h
@@ -16,15 +16,17 @@ subject to the following restrictions:
#ifndef SPHERE_MINKOWSKI_H
#define SPHERE_MINKOWSKI_H
-#include "btConvexShape.h"
-#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types
+#include "btConvexInternalShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
-///btSphereShape implements an implicit (getSupportingVertex) Sphere
-ATTRIBUTE_ALIGNED16(class) btSphereShape : public btConvexShape
+///The btSphereShape implements an implicit sphere, centered around a local origin with radius.
+ATTRIBUTE_ALIGNED16(class) btSphereShape : public btConvexInternalShape
{
public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
btSphereShape (btScalar radius);
@@ -34,26 +36,26 @@ public:
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
- virtual void calculateLocalInertia(btScalar mass,btVector3& inertia);
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
virtual int getShapeType() const { return SPHERE_SHAPE_PROXYTYPE; }
- btScalar getRadius() const { return m_implicitShapeDimensions.getX();}
+ btScalar getRadius() const { return m_implicitShapeDimensions.getX() * m_localScaling.getX();}
//debugging
- virtual char* getName()const {return "SPHERE";}
+ virtual const char* getName()const {return "SPHERE";}
virtual void setMargin(btScalar margin)
{
- btConvexShape::setMargin(margin);
+ btConvexInternalShape::setMargin(margin);
}
virtual btScalar getMargin() const
{
//to improve gjk behaviour, use radius+margin as the full margin, so never get into the penetration case
//this means, non-uniform scaling is not supported anymore
- return m_localScaling.getX() * getRadius() + btConvexShape::getMargin();
+ return getRadius();
}