ladybird/Userland/Applications/3DFileViewer/WavefrontOBJLoader.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

21 lines
404 B
C++

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