Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-01-17 23:35:32 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-01-26 00:14:46 +0300
commitb64d5809e7e3b832e2a011869db68e70b4b4e6fc (patch)
treeaa4f6714da9f546eeee7dffed9236f9c8309524b /extern/bullet2/src/LinearMath/btMatrix3x3.h
parent3c72e302e1eb25de43dd9d077f0c730cc02b5674 (diff)
Upgrade Bullet to version 2.83.
I tried to carefully preserve all patches since the last upgrade. Improves T47195, cloth collision detection bug. Differential Revision: https://developer.blender.org/D1739
Diffstat (limited to 'extern/bullet2/src/LinearMath/btMatrix3x3.h')
-rw-r--r--extern/bullet2/src/LinearMath/btMatrix3x3.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/extern/bullet2/src/LinearMath/btMatrix3x3.h b/extern/bullet2/src/LinearMath/btMatrix3x3.h
index 14fe704f81a..41dea694835 100644
--- a/extern/bullet2/src/LinearMath/btMatrix3x3.h
+++ b/extern/bullet2/src/LinearMath/btMatrix3x3.h
@@ -610,6 +610,27 @@ public:
/**@brief Return the inverse of the matrix */
btMatrix3x3 inverse() const;
+ /// Solve A * x = b, where b is a column vector. This is more efficient
+ /// than computing the inverse in one-shot cases.
+ ///Solve33 is from Box2d, thanks to Erin Catto,
+ btVector3 solve33(const btVector3& b) const
+ {
+ btVector3 col1 = getColumn(0);
+ btVector3 col2 = getColumn(1);
+ btVector3 col3 = getColumn(2);
+
+ btScalar det = btDot(col1, btCross(col2, col3));
+ if (btFabs(det)>SIMD_EPSILON)
+ {
+ det = 1.0f / det;
+ }
+ btVector3 x;
+ x[0] = det * btDot(b, btCross(col2, col3));
+ x[1] = det * btDot(col1, btCross(b, col3));
+ x[2] = det * btDot(col1, btCross(col2, b));
+ return x;
+ }
+
btMatrix3x3 transposeTimes(const btMatrix3x3& m) const;
btMatrix3x3 timesTranspose(const btMatrix3x3& m) const;