syntax error fix, removed comma, see http://code.google.com/p/bullet/issues/detail?id=76&can=1
Fix btOptimizedBvh, thanks to reltham, http://code.google.com/p/bullet/issues/detail?id=72&can=1
This commit is contained in:
@@ -61,7 +61,7 @@ struct btDbvtBroadphase : btBroadphaseInterface
|
|||||||
enum {
|
enum {
|
||||||
DYNAMIC_SET = 0, /* Dynamic set index */
|
DYNAMIC_SET = 0, /* Dynamic set index */
|
||||||
FIXED_SET = 1, /* Fixed set index */
|
FIXED_SET = 1, /* Fixed set index */
|
||||||
STAGECOUNT = 2, /* Number of stages */
|
STAGECOUNT = 2 /* Number of stages */
|
||||||
};
|
};
|
||||||
/* Fields */
|
/* Fields */
|
||||||
btDbvt m_sets[2]; // Dbvt sets
|
btDbvt m_sets[2]; // Dbvt sets
|
||||||
|
|||||||
@@ -804,9 +804,9 @@ void btOptimizedBvh::walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback*
|
|||||||
rayDirection.normalize ();
|
rayDirection.normalize ();
|
||||||
lambda_max = rayDirection.dot(rayTarget-raySource);
|
lambda_max = rayDirection.dot(rayTarget-raySource);
|
||||||
///what about division by zero? --> just set rayDirection[i] to 1.0
|
///what about division by zero? --> just set rayDirection[i] to 1.0
|
||||||
rayDirection[0] = rayDirection[0] == btScalar(0.0) ? btScalar(1.0) : btScalar(1.0) / rayDirection[0];
|
rayDirection[0] = rayDirection[0] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDirection[0];
|
||||||
rayDirection[1] = rayDirection[1] == btScalar(0.0) ? btScalar(1.0) : btScalar(1.0) / rayDirection[1];
|
rayDirection[1] = rayDirection[1] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDirection[1];
|
||||||
rayDirection[2] = rayDirection[2] == btScalar(0.0) ? btScalar(1.0) : btScalar(1.0) / rayDirection[2];
|
rayDirection[2] = rayDirection[2] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDirection[2];
|
||||||
unsigned int sign[3] = { rayDirection[0] < 0.0, rayDirection[1] < 0.0, rayDirection[2] < 0.0};
|
unsigned int sign[3] = { rayDirection[0] < 0.0, rayDirection[1] < 0.0, rayDirection[2] < 0.0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user