closes https://github.com/assimp/assimp/issues/1406: fix merge issue + improve 3MF-tests
parent
4f2fcf306e
commit
00e3b03c5b
|
@ -95,14 +95,10 @@ public:
|
||||||
XmlSerializer(XmlReader* xmlReader)
|
XmlSerializer(XmlReader* xmlReader)
|
||||||
: xmlReader(xmlReader)
|
: xmlReader(xmlReader)
|
||||||
{
|
{
|
||||||
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImportXml(aiScene* scene)
|
void ImportXml(aiScene* scene) {
|
||||||
{
|
|
||||||
|
|
||||||
scene->mFlags |= AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
|
|
||||||
|
|
||||||
scene->mRootNode = new aiNode();
|
scene->mRootNode = new aiNode();
|
||||||
std::vector<aiNode*> children;
|
std::vector<aiNode*> children;
|
||||||
|
|
||||||
|
|
|
@ -43,13 +43,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "AbstractImportExportBase.h"
|
#include "AbstractImportExportBase.h"
|
||||||
|
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
|
#include <assimp/scene.h>
|
||||||
|
|
||||||
class utD3MFImporterExporter : public AbstractImportExportBase {
|
class utD3MFImporterExporter : public AbstractImportExportBase {
|
||||||
public:
|
public:
|
||||||
virtual bool importerTest() {
|
bool importerTest() override {
|
||||||
Assimp::Importer importer;
|
Assimp::Importer importer;
|
||||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/3MF/box.3mf", 0);
|
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/3MF/box.3mf", 0);
|
||||||
return nullptr != scene;
|
EXPECT_EQ( 1u, scene->mNumMeshes );
|
||||||
|
aiMesh *mesh = scene->mMeshes[ 0 ];
|
||||||
|
EXPECT_NE( nullptr, mesh );
|
||||||
|
EXPECT_EQ( 12u, mesh->mNumFaces );
|
||||||
|
EXPECT_EQ( 8u, mesh->mNumVertices );
|
||||||
|
|
||||||
|
return ( nullptr != scene );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue