Implement __repr__ and __eq__ on MjrRect in Python bindings.

PiperOrigin-RevId: 457457401
Change-Id: I0d395ff301fbcf775b4766ac81c830a625b3be63
This commit is contained in:
Nimrod Gileadi
2022-06-27 05:55:03 -07:00
committed by Copybara-Service
parent 263c92e301
commit a077db1b91
4 changed files with 92 additions and 81 deletions
+1
View File
@@ -155,6 +155,7 @@ PYBIND11_MODULE(_render, pymodule) {
mjrRect.def("__deepcopy__", [](const raw::MjrRect& other, py::dict) {
return raw::MjrRect(other);
});
DefineStructFunctions(mjrRect);
#define X(var) mjrRect.def_readwrite(#var, &raw::MjrRect::var)
X(left);
X(bottom);