Add intensity and range parameters to lights.

PiperOrigin-RevId: 758603199
Change-Id: I74e88bdfeedd9224e84d953f237d68eca79e6cb7
This commit is contained in:
Google DeepMind
2025-05-14 03:27:06 -07:00
committed by Copybara-Service
parent a6c3a287d6
commit fa95fe0c59
15 changed files with 160 additions and 52 deletions
+2
View File
@@ -604,6 +604,8 @@ void mjXWriter::OneLight(XMLElement* elem, const mjCLight* light, mjCDef* def,
// defaults and regular
WriteAttr(elem, "bulbradius", 1, &light->bulbradius, &def->Light().bulbradius);
WriteAttr(elem, "intensity", 1, &light->intensity, &def->Light().intensity);
WriteAttr(elem, "range", 1, &light->range, &def->Light().range);
WriteAttrKey(elem, "directional", bool_map, 2, light->directional, def->Light().directional);
WriteAttrKey(elem, "castshadow", bool_map, 2, light->castshadow, def->Light().castshadow);
WriteAttrKey(elem, "active", bool_map, 2, light->active, def->Light().active);