Fix wrong extent authoring for Cube.

PiperOrigin-RevId: 779230125
Change-Id: I96c3d5daa7a760cd87a714a14ea74a15faf3d7db
This commit is contained in:
Robin Alazard
2025-07-04 10:38:41 -07:00
committed by Copybara-Service
parent 21a852504c
commit e69b6cc5f3
2 changed files with 35 additions and 28 deletions
@@ -619,8 +619,10 @@ TEST_F(MjcfSdfFileFormatPluginTest, TestGeomsPrims) {
EXPECT_PRIM_VALID(stage, "/test/box_geom");
EXPECT_PRIM_IS_A(stage, "/test/box_geom", pxr::UsdGeomCube);
// Box is a special case, it uses a UsdGeomCube and scales it with
// xformOp:scale. The radius is always set to 2.
// xformOp:scale. The radius is always set to 2 and the extent from -1 to 1.
ExpectAttributeEqual(stage, "/test/box_geom.size", 2.0);
ExpectAttributeEqual(stage, "/test/box_geom.extent",
pxr::VtArray<pxr::GfVec3f>({{-1, -1, -1}, {1, 1, 1}}));
ExpectAttributeEqual(stage, "/test/box_geom.xformOp:scale",
pxr::GfVec3f(10.0, 20.0, 30.0));
// Sphere