Canonicalize mjVisual macros to include type and dimension.

PiperOrigin-RevId: 928506110
Change-Id: If5d031f9d87892f13486ae9ccde23c16131212de
This commit is contained in:
Yuval Tassa
2026-06-08 05:30:15 -07:00
committed by Copybara-Service
parent da5500c202
commit 6c33e16bf1
5 changed files with 132 additions and 137 deletions
+5 -5
View File
@@ -270,12 +270,12 @@ class MjWrapper<raw::MjVisualRgba> : public WrapperBase<raw::MjVisualRgba> {
MjWrapper(raw::MjVisualRgba* ptr, pybind11::handle owner);
~MjWrapper() = default;
#define X(var) \
py_array_or_tuple_t< \
std::remove_all_extents_t<decltype(raw::MjVisualRgba::var)>> \
var;
#define XVEC(type, var, dim) \
py_array_or_tuple_t< \
std::remove_all_extents_t<decltype(raw::MjVisualRgba::var)>> \
var;
MJVISUAL_RGBA_FIELDS
#undef X
#undef XVEC
};
using MjVisualRgbaWrapper = MjWrapper<raw::MjVisualRgba>;