Add control values to keyframes.
- Add basic test for keyframes. - Add missing documentation for keyframe mocap positions and quaternions. PiperOrigin-RevId: 459021649 Change-Id: I91cf7ecbddc6262e8c72a868eeb82d627f389fb3
This commit is contained in:
committed by
Copybara-Service
parent
5ba880506c
commit
09a5efc09e
@@ -1935,6 +1935,8 @@ void mjCModel::CopyObjects(mjModel* m) {
|
||||
for (j=0; j<nmocap; j++) {
|
||||
mju_normalize4(m->key_mquat+i*4*nmocap+4*j);
|
||||
}
|
||||
|
||||
copyvec(m->key_ctrl+i*nu, keys[i]->ctrl.data(), nu);
|
||||
}
|
||||
|
||||
// save qpos0 in user model (to recognize changed key_qpos in write)
|
||||
@@ -2878,6 +2880,9 @@ bool mjCModel::CopyBack(const mjModel* m) {
|
||||
copyvec(pk->mpos.data(), m->key_mpos + i*3*nmocap, 3*nmocap);
|
||||
copyvec(pk->mquat.data(), m->key_mquat + i*4*nmocap, 4*nmocap);
|
||||
}
|
||||
if (nu) {
|
||||
copyvec(pk->ctrl.data(), m->key_ctrl + i*nu, nu);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user