applied patches against warnings, thanks a lot Ole K.
http://code.google.com/p/bullet/issues/detail?id=165 http://code.google.com/p/bullet/issues/detail?id=164 http://code.google.com/p/bullet/issues/detail?id=166 http://code.google.com/p/bullet/issues/detail?id=167
This commit is contained in:
@@ -393,12 +393,13 @@ static DBVT_INLINE btDbvtNode* sort(btDbvtNode* n,btDbvtNode*& r)
|
||||
return(n);
|
||||
}
|
||||
|
||||
//
|
||||
#if 0
|
||||
static DBVT_INLINE btDbvtNode* walkup(btDbvtNode* n,int count)
|
||||
{
|
||||
while(n&&(count--)) n=n->parent;
|
||||
return(n);
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// Api
|
||||
|
||||
@@ -82,7 +82,7 @@ subject to the following restrictions:
|
||||
#define DBVT_VIRTUAL_DTOR(a)
|
||||
#define DBVT_PREFIX template <typename T>
|
||||
#define DBVT_IPOLICY T& policy
|
||||
#define DBVT_CHECKTYPE static const ICollide& typechecker=*(T*)0;
|
||||
#define DBVT_CHECKTYPE static const ICollide& typechecker=*(T*)1;(void)typechecker;
|
||||
#else
|
||||
#define DBVT_VIRTUAL_DTOR(a) virtual ~a() {}
|
||||
#define DBVT_VIRTUAL virtual
|
||||
|
||||
@@ -211,23 +211,22 @@ void btDbvtBroadphase::getAabb(btBroadphaseProxy* absproxy,btVector3& aabbMin, b
|
||||
aabbMax = proxy->m_aabbMax;
|
||||
}
|
||||
|
||||
struct BroadphaseRayTester : btDbvt::ICollide
|
||||
{
|
||||
btBroadphaseRayCallback& m_rayCallback;
|
||||
BroadphaseRayTester(btBroadphaseRayCallback& orgCallback)
|
||||
:m_rayCallback(orgCallback)
|
||||
{
|
||||
}
|
||||
void Process(const btDbvtNode* leaf)
|
||||
{
|
||||
btDbvtProxy* proxy=(btDbvtProxy*)leaf->data;
|
||||
m_rayCallback.process(proxy);
|
||||
}
|
||||
};
|
||||
|
||||
void btDbvtBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin,const btVector3& aabbMax)
|
||||
{
|
||||
|
||||
struct BroadphaseRayTester : btDbvt::ICollide
|
||||
{
|
||||
btBroadphaseRayCallback& m_rayCallback;
|
||||
BroadphaseRayTester(btBroadphaseRayCallback& orgCallback)
|
||||
:m_rayCallback(orgCallback)
|
||||
{
|
||||
}
|
||||
void Process(const btDbvtNode* leaf)
|
||||
{
|
||||
btDbvtProxy* proxy=(btDbvtProxy*)leaf->data;
|
||||
m_rayCallback.process(proxy);
|
||||
}
|
||||
};
|
||||
|
||||
BroadphaseRayTester callback(rayCallback);
|
||||
|
||||
m_sets[0].rayTestInternal( m_sets[0].m_root,
|
||||
|
||||
@@ -469,7 +469,6 @@ void btQuantizedBvh::walkStacklessTreeAgainstRay(btNodeOverlapCallback* nodeCall
|
||||
rayAabbMax += aabbMax;
|
||||
|
||||
#ifdef RAYAABB2
|
||||
btVector3 rayFrom = raySource;
|
||||
btVector3 rayDir = (rayTarget-raySource);
|
||||
rayDir.normalize ();
|
||||
lambda_max = rayDir.dot(rayTarget-raySource);
|
||||
@@ -558,7 +557,6 @@ void btQuantizedBvh::walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback*
|
||||
btScalar lambda_max = 1.0;
|
||||
|
||||
#ifdef RAYAABB2
|
||||
btVector3 rayFrom = raySource;
|
||||
btVector3 rayDirection = (rayTarget-raySource);
|
||||
rayDirection.normalize ();
|
||||
lambda_max = rayDirection.dot(rayTarget-raySource);
|
||||
@@ -817,12 +815,13 @@ void btQuantizedBvh::assignInternalNodeFromLeafNode(int internalNode,int leafNod
|
||||
//PCK: include
|
||||
#include <new>
|
||||
|
||||
#if 0
|
||||
//PCK: consts
|
||||
static const unsigned BVH_ALIGNMENT = 16;
|
||||
static const unsigned BVH_ALIGNMENT_MASK = BVH_ALIGNMENT-1;
|
||||
|
||||
static const unsigned BVH_ALIGNMENT_BLOCKS = 2;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
unsigned int btQuantizedBvh::getAlignmentSerializationPadding()
|
||||
@@ -1146,3 +1145,4 @@ m_bulletVersion(BT_BULLET_VERSION)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user