[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / contrib / vmap_debugger / ModelContainerView.h
blob28d992a0c169bdd28033d19148467b49cbf56932
1 #ifndef _MODELCONTAINERVIEW_H
2 #define _MODELCONTAINERVIEW_H
4 #include <G3D/G3DAll.h>
5 #include <G3D/System.h>
6 #include "ModelContainer.h"
7 #include "DebugCmdLogger.h"
8 #include "vmapmanager.h"
13 namespace VMAP
15 //==========================================
18 //==========================================
20 class ModelContainerView :
21 public G3D::GApp
23 private:
24 SkyRef iSky;
25 LightingRef iLighting;
26 SkyParameters iSkyParameters;
28 VARAreaRef iVARAreaRef;
29 Table<std::string , VAR*> iTriVarTable;
30 Table<std::string , Array<int> > iTriIndexTable;
32 VARAreaRef iVARAreaRef2;
33 VAR iTriDebugVar;
34 Array<Vector3> iVTriDebugArray;
35 Array<int> iTriDebugArray;
37 //Array<int> iLineIndexArray;
39 GApp* i_App;
40 CommandFileRW iCommandFileRW;
41 Array<Command> iCmdArray;
42 int iCurrCmdIndex;
44 VMapManager* iVMapManager;
46 Vector3 iPos1;
47 Vector3 iPos2;
48 Color3 iColor;
49 bool iDrawLine;
50 int iInstanceId;
51 bool iPosSent;
52 Array<Command> iPrevLoadCommands;
53 private:
54 Vector3 convertPositionToMangosRep(float x, float y, float z) const;
56 public:
57 ModelContainerView(const G3D::GApp::Settings& settings);
59 ~ModelContainerView(void);
61 void addModelContainer(const std::string& pName,const ModelContainer* pModelContainer);
62 void removeModelContainer(const std::string& pName, const ModelContainer* pModelContainer);
63 void setViewPosition(const Vector3& pPosition);
65 void onGraphics(RenderDevice* rd, Array<PosedModelRef> &posed3D, Array<PosedModel2DRef> &posed2D);
66 virtual void onInit();
67 void init();
68 void cleanup();
69 void onUserInput(UserInput* ui);
71 void fillRenderArray(const SubModel& pSm,Array<TriangleBox> &pArray, const TreeNode* pTreeNode);
72 void fillVertexAndIndexArrays(const SubModel& pSm, Array<Vector3>& vArray, Array<int>& iArray);
74 bool loadAndShowTile(int pMapId, int x, int y);
75 void showMap(int pMapId, int x, int y);
77 void showMap(MapTree* mt, std::string dirFileName);
78 bool loadAndShowTile(int pMapId);
81 void processCommand();
85 //==========================================
86 //==========================================
89 #endif