WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
ViewportOptionsPanel.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <functional>
5#include <string>
6#include <vector>
7
8#include <glm/glm.hpp>
9
10class OrbitCamera;
11class Renderer;
12class WoWModel;
13
15{
16
17// ---- Types shared with the rest of the application -----------------------
18
21{
22 size_t index = 0;
23 uint32_t id = 0;
24 std::string label;
25};
26
29{
30 std::string name;
31 size_t meshId = 0;
32 std::vector<GeosetEntry> geosets;
33};
34
37{
38 bool enabled = false;
39 float colors[3][3][3] = {};
40 bool hasSet[3] = {};
41};
42
45{
46 // Renderer
47 Renderer* renderer = nullptr;
48
49 // Settings
50 bool* drawGrid = nullptr;
51 glm::vec3* bgColor = nullptr;
52
53 // Camera
54 OrbitCamera* camera = nullptr;
55
56 // Model accessor
57 std::function<WoWModel*()> getLoadedModel;
58
59 // Model-control state (pointers into AppState)
60 std::vector<GeosetGroupEntry>* geosetGroups = nullptr;
62
63 // Skin state (needed for particle-color reset)
64 int* selectedSkin = nullptr;
65 std::function<void(WoWModel*, int)> applySkin;
66
67 // Camera reset
68 std::function<void()> resetCamera;
69};
70
72void draw(DrawContext& ctx);
73
74} // namespace ViewportOptionsPanel
Orbit camera that revolves around a target point.
Definition OrbitCamera.h:10
Core WoW .m2 model: geometry, animation, textures, and character data.
Definition WoWModel.h:50
void draw(DrawContext &ctx)
Draw the Viewport Options panel contents (call between Begin / End).
Per-frame context for the viewport options panel.
std::function< void(WoWModel *, int)> applySkin
std::function< WoWModel *()> getLoadedModel
std::vector< GeosetGroupEntry > * geosetGroups
Single geoset entry referencing a model geoset by index and id.
std::string label
Human-readable label for the geoset.
size_t index
Index into model->geosets[].
A named group of geosets sharing the same mesh id.
std::string name
Display name for the group.
std::vector< GeosetEntry > geosets
Geosets belonging to this group.
size_t meshId
Shared mesh id for geosets in this group.
Editable state for particle colour replacement (colour IDs 11, 12, 13).
bool enabled
Whether particle colour replacement is active.
float colors[3][3][3]
Colour values [set 0..2 for IDs 11,12,13][phase 0..2][r/g/b].
bool hasSet[3]
Which colour IDs (11, 12, 13) are present in the model.