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"
15 //==========================================
18 //==========================================
20 class ModelContainerView
:
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
;
34 Array
<Vector3
> iVTriDebugArray
;
35 Array
<int> iTriDebugArray
;
37 //Array<int> iLineIndexArray;
40 CommandFileRW iCommandFileRW
;
41 Array
<Command
> iCmdArray
;
44 VMapManager
* iVMapManager
;
52 Array
<Command
> iPrevLoadCommands
;
54 Vector3
convertPositionToMangosRep(float x
, float y
, float z
) const;
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();
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 //==========================================