Fix a bug with mjs_delete functions.

PiperOrigin-RevId: 657615906
Change-Id: Ic70eaa9a5c20337db3897cf882a60e9d94f2869b
This commit is contained in:
Alessio Quaglino
2024-07-30 09:12:57 -07:00
committed by Copybara-Service
parent 24a555062d
commit b341bd391d
5 changed files with 119 additions and 3 deletions
+3
View File
@@ -202,6 +202,9 @@ class mjCModel : public mjCModel_, private mjSpec {
// delete all elements
template <class T> void DeleteAll(std::vector<T*>& elements);
// delete object from the corresponding list
void DeleteElement(mjsElement* el);
// API for access to model elements (outside tree)
int NumObjects(mjtObj type); // number of objects in specified list
mjCBase* GetObject(mjtObj type, int id); // pointer to specified object