| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#ifndef QT3DCORE_MATRIX4X4_AVX2_P_H |
| 5 |
#define QT3DCORE_MATRIX4X4_AVX2_P_H |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#include <Qt3DCore/private/vector4d_p.h> |
| 19 |
#include <Qt3DCore/private/vector3d_p.h> |
| 20 |
#include <private/qsimd_p.h> |
| 21 |
#include <QMatrix4x4> |
| 22 |
|
| 23 |
#ifdef __AVX2__ |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#ifndef _mm256_set_m128 |
| 28 |
#define _mm256_set_m128(va, vb) \ |
| 29 |
_mm256_insertf128_ps(_mm256_castps128_ps256(vb), va, 1) |
| 30 |
#endif |
| 31 |
|
| 32 |
QT_BEGIN_NAMESPACE |
| 33 |
|
| 34 |
namespace Qt3DCore { |
| 35 |
|
| 36 |
class Matrix4x4_SSE |
| 37 |
{ |
| 38 |
public: |
| 39 |
|
| 40 |
Q_ALWAYS_INLINE Matrix4x4_SSE() { setToIdentity(); } |
| 41 |
explicit Q_ALWAYS_INLINE Matrix4x4_SSE(Qt::Initialization) {} |
| 42 |
|
| 43 |
|
| 44 |
explicit Q_ALWAYS_INLINE Matrix4x4_SSE(float *data) |
| 45 |
{ |
| 46 |
m_col12 = _mm256_load_ps(data); |
| 47 |
m_col34 = _mm256_load_ps(data + 8); |
| 48 |
} |
| 49 |
|
| 50 |
|
| 51 |
explicit Q_ALWAYS_INLINE Matrix4x4_SSE(const QMatrix4x4 &mat) |
| 52 |
{ |
| 53 |
|
| 54 |
const float *data = mat.constData(); |
| 55 |
m_col12 = _mm256_loadu_ps(data); |
| 56 |
m_col34 = _mm256_loadu_ps(data + 8); |
| 57 |
} |
| 58 |
|
| 59 |
|
| 60 |
explicit Q_ALWAYS_INLINE Matrix4x4_SSE(float m11, float m12, float m13, float m14, |
| 61 |
float m21, float m22, float m23, float m24, |
| 62 |
float m31, float m32, float m33, float m34, |
| 63 |
float m41, float m42, float m43, float m44) |
| 64 |
{ |
| 65 |
m_col12 = _mm256_set_ps(m42, m32, m22, m12, m41, m31, m21, m11); |
| 66 |
m_col34 = _mm256_set_ps(m44, m34, m24, m14, m43, m33, m23, m13); |
| 67 |
} |
| 68 |
|
| 69 |
Q_ALWAYS_INLINE void setToIdentity() |
| 70 |
{ |
| 71 |
|
| 72 |
m_col12 = _mm256_set_ps(0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); |
| 73 |
m_col34 = _mm256_set_ps(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f); |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
} |
| 98 |
|
| 99 |
Q_ALWAYS_INLINE Matrix4x4_SSE operator*(const Matrix4x4_SSE &other) const |
| 100 |
{ |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
const __m256 otherCol12 = other.m_col12; |
| 126 |
const __m256 otherCol34 = other.m_col34; |
| 127 |
const __m128 col1 = _mm256_extractf128_ps(m_col12, 0); |
| 128 |
const __m128 col2 = _mm256_extractf128_ps(m_col12, 1); |
| 129 |
const __m128 col3 = _mm256_extractf128_ps(m_col34, 0); |
| 130 |
const __m128 col4 = _mm256_extractf128_ps(m_col34, 1); |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
__m256 tmp = _mm256_mul_ps(_mm256_shuffle_ps(otherCol12, otherCol12, 0x00), _mm256_broadcast_ps(&col1)); |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
tmp = _mm256_add_ps(_mm256_mul_ps(_mm256_shuffle_ps(otherCol12, otherCol12, 0x55), _mm256_broadcast_ps(&col2)), tmp); |
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
tmp = _mm256_add_ps(_mm256_mul_ps(_mm256_shuffle_ps(otherCol12, otherCol12, 0xaa), _mm256_broadcast_ps(&col3)), tmp); |
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
tmp = _mm256_add_ps(_mm256_mul_ps(_mm256_shuffle_ps(otherCol12, otherCol12, 0xff), _mm256_broadcast_ps(&col4)), tmp); |
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
__m256 tmp2 = _mm256_mul_ps(_mm256_shuffle_ps(otherCol34, otherCol34, 0x00), _mm256_broadcast_ps(&col1)); |
| 181 |
tmp2 = _mm256_add_ps(_mm256_mul_ps(_mm256_shuffle_ps(otherCol34, otherCol34, 0x55), _mm256_broadcast_ps(&col2)), tmp2); |
| 182 |
tmp2 = _mm256_add_ps(_mm256_mul_ps(_mm256_shuffle_ps(otherCol34, otherCol34, 0xaa), _mm256_broadcast_ps(&col3)), tmp2); |
| 183 |
tmp2 = _mm256_add_ps(_mm256_mul_ps(_mm256_shuffle_ps(otherCol34, otherCol34, 0xff), _mm256_broadcast_ps(&col4)), tmp2); |
| 184 |
|
| 185 |
Matrix4x4_SSE c(Qt::Uninitialized); |
| 186 |
c.m_col12 = tmp; |
| 187 |
c.m_col34 = tmp2; |
| 188 |
return c; |
| 189 |
} |
| 190 |
|
| 191 |
Q_ALWAYS_INLINE Matrix4x4_SSE operator-(const Matrix4x4_SSE &other) const |
| 192 |
{ |
| 193 |
Matrix4x4_SSE c(Qt::Uninitialized); |
| 194 |
|
| 195 |
c.m_col12 = _mm256_sub_ps(m_col12, other.m_col12); |
| 196 |
c.m_col34 = _mm256_sub_ps(m_col34, other.m_col34); |
| 197 |
return c; |
| 198 |
} |
| 199 |
|
| 200 |
Q_ALWAYS_INLINE Matrix4x4_SSE operator+(const Matrix4x4_SSE &other) const |
| 201 |
{ |
| 202 |
Matrix4x4_SSE c(Qt::Uninitialized); |
| 203 |
|
| 204 |
c.m_col12 = _mm256_add_ps(m_col12, other.m_col12); |
| 205 |
c.m_col34 = _mm256_add_ps(m_col34, other.m_col34); |
| 206 |
return c; |
| 207 |
} |
| 208 |
|
| 209 |
Q_ALWAYS_INLINE Matrix4x4_SSE &operator*=(const Matrix4x4_SSE &other) |
| 210 |
{ |
| 211 |
*this = *this * other; |
| 212 |
return *this; |
| 213 |
} |
| 214 |
|
| 215 |
Q_ALWAYS_INLINE Matrix4x4_SSE &operator-=(const Matrix4x4_SSE &other) |
| 216 |
{ |
| 217 |
*this = *this - other; |
| 218 |
return *this; |
| 219 |
} |
| 220 |
|
| 221 |
Q_ALWAYS_INLINE Matrix4x4_SSE &operator+=(const Matrix4x4_SSE &other) |
| 222 |
{ |
| 223 |
*this = *this + other; |
| 224 |
return *this; |
| 225 |
} |
| 226 |
|
| 227 |
Q_ALWAYS_INLINE Matrix4x4_SSE transposed() const |
| 228 |
{ |
| 229 |
Matrix4x4_SSE c(Qt::Uninitialized); |
| 230 |
const __m128 col1 = _mm256_extractf128_ps(m_col12, 0); |
| 231 |
const __m128 col2 = _mm256_extractf128_ps(m_col12, 1); |
| 232 |
const __m128 col3 = _mm256_extractf128_ps(m_col34, 0); |
| 233 |
const __m128 col4 = _mm256_extractf128_ps(m_col34, 1); |
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
const __m128 tmp1 = _mm_shuffle_ps(col1, col2, 0xdd); |
| 273 |
const __m128 tmp2 = _mm_shuffle_ps(col1, col2, 0x88); |
| 274 |
const __m128 tmp3 = _mm_shuffle_ps(col3, col4, 0xdd); |
| 275 |
const __m128 tmp4 = _mm_shuffle_ps(col3, col4, 0x88); |
| 276 |
c.m_col12 = _mm256_set_m128(_mm_shuffle_ps(tmp1, tmp3, 0x88), _mm_shuffle_ps(tmp2, tmp4, 0x88)); |
| 277 |
c.m_col34 = _mm256_set_m128(_mm_shuffle_ps(tmp1, tmp3, 0xdd), _mm_shuffle_ps(tmp2, tmp4, 0xdd)); |
| 278 |
|
| 279 |
return c; |
| 280 |
} |
| 281 |
|
| 282 |
Q_ALWAYS_INLINE Matrix4x4_SSE inverted() const |
| 283 |
{ |
| 284 |
|
| 285 |
const QMatrix4x4 mat = toQMatrix4x4(); |
| 286 |
return Matrix4x4_SSE(mat.inverted()); |
| 287 |
} |
| 288 |
|
| 289 |
Q_ALWAYS_INLINE bool operator==(const Matrix4x4_SSE &other) const |
| 290 |
{ |
| 291 |
|
| 292 |
|
| 293 |
return (_mm256_movemask_ps(_mm256_cmp_ps(m_col12, other.m_col12, _CMP_EQ_OQ)) == 0xff && |
| 294 |
_mm256_movemask_ps(_mm256_cmp_ps(m_col34, other.m_col34, _CMP_EQ_OQ)) == 0xff); |
| 295 |
|
| 296 |
} |
| 297 |
|
| 298 |
Q_ALWAYS_INLINE bool operator!=(const Matrix4x4_SSE &other) const |
| 299 |
{ |
| 300 |
return !(*this == other); |
| 301 |
} |
| 302 |
|
| 303 |
|
| 304 |
Q_ALWAYS_INLINE float m11() const { return _mm_cvtss_f32(_mm256_extractf128_ps(m_col12, 0)); } |
| 305 |
Q_ALWAYS_INLINE float m12() const { return _mm_cvtss_f32(_mm256_extractf128_ps(m_col12, 1)); } |
| 306 |
Q_ALWAYS_INLINE float m13() const { return _mm_cvtss_f32(_mm256_extractf128_ps(m_col34, 0)); } |
| 307 |
Q_ALWAYS_INLINE float m14() const { return _mm_cvtss_f32(_mm256_extractf128_ps(m_col34, 1)); } |
| 308 |
|
| 309 |
Q_ALWAYS_INLINE float m21() const |
| 310 |
{ |
| 311 |
|
| 312 |
const __m128 v = _mm256_extractf128_ps(m_col12, 0); |
| 313 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0x55)); |
| 314 |
} |
| 315 |
Q_ALWAYS_INLINE float m22() const |
| 316 |
{ |
| 317 |
|
| 318 |
const __m128 v = _mm256_extractf128_ps(m_col12, 1); |
| 319 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0x55)); |
| 320 |
} |
| 321 |
Q_ALWAYS_INLINE float m23() const |
| 322 |
{ |
| 323 |
|
| 324 |
const __m128 v = _mm256_extractf128_ps(m_col34, 0); |
| 325 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0x55)); |
| 326 |
} |
| 327 |
Q_ALWAYS_INLINE float m24() const |
| 328 |
{ |
| 329 |
|
| 330 |
const __m128 v = _mm256_extractf128_ps(m_col34, 1); |
| 331 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0x55)); |
| 332 |
} |
| 333 |
|
| 334 |
Q_ALWAYS_INLINE float m31() const |
| 335 |
{ |
| 336 |
|
| 337 |
const __m128 v = _mm256_extractf128_ps(m_col12, 0); |
| 338 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0xaa)); |
| 339 |
} |
| 340 |
Q_ALWAYS_INLINE float m32() const |
| 341 |
{ |
| 342 |
|
| 343 |
const __m128 v = _mm256_extractf128_ps(m_col12, 1); |
| 344 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0xaa)); |
| 345 |
} |
| 346 |
Q_ALWAYS_INLINE float m33() const |
| 347 |
{ |
| 348 |
|
| 349 |
const __m128 v = _mm256_extractf128_ps(m_col34, 0); |
| 350 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0xaa)); |
| 351 |
} |
| 352 |
Q_ALWAYS_INLINE float m34() const |
| 353 |
{ |
| 354 |
|
| 355 |
const __m128 v = _mm256_extractf128_ps(m_col34, 1); |
| 356 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0xaa)); |
| 357 |
} |
| 358 |
|
| 359 |
Q_ALWAYS_INLINE float m41() const |
| 360 |
{ |
| 361 |
|
| 362 |
const __m128 v = _mm256_extractf128_ps(m_col12, 0); |
| 363 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0xff)); |
| 364 |
} |
| 365 |
Q_ALWAYS_INLINE float m42() const |
| 366 |
{ |
| 367 |
|
| 368 |
const __m128 v = _mm256_extractf128_ps(m_col12, 1); |
| 369 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0xff)); |
| 370 |
} |
| 371 |
Q_ALWAYS_INLINE float m43() const |
| 372 |
{ |
| 373 |
|
| 374 |
const __m128 v = _mm256_extractf128_ps(m_col34, 0); |
| 375 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0xff)); |
| 376 |
} |
| 377 |
Q_ALWAYS_INLINE float m44() const |
| 378 |
{ |
| 379 |
|
| 380 |
const __m128 v = _mm256_extractf128_ps(m_col34, 1); |
| 381 |
return _mm_cvtss_f32(_mm_shuffle_ps(v, v, 0xff)); |
| 382 |
} |
| 383 |
Q_ALWAYS_INLINE QMatrix4x4 toQMatrix4x4() const { return QMatrix4x4(m11(), m12(), m13(), m14(), |
| 384 |
m21(), m22(), m23(), m24(), |
| 385 |
m31(), m32(), m33(), m34(), |
| 386 |
m41(), m42(), m43(), m44()); } |
| 387 |
|
| 388 |
Q_ALWAYS_INLINE Vector4D row(int index) const |
| 389 |
{ |
| 390 |
switch (index) { |
| 391 |
case 0: |
| 392 |
return Vector4D(m11(), m12(), m13(), m14()); |
| 393 |
case 1: |
| 394 |
return Vector4D(m21(), m22(), m23(), m24()); |
| 395 |
case 2: |
| 396 |
return Vector4D(m31(), m32(), m33(), m34()); |
| 397 |
case 3: |
| 398 |
return Vector4D(m41(), m42(), m43(), m44()); |
| 399 |
default: |
| 400 |
Q_UNREACHABLE(); |
| 401 |
return Vector4D(); |
| 402 |
} |
| 403 |
} |
| 404 |
|
| 405 |
Q_ALWAYS_INLINE Vector4D column(int index) const |
| 406 |
{ |
| 407 |
Vector4D c(Qt::Uninitialized); |
| 408 |
switch (index) { |
| 409 |
case 0: |
| 410 |
c.m_xyzw = _mm256_extractf128_ps(m_col12, 0); |
| 411 |
break; |
| 412 |
case 1: |
| 413 |
c.m_xyzw = _mm256_extractf128_ps(m_col12, 1); |
| 414 |
break; |
| 415 |
case 2: |
| 416 |
c.m_xyzw = _mm256_extractf128_ps(m_col34, 0); |
| 417 |
break; |
| 418 |
case 3: |
| 419 |
c.m_xyzw = _mm256_extractf128_ps(m_col34, 1); |
| 420 |
break; |
| 421 |
default: |
| 422 |
Q_UNREACHABLE(); |
| 423 |
return Vector4D(); |
| 424 |
} |
| 425 |
return c; |
| 426 |
} |
| 427 |
|
| 428 |
Q_ALWAYS_INLINE float operator()(int row, int column) const { |
| 429 |
return this->row(row)[column]; |
| 430 |
} |
| 431 |
|
| 432 |
Q_ALWAYS_INLINE Vector3D_SSE map(const Vector3D_SSE &point) const |
| 433 |
{ |
| 434 |
return *this * point; |
| 435 |
} |
| 436 |
|
| 437 |
Q_ALWAYS_INLINE Vector4D_SSE map(const Vector4D_SSE &point) const |
| 438 |
{ |
| 439 |
return *this * point; |
| 440 |
} |
| 441 |
|
| 442 |
Vector3D_SSE mapVector(const Vector3D_SSE &vector) const |
| 443 |
{ |
| 444 |
const Vector3D_SSE row1(m11(), m12(), m13()); |
| 445 |
const Vector3D_SSE row2(m21(), m22(), m23()); |
| 446 |
const Vector3D_SSE row3(m31(), m32(), m33()); |
| 447 |
|
| 448 |
return Vector3D(Vector3D_SSE::dotProduct(row1, vector), |
| 449 |
Vector3D_SSE::dotProduct(row2, vector), |
| 450 |
Vector3D_SSE::dotProduct(row3, vector)); |
| 451 |
} |
| 452 |
|
| 453 |
friend Vector4D operator*(const Vector4D &vector, const Matrix4x4_SSE &matrix); |
| 454 |
friend Vector4D operator*(const Matrix4x4_SSE &matrix, const Vector4D &vector); |
| 455 |
|
| 456 |
friend Vector3D operator*(const Vector3D &vector, const Matrix4x4_SSE &matrix); |
| 457 |
friend Vector3D operator*(const Matrix4x4_SSE &matrix, const Vector3D &vector); |
| 458 |
|
| 459 |
friend Q_3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Matrix4x4_SSE &m); |
| 460 |
|
| 461 |
private: |
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
__m256 m_col12; |
| 476 |
__m256 m_col34; |
| 477 |
}; |
| 478 |
|
| 479 |
Q_ALWAYS_INLINE Vector4D operator*(const Vector4D &vector, const Matrix4x4_SSE &matrix) |
| 480 |
{ |
| 481 |
const __m256 vecMultiplier = _mm256_broadcast_ps(&vector.m_xyzw); |
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
const __m256 partialSum = _mm256_hadd_ps(_mm256_mul_ps(matrix.m_col12, vecMultiplier), |
| 487 |
_mm256_mul_ps(matrix.m_col34, vecMultiplier)); |
| 488 |
|
| 489 |
Vector4D v(Qt::Uninitialized); |
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
const __m256 shuffledSum = _mm256_castpd_ps(_mm256_permute4x64_pd(_mm256_castps_pd(partialSum), 0xd8)); |
| 494 |
v.m_xyzw = _mm_hadd_ps(_mm256_extractf128_ps(shuffledSum, 0), _mm256_extractf128_ps(shuffledSum, 1)); |
| 495 |
return v; |
| 496 |
} |
| 497 |
|
| 498 |
Q_ALWAYS_INLINE Vector4D operator*(const Matrix4x4_SSE &matrix, const Vector4D &vector) |
| 499 |
{ |
| 500 |
const Matrix4x4_SSE transposed = matrix.transposed(); |
| 501 |
return vector * transposed; |
| 502 |
} |
| 503 |
|
| 504 |
Q_ALWAYS_INLINE Vector3D operator*(const Vector3D &vector, const Matrix4x4_SSE &matrix) |
| 505 |
{ |
| 506 |
const __m128 vec4 = _mm_set_ps(1.0f, vector.z(), vector.y(), vector.x()); |
| 507 |
const __m256 vecMultiplier = _mm256_broadcast_ps(&vec4); |
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
const __m256 partialSum = _mm256_hadd_ps(_mm256_mul_ps(matrix.m_col12, vecMultiplier), |
| 512 |
_mm256_mul_ps(matrix.m_col34, vecMultiplier)); |
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
const __m256 shuffledSum = _mm256_castpd_ps(_mm256_permute4x64_pd(_mm256_castps_pd(partialSum), 0xd8)); |
| 517 |
|
| 518 |
const __m128 result = _mm_hadd_ps(_mm256_extractf128_ps(shuffledSum, 0), _mm256_extractf128_ps(shuffledSum, 1)); |
| 519 |
|
| 520 |
const __m128 divisor = _mm_shuffle_ps(result, result, 0xff); |
| 521 |
|
| 522 |
Vector3D v(Qt::Uninitialized); |
| 523 |
v.m_xyzw = _mm_div_ps(result, divisor);; |
| 524 |
return v; |
| 525 |
} |
| 526 |
|
| 527 |
Q_ALWAYS_INLINE Vector3D operator*(const Matrix4x4_SSE &matrix, const Vector3D &vector) |
| 528 |
{ |
| 529 |
const Matrix4x4_SSE transposed = matrix.transposed(); |
| 530 |
return vector * transposed; |
| 531 |
} |
| 532 |
|
| 533 |
} |
| 534 |
|
| 535 |
Q_DECLARE_TYPEINFO(Qt3DCore::Matrix4x4_SSE, Q_PRIMITIVE_TYPE); |
| 536 |
|
| 537 |
QT_END_NAMESPACE |
| 538 |
|
| 539 |
Q_DECLARE_METATYPE(Qt3DCore::Matrix4x4_SSE) |
| 540 |
|
| 541 |
#endif |
| 542 |
|
| 543 |
#endif |