diff options
Diffstat (limited to 'thirdparty/bullet/Bullet3Common')
-rw-r--r-- | thirdparty/bullet/Bullet3Common/b3Quaternion.h | 5 | ||||
-rw-r--r-- | thirdparty/bullet/Bullet3Common/b3Vector3.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/thirdparty/bullet/Bullet3Common/b3Quaternion.h b/thirdparty/bullet/Bullet3Common/b3Quaternion.h index 9bd5ff7d90..4fdd72dcc4 100644 --- a/thirdparty/bullet/Bullet3Common/b3Quaternion.h +++ b/thirdparty/bullet/Bullet3Common/b3Quaternion.h @@ -92,8 +92,11 @@ public: /**@brief Set the rotation using axis angle notation * @param axis The axis around which to rotate * @param angle The magnitude of the rotation in Radians */ - void setRotation(const b3Vector3& axis, const b3Scalar& _angle) + void setRotation(const b3Vector3& axis1, const b3Scalar& _angle) { + b3Vector3 axis = axis1; + axis.safeNormalize(); + b3Scalar d = axis.length(); b3Assert(d != b3Scalar(0.0)); if (d < B3_EPSILON) diff --git a/thirdparty/bullet/Bullet3Common/b3Vector3.h b/thirdparty/bullet/Bullet3Common/b3Vector3.h index 56e6c13311..a70d68d6e1 100644 --- a/thirdparty/bullet/Bullet3Common/b3Vector3.h +++ b/thirdparty/bullet/Bullet3Common/b3Vector3.h @@ -36,7 +36,7 @@ subject to the following restrictions: #pragma warning(disable : 4556) // value of intrinsic immediate argument '4294967239' is out of range '0 - 255' #endif -#define B3_SHUFFLE(x, y, z, w) ((w) << 6 | (z) << 4 | (y) << 2 | (x)) +#define B3_SHUFFLE(x, y, z, w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff) //#define b3_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) ) #define b3_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask)) #define b3_splat3_ps(_a, _i) b3_pshufd_ps((_a), B3_SHUFFLE(_i, _i, _i, 3)) |