WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
CharacterViewerPanel.h
Go to the documentation of this file.
1#pragma once
2
3#include <functional>
4#include <string>
5#include <vector>
6
7#include <glm/glm.hpp>
8
9#include "AnimationPanel.h"
10
11class GameFile;
12class Renderer;
13class WoWModel;
14class Attachment;
15class OrbitCamera;
16struct ViewportFBO;
17struct AppSettings;
18
20{
21
25{
26 unsigned int optionID = 0;
27 unsigned int categoryID = 0;
28 std::string name;
29 std::vector<unsigned int> choiceIDs;
30 std::vector<std::string> choiceNames;
32};
33
36
39{
40 bool isWoWLoaded = false;
41 bool isDBReady = false;
42 bool isChar = false;
43
44 // References to shared mutable state owned by main
45 std::vector<CustomizationOption>* customizationOptions = nullptr;
46 std::vector<AnimEntry>* animEntries = nullptr;
47 int* selectedAnimCombo = nullptr;
48
49 // Rendering resources
50 Renderer* renderer = nullptr;
51 ViewportFBO* fbo = nullptr;
52 OrbitCamera* camera = nullptr;
53 Attachment* root = nullptr;
54 float fov = 0.785f;
55 glm::vec3 bgColor{0.22f};
56 bool drawGrid = false;
57
58 // Callbacks into main logic
59 std::function<WoWModel*()> getLoadedModel;
60 std::function<void(GameFile*)> loadModel;
61 std::function<void()> handleViewportInput;
62};
63
65void draw(const DrawContext& ctx);
66
67} // namespace CharacterViewerPanel
Scene-graph node that attaches a Displayable to a parent bone slot.
Definition Attachment.h:21
Abstract base class representing a file within the game data archive.
Definition GameFile.h:12
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(const DrawContext &ctx)
Draw the Character Viewer panel contents (call between ImGui::Begin / End).
Reusable animation entry — matches CharacterViewerPanel::AnimEntry.
Persistent application settings backed by userSettings/Config.ini.
Definition AppSettings.h:8
Per-frame context passed by the caller so the panel never touches globals.
std::function< void()> handleViewportInput
std::vector< AnimEntry > * animEntries
std::function< WoWModel *()> getLoadedModel
std::function< void(GameFile *)> loadModel
std::vector< CustomizationOption > * customizationOptions
Simple OpenGL framebuffer object wrapper for off-screen rendering.
Definition ViewportFBO.h:10