Changed semantics of mjCBody::operator+=

PiperOrigin-RevId: 625318655
Change-Id: I0b722bf22125bb0dfb886661e7de5c1638bbe1f9
This commit is contained in:
Alessio Quaglino
2024-04-16 07:06:09 -07:00
committed by Copybara-Service
parent f086dc9b4b
commit 961124ab0b
2 changed files with 73 additions and 64 deletions
+7 -2
View File
@@ -198,7 +198,7 @@ class mjCBase : public mjCBase_ {
virtual void ResolveReferences(const mjCModel* m) {}
// Appends prefix and suffix to reference
virtual void NameSpace(const mjCModel* m) {}
virtual void NameSpace(const mjCModel* m);
// Copy assignment
mjCBase& operator=(const mjCBase& other);
@@ -274,7 +274,7 @@ class mjCBody : public mjCBody_, private mjsBody {
mjCLight* AddLight(mjCDef* = 0);
// API for adding existing objects to body
mjCBody& operator+=(mjCBody& other);
mjCBody& operator+=(const mjCBody& other);
// API for accessing objects
int NumObjects(mjtObj type);
@@ -322,6 +322,11 @@ class mjCBody : public mjCBody_, private mjsBody {
void CopyFromSpec(); // copy spec into attributes
void PointToLocal(void);
// copy src list of elements into dst; set body, model and frame
template <typename T>
void CopyList(std::vector<T*>& dst, const std::vector<T*>& src,
std::map<mjCFrame*, int>& fmap, const mjCFrame* pframe = nullptr);
};