1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-23 04:27:45 +00:00
novus/armoury/include/singlegearview.h
Joshua Goins c7b6dd076c Add glTF import support, multiple fixes for upstream physis changes
Adds basic glTF import (although right now it only imports back
positions) and fixes support for more of the vertex data that's
available to us. The MDL file isn't written back out yet either, it only
displays in the viewport.
2023-12-09 14:49:31 -05:00

65 lines
No EOL
1.4 KiB
C++

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include "filecache.h"
#include "gearview.h"
#include <QPushButton>
#include <QWidget>
struct GameData;
class SingleGearView : public QWidget
{
Q_OBJECT
public:
explicit SingleGearView(GameData *data, FileCache &cache, QWidget *parent = nullptr);
QString getLoadedGearPath() const;
Q_SIGNALS:
void gearChanged();
void gotMDLPath();
void raceChanged();
void subraceChanged();
void genderChanged();
void levelOfDetailChanged();
void addToFullModelViewer(GearInfo &info);
public Q_SLOTS:
void clear();
void setGear(const GearInfo &info);
void setRace(Race race);
void setSubrace(Subrace subrace);
void setGender(Gender gender);
void setLevelOfDetail(int lod);
void setFMVAvailable(bool available);
private Q_SLOTS:
void reloadGear();
private:
void importModel(const QString &filename);
std::optional<GearInfo> currentGear;
Race currentRace = Race::Hyur;
Subrace currentSubrace = Subrace::Midlander;
Gender currentGender = Gender::Male;
int currentLod = 0;
GearView *gearView = nullptr;
QComboBox *raceCombo, *subraceCombo, *genderCombo, *lodCombo;
QPushButton *addToFMVButton, *importButton, *exportButton;
bool loadingComboData = false;
bool fmvAvailable = false;
GameData *data = nullptr;
};