some minor comment-renames, and moved some data from box/sphere into common convex.

This commit is contained in:
ejcoumans
2006-09-28 20:14:10 +00:00
parent 839c9b01c0
commit 21482e4cab
13 changed files with 39 additions and 29 deletions

View File

@@ -19,11 +19,10 @@ subject to the following restrictions:
#include "btConvexShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
///SphereShape implements an implicit (getSupportingVertex) Sphere
///btSphereShape implements an implicit (getSupportingVertex) Sphere
class btSphereShape : public btConvexShape
{
btScalar m_radius;
public:
btSphereShape (btScalar radius);
@@ -41,7 +40,7 @@ public:
virtual int getShapeType() const { return SPHERE_SHAPE_PROXYTYPE; }
btScalar getRadius() const { return m_radius;}
btScalar getRadius() const { return m_implicitShapeDimensions.getX();}
//debugging
virtual char* getName()const {return "SPHERE";}
@@ -54,7 +53,7 @@ public:
{
//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[0] * m_radius + btConvexShape::getMargin();
return m_localScaling.getX() * getRadius() + btConvexShape::getMargin();
}