MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / mul

Function mul

src/BulletInverseDynamics/IDMath.cpp:97–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void mul(const mat33 &a, const mat3x &b, mat3x *result)
98{
99 if (b.cols() != result->cols())
100 {
101 bt_id_error_message("size missmatch. b.cols()= %d, result->cols()= %d\n",
102 static_cast<int>(b.cols()), static_cast<int>(result->cols()));
103 abort();
104 }
105
106 for (idArrayIdx col = 0; col < b.cols(); col++)
107 {
108 const idScalar x = a(0, 0) * b(0, col) + a(0, 1) * b(1, col) + a(0, 2) * b(2, col);
109 const idScalar y = a(1, 0) * b(0, col) + a(1, 1) * b(1, col) + a(1, 2) * b(2, col);
110 const idScalar z = a(2, 0) * b(0, col) + a(2, 1) * b(1, col) + a(2, 2) * b(2, col);
111 setMat3xElem(0, col, x, result);
112 setMat3xElem(1, col, y, result);
113 setMat3xElem(2, col, z, result);
114 }
115}
116void add(const mat3x &a, const mat3x &b, mat3x *result)
117{
118 if (a.cols() != b.cols())

Callers 14

calculateJacobiansMethod · 0.50
getBodyJacobianTransMethod · 0.50
getBodyJacobianRotMethod · 0.50
mulMethod · 0.50
operator*Method · 0.50
mulMethod · 0.50
compareMethod · 0.50
shiftFaceMethod · 0.50
mulMethod · 0.50
operator*Method · 0.50
mulMethod · 0.50
compareMethod · 0.50

Calls 4

aFunction · 0.50
bFunction · 0.50
setMat3xElemFunction · 0.50
colsMethod · 0.45

Tested by

no test coverage detected