Change mjs_nextChild to be DFS to match XML parsing.
PiperOrigin-RevId: 778915232 Change-Id: I5e290f47b7d2530597bb6c85b66ff2ae807e5510
This commit is contained in:
committed by
Copybara-Service
parent
67f9ffddbd
commit
af7d20c035
@@ -475,7 +475,7 @@ class mjCBody : public mjCBody_, private mjsBody {
|
||||
// returns nullptr if the next child is not found or if `child` is the last element, returns
|
||||
// the next child after the input `child` otherwise
|
||||
mjsElement* NextChild(const mjsElement* child, mjtObj type = mjOBJ_UNKNOWN,
|
||||
bool recursive = false, bool* found = nullptr);
|
||||
bool recursive = false);
|
||||
|
||||
// reset keyframe references for allowing self-attach
|
||||
void ForgetKeyframes() const;
|
||||
@@ -534,7 +534,9 @@ class mjCBody : public mjCBody_, private mjsBody {
|
||||
|
||||
// gets next child of the same type in this body
|
||||
template <class T>
|
||||
mjsElement* GetNext(const std::vector<T*>& list, const mjsElement* child, bool* found);
|
||||
mjsElement* GetNext(const std::vector<T*>& list, const mjsElement* child);
|
||||
|
||||
bool IsAncestor(const mjCBody* child) const; // true if child is a descendant of this body
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user