1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-23 04:27:45 +00:00
novus/mdlviewer/include/mainwindow.h
Joshua Goins 8e795bc292 Start work on exporting vertex weights and skeletons
The mapping to vertex weights work, but skeleton exporting is still a
heavy WIP. Vertex weight export will need another pass in order to get
all 4 weights, but it's a functional proof of concept.
2022-06-22 23:16:56 -04:00

61 lines
No EOL
1.1 KiB
C++

#pragma once
#include <QMainWindow>
#include <unordered_map>
#include <QComboBox>
#include "renderer.hpp"
#include "types/slot.h"
#include "types/race.h"
#include "havokxmlparser.h"
struct ModelInfo {
int primaryID;
};
struct GearInfo {
std::string name;
Slot slot;
ModelInfo modelInfo;
};
class GameData;
class VulkanWindow;
class StandaloneWindow;
class MainWindow : public QMainWindow {
public:
MainWindow(GameData& data);
void exportModel(Model& model, Skeleton& skeleton, QString fileName);
private:
void loadInitialGearInfo(GearInfo& info);
void reloadGearModel();
void reloadGearAppearance();
std::vector<GearInfo> gears;
struct LoadedGear {
GearInfo* gearInfo;
Model model;
RenderModel renderModel;
};
LoadedGear loadedGear;
QComboBox* raceCombo, *lodCombo;
Race currentRace = Race::HyurMidlanderMale;
int currentLod = 0;
glm::vec3 currentScale = glm::vec3(1);
Bone* currentEditedBone = nullptr;
GameData& data;
Renderer* renderer;
VulkanWindow* vkWindow;
StandaloneWindow* standaloneWindow;
Skeleton skeleton;
};