15 #ifndef BT_SIMD__QUATERNION_H_
16 #define BT_SIMD__QUATERNION_H_
21 #ifdef BT_USE_DOUBLE_PRECISION
22 #define btQuaternionData btQuaternionDoubleData
23 #define btQuaternionDataName "btQuaternionDoubleData"
25 #define btQuaternionData btQuaternionFloatData
26 #define btQuaternionDataName "btQuaternionFloatData"
32 #define vOnes (_mm_set_ps(1.0f, 1.0f, 1.0f, 1.0f))
36 #if defined(BT_USE_SSE)
38 #define vQInv (_mm_set_ps(+0.0f, -0.0f, -0.0f, -0.0f))
39 #define vPPPM (_mm_set_ps(-0.0f, +0.0f, +0.0f, +0.0f))
41 #elif defined(BT_USE_NEON)
55 #if (defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)) || defined(BT_USE_NEON)
65 mVec128 = rhs.mVec128;
99 #ifndef BT_EULER_DEFAULT_ZYX
113 setValue(axis.x() * s, axis.y() * s, axis.z() * s,
131 setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw,
132 cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw,
133 sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw,
134 cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw);
151 setValue(sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw,
152 cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw,
153 cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw,
154 cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw);
202 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
203 mVec128 = _mm_add_ps(mVec128, q.mVec128);
204 #elif defined(BT_USE_NEON)
205 mVec128 = vaddq_f32(mVec128, q.mVec128);
219 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
220 mVec128 = _mm_sub_ps(mVec128, q.mVec128);
221 #elif defined(BT_USE_NEON)
222 mVec128 = vsubq_f32(mVec128, q.mVec128);
236 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
237 __m128 vs = _mm_load_ss(&s);
238 vs = bt_pshufd_ps(vs, 0);
239 mVec128 = _mm_mul_ps(mVec128, vs);
240 #elif defined(BT_USE_NEON)
241 mVec128 = vmulq_n_f32(mVec128, s);
256 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
257 __m128 vQ2 = q.get128();
259 __m128
A1 = bt_pshufd_ps(mVec128, BT_SHUFFLE(0, 1, 2, 0));
260 __m128
B1 = bt_pshufd_ps(vQ2, BT_SHUFFLE(3, 3, 3, 0));
264 __m128
A2 = bt_pshufd_ps(mVec128, BT_SHUFFLE(1, 2, 0, 1));
265 __m128
B2 = bt_pshufd_ps(vQ2, BT_SHUFFLE(2, 0, 1, 1));
269 B1 = bt_pshufd_ps(mVec128, BT_SHUFFLE(2, 0, 1, 2));
270 B2 = bt_pshufd_ps(vQ2, BT_SHUFFLE(1, 2, 0, 2));
274 mVec128 = bt_splat_ps(mVec128, 3);
275 mVec128 = mVec128 * vQ2;
278 mVec128 = mVec128 -
B1;
279 A1 = _mm_xor_ps(
A1, vPPPM);
280 mVec128 = mVec128 +
A1;
282 #elif defined(BT_USE_NEON)
284 float32x4_t vQ1 = mVec128;
285 float32x4_t vQ2 = q.get128();
287 float32x2_t vQ1zx, vQ2wx, vQ1yz, vQ2zx, vQ2yz, vQ2xz;
291 tmp = vtrn_f32(vget_high_f32(vQ1), vget_low_f32(vQ1));
294 tmp = vtrn_f32(vget_high_f32(vQ2), vget_low_f32(vQ2));
297 vQ2wx = vext_f32(vget_high_f32(vQ2), vget_low_f32(vQ2), 1);
299 vQ1yz = vext_f32(vget_low_f32(vQ1), vget_high_f32(vQ1), 1);
301 vQ2yz = vext_f32(vget_low_f32(vQ2), vget_high_f32(vQ2), 1);
302 vQ2xz = vext_f32(vQ2zx, vQ2zx, 1);
304 A1 = vcombine_f32(vget_low_f32(vQ1), vQ1zx);
305 B1 = vcombine_f32(vdup_lane_f32(vget_high_f32(vQ2), 1), vQ2wx);
307 A2 = vcombine_f32(vQ1yz, vget_low_f32(vQ1));
308 B2 = vcombine_f32(vQ2zx, vdup_lane_f32(vget_low_f32(vQ2), 1));
310 A3 = vcombine_f32(vQ1zx, vQ1yz);
311 B3 = vcombine_f32(vQ2yz, vQ2xz);
315 A3 = vmulq_f32(A3,
B3);
316 A0 = vmulq_lane_f32(vQ2, vget_high_f32(vQ1), 1);
319 A0 = vsubq_f32(
A0, A3);
322 A1 = (btSimdFloat4)veorq_s32((int32x4_t)
A1, (int32x4_t)vPPPM);
339 #if defined BT_USE_SIMD_VECTOR3 && defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
342 vd = _mm_mul_ps(mVec128, q.mVec128);
344 __m128
t = _mm_movehl_ps(vd, vd);
345 vd = _mm_add_ps(vd,
t);
346 t = _mm_shuffle_ps(vd, vd, 0x55);
347 vd = _mm_add_ss(vd,
t);
349 return _mm_cvtss_f32(vd);
350 #elif defined(BT_USE_NEON)
351 float32x4_t vd = vmulq_f32(mVec128, q.mVec128);
352 float32x2_t
x = vpadd_f32(vget_low_f32(vd), vget_high_f32(vd));
354 return vget_lane_f32(
x, 0);
387 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
390 vd = _mm_mul_ps(mVec128, mVec128);
392 __m128
t = _mm_movehl_ps(vd, vd);
393 vd = _mm_add_ps(vd,
t);
394 t = _mm_shuffle_ps(vd, vd, 0x55);
395 vd = _mm_add_ss(vd,
t);
397 vd = _mm_sqrt_ss(vd);
398 vd = _mm_div_ss(vOnes, vd);
399 vd = bt_pshufd_ps(vd, 0);
400 mVec128 = _mm_mul_ps(mVec128, vd);
413 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
414 __m128 vs = _mm_load_ss(&s);
415 vs = bt_pshufd_ps(vs, 0x00);
418 #elif defined(BT_USE_NEON)
499 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
501 #elif defined(BT_USE_NEON)
502 return btQuaternion((btSimdFloat4)veorq_s32((int32x4_t)mVec128, (int32x4_t)vQInv));
513 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
515 #elif defined(BT_USE_NEON)
519 return btQuaternion(
q1.x() + q2.x(),
q1.y() + q2.y(),
q1.z() + q2.z(),
q1.m_floats[3] + q2.m_floats[3]);
528 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
530 #elif defined(BT_USE_NEON)
534 return btQuaternion(
q1.x() - q2.x(),
q1.y() - q2.y(),
q1.z() - q2.z(),
q1.m_floats[3] - q2.m_floats[3]);
542 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
544 #elif defined(BT_USE_NEON)
545 return btQuaternion((btSimdFloat4)veorq_s32((int32x4_t)mVec128, (int32x4_t)btvMzeroMask));
548 return btQuaternion(-q2.x(), -q2.y(), -q2.z(), -q2.m_floats[3]);
635 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
636 __m128 vQ1 =
q1.get128();
637 __m128 vQ2 = q2.get128();
640 A1 = bt_pshufd_ps(vQ1, BT_SHUFFLE(0, 1, 2, 0));
641 B1 = bt_pshufd_ps(vQ2, BT_SHUFFLE(3, 3, 3, 0));
645 A2 = bt_pshufd_ps(vQ1, BT_SHUFFLE(1, 2, 0, 1));
646 B2 = bt_pshufd_ps(vQ2, BT_SHUFFLE(2, 0, 1, 1));
650 B1 = bt_pshufd_ps(vQ1, BT_SHUFFLE(2, 0, 1, 2));
651 B2 = bt_pshufd_ps(vQ2, BT_SHUFFLE(1, 2, 0, 2));
655 A0 = bt_splat_ps(vQ1, 3);
661 A1 = _mm_xor_ps(
A1, vPPPM);
666 #elif defined(BT_USE_NEON)
668 float32x4_t vQ1 =
q1.get128();
669 float32x4_t vQ2 = q2.get128();
671 float32x2_t vQ1zx, vQ2wx, vQ1yz, vQ2zx, vQ2yz, vQ2xz;
675 tmp = vtrn_f32(vget_high_f32(vQ1), vget_low_f32(vQ1));
678 tmp = vtrn_f32(vget_high_f32(vQ2), vget_low_f32(vQ2));
681 vQ2wx = vext_f32(vget_high_f32(vQ2), vget_low_f32(vQ2), 1);
683 vQ1yz = vext_f32(vget_low_f32(vQ1), vget_high_f32(vQ1), 1);
685 vQ2yz = vext_f32(vget_low_f32(vQ2), vget_high_f32(vQ2), 1);
686 vQ2xz = vext_f32(vQ2zx, vQ2zx, 1);
688 A1 = vcombine_f32(vget_low_f32(vQ1), vQ1zx);
689 B1 = vcombine_f32(vdup_lane_f32(vget_high_f32(vQ2), 1), vQ2wx);
691 A2 = vcombine_f32(vQ1yz, vget_low_f32(vQ1));
692 B2 = vcombine_f32(vQ2zx, vdup_lane_f32(vget_low_f32(vQ2), 1));
694 A3 = vcombine_f32(vQ1zx, vQ1yz);
695 B3 = vcombine_f32(vQ2yz, vQ2xz);
699 A3 = vmulq_f32(A3,
B3);
700 A0 = vmulq_lane_f32(vQ2, vget_high_f32(vQ1), 1);
703 A0 = vsubq_f32(
A0, A3);
706 A1 = (btSimdFloat4)veorq_s32((int32x4_t)
A1, (int32x4_t)vPPPM);
713 q1.w() * q2.x() +
q1.x() * q2.w() +
q1.y() * q2.z() -
q1.z() * q2.y(),
714 q1.w() * q2.y() +
q1.y() * q2.w() +
q1.z() * q2.x() -
q1.x() * q2.z(),
715 q1.w() * q2.z() +
q1.z() * q2.w() +
q1.x() * q2.y() -
q1.y() * q2.x(),
716 q1.w() * q2.w() -
q1.x() * q2.x() -
q1.y() * q2.y() -
q1.z() * q2.z());
723 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
724 __m128 vQ1 = q.get128();
725 __m128 vQ2 =
w.get128();
728 A1 = bt_pshufd_ps(vQ1, BT_SHUFFLE(3, 3, 3, 0));
729 B1 = bt_pshufd_ps(vQ2, BT_SHUFFLE(0, 1, 2, 0));
733 A2 = bt_pshufd_ps(vQ1, BT_SHUFFLE(1, 2, 0, 1));
734 B2 = bt_pshufd_ps(vQ2, BT_SHUFFLE(2, 0, 1, 1));
738 A3 = bt_pshufd_ps(vQ1, BT_SHUFFLE(2, 0, 1, 2));
739 B3 = bt_pshufd_ps(vQ2, BT_SHUFFLE(1, 2, 0, 2));
744 A1 = _mm_xor_ps(
A1, vPPPM);
749 #elif defined(BT_USE_NEON)
751 float32x4_t vQ1 = q.get128();
752 float32x4_t vQ2 =
w.get128();
754 float32x2_t vQ1wx, vQ2zx, vQ1yz, vQ2yz, vQ1zx, vQ2xz;
756 vQ1wx = vext_f32(vget_high_f32(vQ1), vget_low_f32(vQ1), 1);
760 tmp = vtrn_f32(vget_high_f32(vQ2), vget_low_f32(vQ2));
763 tmp = vtrn_f32(vget_high_f32(vQ1), vget_low_f32(vQ1));
767 vQ1yz = vext_f32(vget_low_f32(vQ1), vget_high_f32(vQ1), 1);
769 vQ2yz = vext_f32(vget_low_f32(vQ2), vget_high_f32(vQ2), 1);
770 vQ2xz = vext_f32(vQ2zx, vQ2zx, 1);
772 A1 = vcombine_f32(vdup_lane_f32(vget_high_f32(vQ1), 1), vQ1wx);
773 B1 = vcombine_f32(vget_low_f32(vQ2), vQ2zx);
775 A2 = vcombine_f32(vQ1yz, vget_low_f32(vQ1));
776 B2 = vcombine_f32(vQ2zx, vdup_lane_f32(vget_low_f32(vQ2), 1));
778 A3 = vcombine_f32(vQ1zx, vQ1yz);
779 B3 = vcombine_f32(vQ2yz, vQ2xz);
783 A3 = vmulq_f32(A3,
B3);
788 A1 = (btSimdFloat4)veorq_s32((int32x4_t)
A1, (int32x4_t)vPPPM);
790 A1 = vsubq_f32(
A1, A3);
796 q.w() *
w.x() + q.y() *
w.z() - q.z() *
w.y(),
797 q.w() *
w.y() + q.z() *
w.x() - q.x() *
w.z(),
798 q.w() *
w.z() + q.x() *
w.y() - q.y() *
w.x(),
799 -q.x() *
w.x() - q.y() *
w.y() - q.z() *
w.z());
806 #if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
807 __m128 vQ1 =
w.get128();
808 __m128 vQ2 = q.get128();
811 A1 = bt_pshufd_ps(vQ1, BT_SHUFFLE(0, 1, 2, 0));
812 B1 = bt_pshufd_ps(vQ2, BT_SHUFFLE(3, 3, 3, 0));
816 A2 = bt_pshufd_ps(vQ1, BT_SHUFFLE(1, 2, 0, 1));
817 B2 = bt_pshufd_ps(vQ2, BT_SHUFFLE(2, 0, 1, 1));
821 A3 = bt_pshufd_ps(vQ1, BT_SHUFFLE(2, 0, 1, 2));
822 B3 = bt_pshufd_ps(vQ2, BT_SHUFFLE(1, 2, 0, 2));
827 A1 = _mm_xor_ps(
A1, vPPPM);
832 #elif defined(BT_USE_NEON)
834 float32x4_t vQ1 =
w.get128();
835 float32x4_t vQ2 = q.get128();
837 float32x2_t vQ1zx, vQ2wx, vQ1yz, vQ2zx, vQ2yz, vQ2xz;
842 tmp = vtrn_f32(vget_high_f32(vQ1), vget_low_f32(vQ1));
845 tmp = vtrn_f32(vget_high_f32(vQ2), vget_low_f32(vQ2));
848 vQ2wx = vext_f32(vget_high_f32(vQ2), vget_low_f32(vQ2), 1);
850 vQ1yz = vext_f32(vget_low_f32(vQ1), vget_high_f32(vQ1), 1);
852 vQ2yz = vext_f32(vget_low_f32(vQ2), vget_high_f32(vQ2), 1);
853 vQ2xz = vext_f32(vQ2zx, vQ2zx, 1);
855 A1 = vcombine_f32(vget_low_f32(vQ1), vQ1zx);
856 B1 = vcombine_f32(vdup_lane_f32(vget_high_f32(vQ2), 1), vQ2wx);
858 A2 = vcombine_f32(vQ1yz, vget_low_f32(vQ1));
859 B2 = vcombine_f32(vQ2zx, vdup_lane_f32(vget_low_f32(vQ2), 1));
861 A3 = vcombine_f32(vQ1zx, vQ1yz);
862 B3 = vcombine_f32(vQ2yz, vQ2xz);
866 A3 = vmulq_f32(A3,
B3);
871 A1 = (btSimdFloat4)veorq_s32((int32x4_t)
A1, (int32x4_t)vPPPM);
873 A1 = vsubq_f32(
A1, A3);
879 +
w.x() * q.w() +
w.y() * q.z() -
w.z() * q.y(),
880 +
w.y() * q.w() +
w.z() * q.x() -
w.x() * q.z(),
881 +
w.z() * q.w() +
w.x() * q.y() -
w.y() * q.x(),
882 -
w.x() * q.x() -
w.y() * q.y() -
w.z() * q.z());
922 return q1.slerp(q2,
t);
930 #if defined BT_USE_SIMD_VECTOR3 && defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
931 return btVector3(_mm_and_ps(q.get128(), btvFFF0fMask));
932 #elif defined(BT_USE_NEON)
933 return btVector3((float32x4_t)vandq_s32((int32x4_t)q.get128(), btvFFF0Mask));
935 return btVector3(q.getX(), q.getY(), q.getZ());
955 return btQuaternion(
c.getX() * rs,
c.getY() * rs,
c.getZ() * rs, s * 0.5f);
979 for (
int i = 0; i < 4; i++)
985 for (
int i = 0; i < 4; i++)
992 for (
int i = 0; i < 4; i++)
998 for (
int i = 0; i < 4; i++)
1005 for (
int i = 0; i < 4; i++)
1011 for (
int i = 0; i < 4; i++)
1017 for (
int i = 0; i < 4; i++)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
ATTR_WARN_UNUSED_RESULT const BMVert * v
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
void setValue(const btScalar &xx, const btScalar &xy, const btScalar &xz, const btScalar &yx, const btScalar &yy, const btScalar &yz, const btScalar &zx, const btScalar &zy, const btScalar &zz)
Set the values of the matrix explicitly (row major)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
btQuadWord
The btQuadWord class is base class for btVector3 and btQuaternion. Some issues under PS3 Linux with I...
SIMD_FORCE_INLINE btQuaternion shortestArcQuat(const btVector3 &v0, const btVector3 &v1)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
SIMD_FORCE_INLINE btVector3 quatRotate(const btQuaternion &rotation, const btVector3 &v)
SIMD_FORCE_INLINE btQuaternion shortestArcQuatNormalize2(btVector3 &v0, btVector3 &v1)
SIMD_FORCE_INLINE btQuaternion operator*(const btQuaternion &q1, const btQuaternion &q2)
Return the product of two quaternions.
SIMD_FORCE_INLINE btScalar dot(const btQuaternion &q1, const btQuaternion &q2)
Calculate the dot product between two quaternions.
SIMD_FORCE_INLINE btScalar btAngle(const btQuaternion &q1, const btQuaternion &q2)
Return the angle between two quaternions.
SIMD_FORCE_INLINE btQuaternion inverse(const btQuaternion &q)
Return the inverse of a quaternion.
SIMD_FORCE_INLINE btQuaternion slerp(const btQuaternion &q1, const btQuaternion &q2, const btScalar &t)
Return the result of spherical linear interpolation betwen two quaternions.
SIMD_FORCE_INLINE btScalar btAcos(btScalar x)
SIMD_FORCE_INLINE btScalar btCos(btScalar x)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE btScalar btSin(btScalar x)
#define ATTRIBUTE_ALIGNED16(a)
SIMD_FORCE_INLINE btScalar btAsin(btScalar x)
SIMD_FORCE_INLINE btScalar btFabs(btScalar x)
SIMD_FORCE_INLINE btScalar btSqrt(btScalar y)
#define SIMD_FORCE_INLINE
SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y)
static T sum(const btAlignedObjectArray< T > &items)
SIMD_FORCE_INLINE void btPlaneSpace1(const T &n, T &p, T &q)
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
friend double dot(const Vector &lhs, const Vector &rhs)
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
btQuaternion operator/(const btScalar &s) const
Return an inversely scaled versionof this quaternion.
btQuaternion slerp(const btQuaternion &q, const btScalar &t) const
Return the quaternion which is the result of Spherical Linear Interpolation between this and the othe...
SIMD_FORCE_INLINE btQuaternion & operator+=(const btQuaternion &q)
Add two quaternions.
void getEulerZYX(btScalar &yawZ, btScalar &pitchY, btScalar &rollX) const
Get the euler angles from this quaternion.
btScalar angleShortestPath(const btQuaternion &q) const
Return the angle between this quaternion and the other along the shortest path.
SIMD_FORCE_INLINE btQuaternion operator*(const btScalar &s) const
Return a scaled version of this quaternion.
btQuaternion & operator/=(const btScalar &s)
Inversely scale this quaternion.
btScalar length() const
Return the length of the quaternion.
btQuaternion(const btVector3 &_axis, const btScalar &_angle)
Axis angle Constructor.
SIMD_FORCE_INLINE btQuaternion operator-(const btQuaternion &q2) const
Return the difference between this quaternion and the other.
btQuaternion()
No initialization constructor.
SIMD_FORCE_INLINE const btScalar & getW() const
btScalar dot(const btQuaternion &q) const
Return the dot product between this quaternion and another.
SIMD_FORCE_INLINE void deSerialize(const struct btQuaternionFloatData &dataIn)
SIMD_FORCE_INLINE btQuaternion farthest(const btQuaternion &qd) const
SIMD_FORCE_INLINE void serialize(struct btQuaternionData &dataOut) const
SIMD_FORCE_INLINE void serializeFloat(struct btQuaternionFloatData &dataOut) const
btScalar getAngle() const
Return the angle [0, 2Pi] of rotation represented by this quaternion.
SIMD_FORCE_INLINE void deSerializeFloat(const struct btQuaternionFloatData &dataIn)
static const btQuaternion & getIdentity()
btQuaternion(const btScalar &_x, const btScalar &_y, const btScalar &_z, const btScalar &_w)
Constructor from scalars.
btQuaternion & safeNormalize()
SIMD_FORCE_INLINE btQuaternion operator+(const btQuaternion &q2) const
Return the sum of this quaternion and the other.
btScalar angle(const btQuaternion &q) const
Return the half angle between this quaternion and the other.
SIMD_FORCE_INLINE void serializeDouble(struct btQuaternionDoubleData &dataOut) const
btQuaternion(const btScalar &yaw, const btScalar &pitch, const btScalar &roll)
Constructor from Euler angles.
btScalar length2() const
Return the length squared of the quaternion.
btQuaternion normalized() const
Return a normalized version of this quaternion.
btQuaternion inverse() const
Return the inverse of this quaternion.
SIMD_FORCE_INLINE btQuaternion nearest(const btQuaternion &qd) const
btQuaternion & operator*=(const btScalar &s)
Scale this quaternion.
btScalar getAngleShortestPath() const
Return the angle [0, Pi] of rotation represented by this quaternion along the shortest path.
btQuaternion & operator*=(const btQuaternion &q)
Multiply this quaternion by q on the right.
btQuaternion & operator-=(const btQuaternion &q)
Subtract out a quaternion.
btQuaternion & normalize()
Normalize the quaternion Such that x^2 + y^2 + z^2 +w^2 = 1.
btVector3 getAxis() const
Return the axis of the rotation represented by this quaternion.
void setRotation(const btVector3 &axis, const btScalar &_angle)
Set the rotation using axis angle notation.
void setEulerZYX(const btScalar &yawZ, const btScalar &pitchY, const btScalar &rollX)
Set the quaternion using euler angles.
SIMD_FORCE_INLINE void deSerializeDouble(const struct btQuaternionDoubleData &dataIn)
void setEuler(const btScalar &yaw, const btScalar &pitch, const btScalar &roll)
Set the quaternion using Euler angles.
SIMD_FORCE_INLINE btQuaternion operator-() const
Return the negative of this quaternion This simply negates each element.
static double B1(double u)
static double B3(double u)
static double B2(double u)
IMETHOD Vector diff(const Vector &a, const Vector &b, double dt=1)