ladybird/Userland/Applications/3DFileViewer/MeshLoader.h
Gunnar Beutner 2a16c8bdb8 3DFileViewer: Clean up file handling
This unifies how 3DFileViewer handles the initial file when starting
the application and when opening files later on via the menu.

Errors are shown both for the initial load as well as when loading
files later on. An error during file load no longer clears the
existing model.

It also adds support for specifying the filename as a command-line
argument.

The opened file's name is shown in the titlebar.
2021-05-20 22:22:56 +02:00

22 lines
351 B
C++

/*
* Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
#include <LibCore/File.h>
#include "Common.h"
#include "Mesh.h"
class MeshLoader {
public:
MeshLoader() { }
virtual ~MeshLoader() { }
virtual RefPtr<Mesh> load(Core::File& file) = 0;
};