1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-24 21:07:46 +00:00
novus/mdlviewer/include/mainwindow.h
Joshua Goins 9688c091af Add bone editing to mdlviewer
This is big, as it shows we are now correctly parsing the havok XML
sidecard data and you can edit the scale of the bones in the viewport.

This also pulls in a new libxiv version, which is required to fill out
the used bones list on a Model. Right now the bone editing is incredibly
basic, and the viewport suffers from a lack of depth testing still.
2022-04-28 17:50:05 -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, 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;
};