2025-07-23 15:08:29 +01:00
|
|
|
#pragma once
|
|
|
|
|
#ifndef _NAVMESH_TOOL_H_
|
|
|
|
|
#define _NAVMESH_TOOL_H_
|
2025-08-03 10:18:23 +01:00
|
|
|
#ifdef TORQUE_TOOLS
|
2025-07-23 15:08:29 +01:00
|
|
|
#ifndef _SIMBASE_H_
|
|
|
|
|
#include "console/simBase.h"
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef _GUITYPES_H_
|
|
|
|
|
#include "gui/core/guiTypes.h"
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef _NAVMESH_H_
|
|
|
|
|
#include "navigation/navMesh.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-07-27 19:32:52 +01:00
|
|
|
#ifndef _GUINAVEDITORCTRL_H_
|
|
|
|
|
#include "navigation/guiNavEditorCtrl.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-07-23 15:08:29 +01:00
|
|
|
class UndoAction;
|
|
|
|
|
|
|
|
|
|
class NavMeshTool : public SimObject
|
|
|
|
|
{
|
|
|
|
|
typedef SimObject Parent;
|
|
|
|
|
protected:
|
|
|
|
|
SimObjectPtr<NavMesh> mNavMesh;
|
2025-07-27 19:32:52 +01:00
|
|
|
SimObjectPtr<GuiNavEditorCtrl> mCurEditor;
|
|
|
|
|
|
2025-07-23 15:08:29 +01:00
|
|
|
void _submitUndo(UndoAction* action);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
NavMeshTool();
|
|
|
|
|
virtual ~NavMeshTool();
|
|
|
|
|
|
|
|
|
|
DECLARE_CONOBJECT(NavMeshTool);
|
|
|
|
|
|
|
|
|
|
virtual void setActiveNavMesh(NavMesh* nav_mesh) { mNavMesh = nav_mesh; }
|
2025-07-27 19:32:52 +01:00
|
|
|
virtual void setActiveEditor(GuiNavEditorCtrl* nav_editor) { mCurEditor = nav_editor; }
|
2025-07-23 15:08:29 +01:00
|
|
|
|
|
|
|
|
virtual void onActivated(const Gui3DMouseEvent& lastEvent) {}
|
|
|
|
|
virtual void onDeactivated() {}
|
|
|
|
|
|
|
|
|
|
virtual void on3DMouseDown(const Gui3DMouseEvent& evt) {}
|
|
|
|
|
virtual void on3DMouseUp(const Gui3DMouseEvent& evt) {}
|
|
|
|
|
virtual void on3DMouseMove(const Gui3DMouseEvent& evt) {}
|
|
|
|
|
virtual void on3DMouseDragged(const Gui3DMouseEvent& evt) {}
|
|
|
|
|
virtual void on3DMouseEnter(const Gui3DMouseEvent& evt) {}
|
|
|
|
|
virtual void on3DMouseLeave(const Gui3DMouseEvent& evt) {}
|
|
|
|
|
virtual bool onMouseWheel(const GuiEvent& evt) { return false; }
|
|
|
|
|
virtual void onRender3D() {}
|
|
|
|
|
virtual void onRender2D() {}
|
|
|
|
|
virtual void updateGizmo() {}
|
|
|
|
|
virtual bool updateGuiInfo() { return false; }
|
|
|
|
|
virtual void onUndoAction() {}
|
|
|
|
|
|
|
|
|
|
};
|
2025-08-03 10:18:23 +01:00
|
|
|
#endif
|
2025-07-23 15:08:29 +01:00
|
|
|
#endif // !_NAVMESH_TOOL_H_
|