@ -212,24 +212,26 @@ const struct {
" Fuzzy duplicate removal: 6 -> 4 vertices \n " } ,
" Fuzzy duplicate removal: 6 -> 4 vertices \n " } ,
{ " one mesh, two converters " , Containers : : array < Containers : : String > ( {
{ " one mesh, two converters " , Containers : : array < Containers : : String > ( {
" -C " , " MeshOptimizerSceneConverter " ,
" -C " , " MeshOptimizerSceneConverter " ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad.obj " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad-strip.gltf " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.gltf " ) } ) ,
" Obj Importer" , " Stanford SceneConverter" ,
" Gltf Importer" , " Gltf SceneConverter" ,
" quad.ply " , nullptr ,
" quad.gltf " , " quad.bin " ,
{ } } ,
{ } } ,
{ " one mesh, two converters, explicit last " , Containers : : array < Containers : : String > ( {
{ " one mesh, two converters, explicit last " , Containers : : array < Containers : : String > ( {
" -C " , " MeshOptimizerSceneConverter " , " -C " , " Stanford SceneConverter" ,
" -C " , " MeshOptimizerSceneConverter " , " -C " , " Gltf SceneConverter" ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad.obj " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad-strip.gltf " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.gltf " ) } ) ,
" Obj Importer" , " Stanford SceneConverter" ,
" Gltf Importer" , " Gltf SceneConverter" ,
" quad.ply " , nullptr ,
" quad.gltf " , " quad.bin " ,
{ } } ,
{ } } ,
{ " one mesh, two converters, verbose " , Containers : : array < Containers : : String > ( {
{ " one mesh, two converters, verbose " , Containers : : array < Containers : : String > ( {
" -C " , " MeshOptimizerSceneConverter " , " -v " ,
" -C " , " MeshOptimizerSceneConverter " , " -v " ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad.obj " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad-strip.gltf " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.gltf " ) } ) ,
" ObjImporter " , " StanfordSceneConverter " ,
" GltfImporter " , " GltfSceneConverter " ,
" quad.ply " , nullptr ,
" quad.gltf " , " quad.bin " ,
/** @todo this is a no-op, use some other converter that tests also
/* While this looks like a no-op in the output, it converts a
that the resulting mesh is actually passed further */
triangle strip to indexed triangles , which verifies that the output
" Trade::AnySceneImporter::openFile(): using ObjImporter \n "
of MeshOptimizerSceneConverter got actually passed further and not
discarded */
" Trade::AnySceneImporter::openFile(): using GltfImporter \n "
" Trade::MeshOptimizerSceneConverter::convert(): processing stats: \n "
" Trade::MeshOptimizerSceneConverter::convert(): processing stats: \n "
" vertex cache: \n "
" vertex cache: \n "
" 4 -> 4 transformed vertices \n "
" 4 -> 4 transformed vertices \n "
@ -243,16 +245,16 @@ const struct {
" 65536 -> 65536 shaded pixels \n "
" 65536 -> 65536 shaded pixels \n "
" 65536 -> 65536 covered pixels \n "
" 65536 -> 65536 covered pixels \n "
" overdraw 1 -> 1 \n "
" overdraw 1 -> 1 \n "
" Trade::AnySceneConverter::convertToFile(): using Stanford SceneConverter \n " } ,
" Trade::AnySceneConverter::convertToFile(): using Gltf SceneConverter \n " } ,
{ " one mesh, two converters, explicit last, verbose " , Containers : : array < Containers : : String > ( {
{ " one mesh, two converters, explicit last, verbose " , Containers : : array < Containers : : String > ( {
" -C " , " MeshOptimizerSceneConverter " , " -C " , " Stanford SceneConverter" , " -v " ,
" -C " , " MeshOptimizerSceneConverter " , " -C " , " Gltf SceneConverter" , " -v " ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad.obj " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad-strip.gltf " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.gltf " ) } ) ,
" Obj Importer" , " Stanford SceneConverter" ,
" Gltf Importer" , " Gltf SceneConverter" ,
" quad.ply " , nullptr ,
" quad.gltf " , " quad.bin " ,
/* As the importers and converters are specified explicitly, there's
/* As the importers and converters are specified explicitly, there's
no messages from AnySceneConverter , OTOH as we have more than one - C
no messages from AnySceneConverter , OTOH as we have more than one - C
option the verbose output includes a progress info */
option the verbose output includes a progress info */
" Trade::AnySceneImporter::openFile(): using Obj Importer \n "
" Trade::AnySceneImporter::openFile(): using Gltf Importer \n "
" Processing (1/2) with MeshOptimizerSceneConverter... \n "
" Processing (1/2) with MeshOptimizerSceneConverter... \n "
" Trade::MeshOptimizerSceneConverter::convert(): processing stats: \n "
" Trade::MeshOptimizerSceneConverter::convert(): processing stats: \n "
" vertex cache: \n "
" vertex cache: \n "
@ -267,38 +269,38 @@ const struct {
" 65536 -> 65536 shaded pixels \n "
" 65536 -> 65536 shaded pixels \n "
" 65536 -> 65536 covered pixels \n "
" 65536 -> 65536 covered pixels \n "
" overdraw 1 -> 1 \n "
" overdraw 1 -> 1 \n "
" Saving output (2/2) with Stanford SceneConverter... \n " } ,
" Saving output (2/2) with Gltf SceneConverter... \n " } ,
{ " one mesh, two converters, options for the first only " , Containers : : array < Containers : : String > ( {
{ " one mesh, two converters, options for the first only " , Containers : : array < Containers : : String > ( {
" -C " , " MeshOptimizerSceneConverter " ,
" -C " , " MeshOptimizerSceneConverter " ,
" -c " , " nonexistentMeshOptimizerOption=yes " ,
" -c " , " nonexistentMeshOptimizerOption=yes " ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad.obj " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad-strip.gltf " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
" Obj Importer" , " Stanford SceneConverter" ,
" Gltf Importer" , " Gltf SceneConverter" ,
" quad.ply " , nullptr ,
" quad.ply " , nullptr ,
" Option nonexistentMeshOptimizerOption not recognized by MeshOptimizerSceneConverter \n " } ,
" Option nonexistentMeshOptimizerOption not recognized by MeshOptimizerSceneConverter \n " } ,
{ " one mesh, two converters, explicit last, options for the first only " , Containers : : array < Containers : : String > ( {
{ " one mesh, two converters, explicit last, options for the first only " , Containers : : array < Containers : : String > ( {
" -C " , " MeshOptimizerSceneConverter " ,
" -C " , " MeshOptimizerSceneConverter " ,
" -c " , " nonexistentMeshOptimizerOption=yes " ,
" -c " , " nonexistentMeshOptimizerOption=yes " ,
" -C " , " StanfordSceneConverter " ,
" -C " , " StanfordSceneConverter " ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad.obj " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad-strip.gltf " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
" Obj Importer" , " Stanford SceneConverter" ,
" Gltf Importer" , " Gltf SceneConverter" ,
" quad.ply " , nullptr ,
" quad.ply " , nullptr ,
" Option nonexistentMeshOptimizerOption not recognized by MeshOptimizerSceneConverter \n " } ,
" Option nonexistentMeshOptimizerOption not recognized by MeshOptimizerSceneConverter \n " } ,
{ " one mesh, two converters, options for both " , Containers : : array < Containers : : String > ( {
{ " one mesh, two converters, options for both " , Containers : : array < Containers : : String > ( {
" -C " , " MeshOptimizerSceneConverter " ,
" -C " , " MeshOptimizerSceneConverter " ,
" -c " , " nonexistentMeshOptimizerOption=yes " ,
" -c " , " nonexistentMeshOptimizerOption=yes " ,
" -c " , " nonexistentAnyConverterOption=no " ,
" -c " , " nonexistentAnyConverterOption=no " ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad.obj " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad-strip.gltf " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.gltf " ) } ) ,
" Obj Importer" , " Stanford SceneConverter" ,
" Gltf Importer" , " Gltf SceneConverter" ,
" quad.ply " , nullptr ,
" quad.ply " , nullptr ,
" Option nonexistentMeshOptimizerOption not recognized by MeshOptimizerSceneConverter \n "
" Option nonexistentMeshOptimizerOption not recognized by MeshOptimizerSceneConverter \n "
" Trade::AnySceneConverter::convertToFile(): option nonexistentAnyConverterOption not recognized by Stanford SceneConverter \n " } ,
" Trade::AnySceneConverter::convertToFile(): option nonexistentAnyConverterOption not recognized by Gltf SceneConverter \n " } ,
{ " one mesh, two converters, explicit last, options for both " , Containers : : array < Containers : : String > ( {
{ " one mesh, two converters, explicit last, options for both " , Containers : : array < Containers : : String > ( {
" -C " , " MeshOptimizerSceneConverter " ,
" -C " , " MeshOptimizerSceneConverter " ,
" -c " , " nonexistentMeshOptimizerOption=yes " ,
" -c " , " nonexistentMeshOptimizerOption=yes " ,
" -C " , " StanfordSceneConverter " ,
" -C " , " StanfordSceneConverter " ,
" -c " , " nonexistentStanfordConverterOption=no " ,
" -c " , " nonexistentStanfordConverterOption=no " ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad.obj " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.ply " ) } ) ,
Utility : : Path : : join ( SCENETOOLS_TEST_DIR , " SceneConverterTestFiles/quad-strip.gltf " ) , Utility : : Path : : join ( SCENETOOLS_TEST_OUTPUT_DIR , " SceneConverterTestFiles/quad.gltf " ) } ) ,
" Obj Importer" , " Stanford SceneConverter" ,
" Gltf Importer" , " Gltf SceneConverter" ,
" quad.ply " , nullptr ,
" quad.ply " , nullptr ,
" Option nonexistentMeshOptimizerOption not recognized by MeshOptimizerSceneConverter \n "
" Option nonexistentMeshOptimizerOption not recognized by MeshOptimizerSceneConverter \n "
" Option nonexistentStanfordConverterOption not recognized by StanfordSceneConverter \n " } ,
" Option nonexistentStanfordConverterOption not recognized by StanfordSceneConverter \n " } ,