From 9b1c0e006f20091f28f3f468cfcab1feb51286bd Mon Sep 17 00:00:00 2001 From: Neo2003 Date: Thu, 2 Oct 2008 16:23:55 -0500 Subject: [svn] * Proper SVN structure --HG-- branch : trunk --- contrib/vmap_debugger/ModelContainerView.h | 89 ++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 contrib/vmap_debugger/ModelContainerView.h (limited to 'contrib/vmap_debugger/ModelContainerView.h') diff --git a/contrib/vmap_debugger/ModelContainerView.h b/contrib/vmap_debugger/ModelContainerView.h new file mode 100644 index 00000000000..28d992a0c16 --- /dev/null +++ b/contrib/vmap_debugger/ModelContainerView.h @@ -0,0 +1,89 @@ +#ifndef _MODELCONTAINERVIEW_H +#define _MODELCONTAINERVIEW_H + +#include +#include +#include "ModelContainer.h" +#include "DebugCmdLogger.h" +#include "vmapmanager.h" + + + + +namespace VMAP +{ + //========================================== + + + //========================================== + + class ModelContainerView : + public G3D::GApp + { + private: + SkyRef iSky; + LightingRef iLighting; + SkyParameters iSkyParameters; + + VARAreaRef iVARAreaRef; + Table iTriVarTable; + Table > iTriIndexTable; + + VARAreaRef iVARAreaRef2; + VAR iTriDebugVar; + Array iVTriDebugArray; + Array iTriDebugArray; + + //Array iLineIndexArray; + + GApp* i_App; + CommandFileRW iCommandFileRW; + Array iCmdArray; + int iCurrCmdIndex; + + VMapManager* iVMapManager; + + Vector3 iPos1; + Vector3 iPos2; + Color3 iColor; + bool iDrawLine; + int iInstanceId; + bool iPosSent; + Array iPrevLoadCommands; + private: + Vector3 convertPositionToMangosRep(float x, float y, float z) const; + + public: + ModelContainerView(const G3D::GApp::Settings& settings); + + ~ModelContainerView(void); + + void addModelContainer(const std::string& pName,const ModelContainer* pModelContainer); + void removeModelContainer(const std::string& pName, const ModelContainer* pModelContainer); + void setViewPosition(const Vector3& pPosition); + + void onGraphics(RenderDevice* rd, Array &posed3D, Array &posed2D); + virtual void onInit(); + void init(); + void cleanup(); + void onUserInput(UserInput* ui); + + void fillRenderArray(const SubModel& pSm,Array &pArray, const TreeNode* pTreeNode); + void fillVertexAndIndexArrays(const SubModel& pSm, Array& vArray, Array& iArray); + + bool loadAndShowTile(int pMapId, int x, int y); + void showMap(int pMapId, int x, int y); + + void showMap(MapTree* mt, std::string dirFileName); + bool loadAndShowTile(int pMapId); + + + void processCommand(); + + }; + + //========================================== + //========================================== +} + +#endif -- cgit v1.2.3