29#ifndef PX_VEC_MATH_SSE_H
30#define PX_VEC_MATH_SSE_H
41 const PX_ALIGN(16, PxF32) minus1w[4] = { 0.0f, 0.0f, 0.0f, -1.0f };
44PX_FORCE_INLINE void QuatGetMat33V(
const QuatVArg q, Vec3V& column0, Vec3V& column1, Vec3V& column2)
46 const __m128 q2 = V4Add(q, q);
47 const __m128 qw2 = V4MulAdd(q2, V4GetW(q), _mm_load_ps(minus1w));
48 const __m128 nw2 = Vec3V_From_Vec4V(V4Neg(qw2));
49 const __m128 v = Vec3V_From_Vec4V(q);
51 const __m128 a0 = _mm_shuffle_ps(qw2, nw2, _MM_SHUFFLE(3, 1, 2, 3));
52 column0 = V4MulAdd(v, V4GetX(q2), a0);
54 const __m128 a1 = _mm_shuffle_ps(qw2, nw2, _MM_SHUFFLE(3, 2, 0, 3));
55 column1 = V4MulAdd(v, V4GetY(q2), _mm_shuffle_ps(a1, a1, _MM_SHUFFLE(3, 1, 0, 2)));
57 const __m128 a2 = _mm_shuffle_ps(qw2, nw2, _MM_SHUFFLE(3, 0, 1, 3));
58 column2 = V4MulAdd(v, V4GetZ(q2), _mm_shuffle_ps(a2, a2, _MM_SHUFFLE(3, 0, 2, 1)));
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_ALIGN(alignment, decl)
Definition PxPreprocessor.h:402
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39