vecmat3 addouter()
This commit is contained in:
17
vecmat3.cc
17
vecmat3.cc
@@ -69,6 +69,23 @@ m[2][2]=q[2]*rhs.q[2];
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void Vec3<T>::addouter(Mat3<T> &m, const Vec3<T> &rhs, const T weight) const
|
||||
{
|
||||
m[0][0]+=weight* q[0]*rhs.q[0];
|
||||
m[0][1]+=weight* q[0]*rhs.q[1];
|
||||
m[0][2]+=weight* q[0]*rhs.q[2];
|
||||
|
||||
m[1][0]+=weight* q[1]*rhs.q[0];
|
||||
m[1][1]+=weight* q[1]*rhs.q[1];
|
||||
m[1][2]+=weight* q[1]*rhs.q[2];
|
||||
|
||||
m[2][0]+=weight* q[2]*rhs.q[0];
|
||||
m[2][1]+=weight* q[2]*rhs.q[1];
|
||||
m[2][2]+=weight* q[2]*rhs.q[2];
|
||||
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
void Vec3<T>::inertia(Mat3<T> &m, const T weight) const
|
||||
|
||||
Reference in New Issue
Block a user