Add test file.
This commit is contained in:
parent
addc8dfbac
commit
ca21a026ce
50
test/testfiles/o3dv/basetransformation.o3dv
Normal file
50
test/testfiles/o3dv/basetransformation.o3dv
Normal 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
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -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 ();
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user