Store the status of the scene in the scene itself.

PiperOrigin-RevId: 813119377
Change-Id: Iebff9e7796ca9809ea22902522982bfd96eeba06
This commit is contained in:
Haroon Qureshi
2025-09-30 00:05:06 -07:00
committed by Copybara-Service
parent fc8979ed4a
commit 70d03adc71
7 changed files with 69 additions and 53 deletions
+2
View File
@@ -67,6 +67,7 @@ TEST_F(MjvSceneTest, UpdateScene) {
}
mjv_updateScene(model, data, &opt_, &pert_, &cam_, mjCAT_ALL, &scn_);
EXPECT_EQ(scn_.status, 0);
EXPECT_GT(scn_.ngeom, 0);
EXPECT_GT(scn_.nlight, 0);
if (model->nskin) EXPECT_GT(scn_.nskin, 0);
@@ -98,6 +99,7 @@ TEST_F(MjvSceneTest, UpdateSceneGeomsExhausted) {
// clear handlers to avoid test failure; we are explicitly expecting a warning
mju_clearHandlers();
mjv_updateScene(model, data, &opt_, &pert_, &cam_, mjCAT_ALL, &scn_);
EXPECT_EQ(scn_.status, 1);
EXPECT_EQ(scn_.ngeom, maxgeoms);
EXPECT_EQ(data->warning[mjWARN_VGEOMFULL].number, 1);