Fixes for broadphase/paircache determinism.
Revert definition for ATTRIBUTE_ALIGNED16, and try to force sizeof(btSolverConstraint) by using unions with btScalar, for non-btScalar data types. Use btAssert and not assert. Don't access btAlignedObjectArray elements, for zero sets
This commit is contained in:
@@ -58,7 +58,7 @@ public:
|
||||
void setRotation(const btVector3& axis, const btScalar& angle)
|
||||
{
|
||||
btScalar d = axis.length();
|
||||
assert(d != btScalar(0.0));
|
||||
btAssert(d != btScalar(0.0));
|
||||
btScalar s = btSin(angle * btScalar(0.5)) / d;
|
||||
setValue(axis.x() * s, axis.y() * s, axis.z() * s,
|
||||
btCos(angle * btScalar(0.5)));
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
* @param s The inverse scale factor */
|
||||
btQuaternion operator/(const btScalar& s) const
|
||||
{
|
||||
assert(s != btScalar(0.0));
|
||||
btAssert(s != btScalar(0.0));
|
||||
return *this * (btScalar(1.0) / s);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
* @param s The scale factor */
|
||||
btQuaternion& operator/=(const btScalar& s)
|
||||
{
|
||||
assert(s != btScalar(0.0));
|
||||
btAssert(s != btScalar(0.0));
|
||||
return *this *= btScalar(1.0) / s;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
btScalar angle(const btQuaternion& q) const
|
||||
{
|
||||
btScalar s = btSqrt(length2() * q.length2());
|
||||
assert(s != btScalar(0.0));
|
||||
btAssert(s != btScalar(0.0));
|
||||
return btAcos(dot(q) / s);
|
||||
}
|
||||
/**@brief Return the angle of rotation represented by this quaternion */
|
||||
|
||||
Reference in New Issue
Block a user