root/trunk/contrib/vmap_debugger/ModelContainerView.h @ 237

Revision 44, 2.1 kB (checked in by yumileroy, 17 years ago)

[svn] * Merge Temp dev SVN with Assembla.
* Changes include:

  • Implementation of w12x's Outdoor PvP and Game Event Systems.
  • Temporary removal of IRC Chat Bot (until infinite loop when disabled is fixed).
  • All mangos -> trinity (to convert your mangos_string table, please run mangos_string_to_trinity_string.sql).
  • Improved Config cleanup.
  • And many more changes.

Original author: Seline
Date: 2008-10-14 11:57:03-05:00

Line 
1#ifndef _MODELCONTAINERVIEW_H
2#define _MODELCONTAINERVIEW_H
3
4#include <G3D/G3DAll.h>
5#include <G3D/System.h>
6#include "ModelContainer.h"
7#include "DebugCmdLogger.h"
8#include "vmapmanager.h"
9
10
11
12
13namespace VMAP
14{
15        //==========================================
16
17
18        //==========================================
19
20        class ModelContainerView : 
21                public G3D::GApp
22        {
23        private:
24        SkyRef              iSky;
25        LightingRef         iLighting;
26        SkyParameters       iSkyParameters;
27
28                VARAreaRef iVARAreaRef;
29                Table<std::string , VAR*> iTriVarTable;
30                Table<std::string , Array<int> > iTriIndexTable;
31
32                VARAreaRef iVARAreaRef2;
33        VAR iTriDebugVar;
34        Array<Vector3> iVTriDebugArray;
35        Array<int> iTriDebugArray;
36
37        //Array<int> iLineIndexArray;
38
39                GApp* i_App;
40                CommandFileRW iCommandFileRW;
41                Array<Command> iCmdArray;
42                int iCurrCmdIndex;
43
44                VMapManager* iVMapManager;
45
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 convertPositionToTrinityRep(float x, float y, float z) const;
55
56        public:
57                ModelContainerView(const G3D::GApp::Settings& settings);
58
59                ~ModelContainerView(void);
60
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);
64
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);
70
71                void fillRenderArray(const SubModel& pSm,Array<TriangleBox> &pArray, const TreeNode* pTreeNode);
72                void fillVertexAndIndexArrays(const SubModel& pSm, Array<Vector3>& vArray, Array<int>& iArray);
73
74                bool loadAndShowTile(int pMapId, int x, int y);
75                void showMap(int pMapId, int x, int y);
76
77                void showMap(MapTree* mt, std::string dirFileName);
78                bool loadAndShowTile(int pMapId);
79
80
81                void processCommand();
82
83        };
84
85        //==========================================
86        //==========================================
87}
88
89#endif
Note: See TracBrowser for help on using the browser.