Changeset 8393 for code/trunk/src/external/bullet/LinearMath/btMatrix3x3.h
- Timestamp:
- May 3, 2011, 5:07:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/external/bullet/LinearMath/btMatrix3x3.h
r8351 r8393 111 111 btMatrix3x3& operator*=(const btMatrix3x3& m); 112 112 113 /** @brief Set from a carray of btScalars 114 * @param m A pointer to the beginning of an array of 9 btScalars */ 113 /** @brief Adds by the target matrix on the right 114 * @param m matrix to be applied 115 * Equivilant to this = this + m */ 116 btMatrix3x3& operator+=(const btMatrix3x3& m); 117 118 /** @brief Substractss by the target matrix on the right 119 * @param m matrix to be applied 120 * Equivilant to this = this - m */ 121 btMatrix3x3& operator-=(const btMatrix3x3& m); 122 123 /** @brief Set from the rotational part of a 4x4 OpenGL matrix 124 * @param m A pointer to the beginning of the array of scalars*/ 115 125 void setFromOpenGLSubMatrix(const btScalar *m) 116 126 { … … 209 219 } 210 220 211 /**@brief Fill the values of the matrix into a 9 element array221 /**@brief Fill the rotational part of an OpenGL matrix and clear the shear/perspective 212 222 * @param m The array to be filled */ 213 223 void getOpenGLSubMatrix(btScalar *m) const … … 524 534 } 525 535 536 SIMD_FORCE_INLINE btMatrix3x3& 537 btMatrix3x3::operator+=(const btMatrix3x3& m) 538 { 539 setValue( 540 m_el[0][0]+m.m_el[0][0], 541 m_el[0][1]+m.m_el[0][1], 542 m_el[0][2]+m.m_el[0][2], 543 m_el[1][0]+m.m_el[1][0], 544 m_el[1][1]+m.m_el[1][1], 545 m_el[1][2]+m.m_el[1][2], 546 m_el[2][0]+m.m_el[2][0], 547 m_el[2][1]+m.m_el[2][1], 548 m_el[2][2]+m.m_el[2][2]); 549 return *this; 550 } 551 552 SIMD_FORCE_INLINE btMatrix3x3 553 operator*(const btMatrix3x3& m, const btScalar & k) 554 { 555 return btMatrix3x3( 556 m[0].x()*k,m[0].y()*k,m[0].z()*k, 557 m[1].x()*k,m[1].y()*k,m[1].z()*k, 558 m[2].x()*k,m[2].y()*k,m[2].z()*k); 559 } 560 561 SIMD_FORCE_INLINE btMatrix3x3 562 operator+(const btMatrix3x3& m1, const btMatrix3x3& m2) 563 { 564 return btMatrix3x3( 565 m1[0][0]+m2[0][0], 566 m1[0][1]+m2[0][1], 567 m1[0][2]+m2[0][2], 568 m1[1][0]+m2[1][0], 569 m1[1][1]+m2[1][1], 570 m1[1][2]+m2[1][2], 571 m1[2][0]+m2[2][0], 572 m1[2][1]+m2[2][1], 573 m1[2][2]+m2[2][2]); 574 } 575 576 SIMD_FORCE_INLINE btMatrix3x3 577 operator-(const btMatrix3x3& m1, const btMatrix3x3& m2) 578 { 579 return btMatrix3x3( 580 m1[0][0]-m2[0][0], 581 m1[0][1]-m2[0][1], 582 m1[0][2]-m2[0][2], 583 m1[1][0]-m2[1][0], 584 m1[1][1]-m2[1][1], 585 m1[1][2]-m2[1][2], 586 m1[2][0]-m2[2][0], 587 m1[2][1]-m2[2][1], 588 m1[2][2]-m2[2][2]); 589 } 590 591 592 SIMD_FORCE_INLINE btMatrix3x3& 593 btMatrix3x3::operator-=(const btMatrix3x3& m) 594 { 595 setValue( 596 m_el[0][0]-m.m_el[0][0], 597 m_el[0][1]-m.m_el[0][1], 598 m_el[0][2]-m.m_el[0][2], 599 m_el[1][0]-m.m_el[1][0], 600 m_el[1][1]-m.m_el[1][1], 601 m_el[1][2]-m.m_el[1][2], 602 m_el[2][0]-m.m_el[2][0], 603 m_el[2][1]-m.m_el[2][1], 604 m_el[2][2]-m.m_el[2][2]); 605 return *this; 606 } 607 608 526 609 SIMD_FORCE_INLINE btScalar 527 610 btMatrix3x3::determinant() const
Note: See TracChangeset
for help on using the changeset viewer.