Add test file.

This commit is contained in:
kovacsv 2021-10-27 10:07:51 +02:00
parent addc8dfbac
commit ca21a026ce
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,50 @@
{
"root" : {
"children" : [
{
"name" : "Translated",
"transformation" : {
"translation" : [2.0, 0.0, 0.0]
},
"meshes" : [0]
},
{
"name" : "Rotated",
"transformation" : {
"rotation" : [0.0, 0.0, 0.7071067811865475, 0.7071067811865476]
},
"children" : [
{
"name" : "Translated and Rotated",
"transformation" : {
"translation" : [2.0, 0.0, 0.0]
},
"meshes" : [0]
}
]
}
],
"meshes" : [0]
},
"materials" : [
{
"name" : "Green",
"color" : [0, 200, 0]
}
],
"meshes" : [
{
"name" : "Cube",
"type" : "cuboid",
"material" : 0,
"transformation" : {
"scale" : [1.5, 0.2, 0.2]
},
"parameters" : {
"size_x" : 1.0,
"size_y" : 1.0,
"size_z" : 1.0
}
}
]
}

View File

@ -48,10 +48,12 @@ describe ('O3dv Importer', function () {
}
]
});
assert.strictEqual (model.MeshInstanceCount (), 3);
let boundingBox = OV.GetBoundingBox (model);
assert (OV.CoordIsEqual3D (boundingBox.min, new OV.Coord3D (-1.0, 0.0, 0.0)));
assert (OV.CoordIsEqual3D (boundingBox.max, new OV.Coord3D (3.0, 3.0, 1.0)));
done ();
});
});