Return attached body/frame in mjs_attachBody/Frame.

PiperOrigin-RevId: 679601525
Change-Id: Icdc4616808e14bf0a3ebc17d89392382d084c31b
This commit is contained in:
Alessio Quaglino
2024-09-27 08:32:52 -07:00
committed by Copybara-Service
parent 176345b4e1
commit 25e4d75a07
11 changed files with 67 additions and 45 deletions
+4
View File
@@ -331,6 +331,8 @@ class mjCBody : public mjCBody_, private mjsBody {
mjtNum* mpos(const std::string& state_name);
mjtNum* mquat(const std::string& state_name);
mjsFrame* last_attached; // last attached frame to this body
private:
mjCBody(const mjCBody& other, mjCModel* _model); // copy constructor
mjCBody& operator=(const mjCBody& other); // copy assignment
@@ -398,6 +400,8 @@ class mjCFrame : public mjCFrame_, private mjsFrame {
bool IsAncestor(const mjCFrame* child) const; // true if child is contained in this frame
mjsBody* last_attached; // last attached body to this frame
private:
void Compile(void); // compiler