INNER CODE UNIT · C++

scale

mosra/magnum-integration · src/Magnum/DartIntegration/ConvertShapeNode.cpp:224

            Eigen::Vector3d scale = meshShape->getScale();
            shapeData.scaling = Vector3(scale(0), scale(1), scale(2));
        }

        const aiScene* aiMesh = meshShape->getMesh();
        Containers::String meshPath = Utility::Path::split(meshShape->getMeshPath()).first();

        bool loaded = importer->openState(aiMesh, meshPath);
        if(!loaded || importer->meshCount() < 1) {
            Error{} << "DartIntegration::convertShapeNode(): could not load aiScene or there is no mesh in it";
            return Containers::NullOpt;
        }

        /* Import all meshes from the scene. Assuming AssimpImporter, which has
           no concept of multiple scenes */
        CORRADE_INTERNAL_ASSERT(importer->sceneCount() == 1);
        const Containers::Optional<Trade::SceneData> scene = importer->scene(0);
        CORRADE_INTERNAL_ASSERT(scene);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…