diff --git a/specs/TilesetValidationSpec.ts b/specs/TilesetValidationSpec.ts index 49c28585..bbd1422d 100644 --- a/specs/TilesetValidationSpec.ts +++ b/specs/TilesetValidationSpec.ts @@ -417,6 +417,13 @@ describe("Tileset validation", function () { expect(result.get(0).type).toEqual("BOUNDING_VOLUMES_INCONSISTENT"); }); + it("detects no issues in tileContentBoundingVolumeWithTransform", async function () { + const result = await Validators.validateTilesetFile( + "specs/data/tilesets/tileContentBoundingVolumeWithTransform.json" + ); + expect(result.length).toEqual(0); + }); + it("detects issues in tileContentGroupInvalidIndex", async function () { const result = await Validators.validateTilesetFile( "specs/data/tilesets/tileContentGroupInvalidIndex.json" diff --git a/specs/data/tilesets/tileContentBoundingVolumeWithTransform.json b/specs/data/tilesets/tileContentBoundingVolumeWithTransform.json new file mode 100644 index 00000000..5ed91743 --- /dev/null +++ b/specs/data/tilesets/tileContentBoundingVolumeWithTransform.json @@ -0,0 +1,25 @@ +{ + "asset" : { + "version" : "1.1" + }, + "geometricError" : 2.0, + "root" : { + "refine": "REPLACE", + "boundingVolume" : { + "box" : [ 0.5, 0.5, 0.5, 0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.5 ] + }, + "geometricError" : 1.0, + "transform": [ + 2.0, 0.0, 0.0, 0.0, + 0.0, 3.0, 0.0, 0.0, + 0.0, 0.0, 4.0, 0.0, + 5.0, 6.0, 7.0, 1.0 + ], + "content": { + "uri": "tiles/glTF/Triangle/Triangle.gltf", + "boundingVolume": { + "box" : [ 0.5, 0.5, 0.5, 0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.5 ] + } + } + } +} diff --git a/src/validation/TileContentValidator.ts b/src/validation/TileContentValidator.ts index daea00e3..bc4e5823 100644 --- a/src/validation/TileContentValidator.ts +++ b/src/validation/TileContentValidator.ts @@ -96,7 +96,7 @@ export class TileContentValidator { } const tileBoundingVolume = tile.boundingVolume; const outerTransform = tile.transform; - const innerTransform = undefined; + const innerTransform = tile.transform; const errorMessage = BoundingVolumeChecks.checkBoundingVolume( contentBoundingVolume, tileBoundingVolume,