further work on shared memory API
fix dependency of BulletDynamics to Bullet3Common (b3Printf)
This commit is contained in:
@@ -48,7 +48,7 @@ btConvexShape::~btConvexShape()
|
||||
}
|
||||
|
||||
|
||||
void btConvexShape::project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max) const
|
||||
void btConvexShape::project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max, btVector3& witnesPtMin,btVector3& witnesPtMax) const
|
||||
{
|
||||
btVector3 localAxis = dir*trans.getBasis();
|
||||
btVector3 vtx1 = trans(localGetSupportingVertex(localAxis));
|
||||
@@ -56,12 +56,16 @@ void btConvexShape::project(const btTransform& trans, const btVector3& dir, btSc
|
||||
|
||||
min = vtx1.dot(dir);
|
||||
max = vtx2.dot(dir);
|
||||
|
||||
witnesPtMax = vtx2;
|
||||
witnesPtMin = vtx1;
|
||||
|
||||
if(min>max)
|
||||
{
|
||||
btScalar tmp = min;
|
||||
min = max;
|
||||
max = tmp;
|
||||
witnesPtMax = vtx1;
|
||||
witnesPtMin = vtx2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,8 @@ public:
|
||||
btScalar getMarginNonVirtual () const;
|
||||
void getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
|
||||
|
||||
virtual void project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max) const;
|
||||
|
||||
virtual void project(const btTransform& trans, const btVector3& dir, btScalar& minProj, btScalar& maxProj, btVector3& witnesPtMin,btVector3& witnesPtMax) const;
|
||||
|
||||
|
||||
//notice that the vectors should be unit length
|
||||
|
||||
Reference in New Issue
Block a user