Add frame element to MJCF.
PiperOrigin-RevId: 585598244 Change-Id: I4c06be3dd586dab5a4458f05faaf1e7f2b615458
This commit is contained in:
committed by
Copybara-Service
parent
8010aad7be
commit
eb9568a48b
@@ -191,9 +191,14 @@ void mjuu_mulquat(double* res, const double* qa, const double* qb) {
|
||||
|
||||
// multiply vector by 3-by-3 matrix
|
||||
void mjuu_mulvecmat(double* res, const double* vec, const double* mat) {
|
||||
res[0] = mat[0]*vec[0] + mat[1]*vec[1] + mat[2]*vec[2];
|
||||
res[1] = mat[3]*vec[0] + mat[4]*vec[1] + mat[5]*vec[2];
|
||||
res[2] = mat[6]*vec[0] + mat[7]*vec[1] + mat[8]*vec[2];
|
||||
double tmp[3] = {
|
||||
mat[0]*vec[0] + mat[1]*vec[1] + mat[2]*vec[2],
|
||||
mat[3]*vec[0] + mat[4]*vec[1] + mat[5]*vec[2],
|
||||
mat[6]*vec[0] + mat[7]*vec[1] + mat[8]*vec[2]
|
||||
};
|
||||
res[0] = tmp[0];
|
||||
res[1] = tmp[1];
|
||||
res[2] = tmp[2];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user