Torque3D/Engine/source/navigation/navMeshTools/navMeshTestTool.h
marauder2k7 6d36e17d91 added navmesh tester tool
Added ground work for tester tool
tester tool works but needs to fill out list of acceptable datablocks and spawnclasses
navpaths now share 1 navmeshquery
AIControllerData now has a vector of area costs for different polyareas
General cleanup
2025-07-26 10:34:19 +01:00

47 lines
1.1 KiB
C++

#ifndef _NAVMESHTESTTOOL_H_
#define _NAVMESHTESTTOOL_H_
#ifndef _NAVMESH_TOOL_H_
#include "navigation/navMeshTool.h"
#endif
class NavMeshTestTool : public NavMeshTool
{
typedef NavMeshTool Parent;
protected:
String mSpawnClass;
String mSpawnDatablock;
SimObjectPtr<SceneObject> mPlayer;
SimObjectPtr<SceneObject> mCurPlayer;
Point3F mPathStart;
Point3F mPathEnd;
public:
DECLARE_CONOBJECT(NavMeshTestTool);
void spawnPlayer(const Point3F& position);
void drawAgent(duDebugDrawTorque& dd, const F32* pos, F32 r, F32 h, F32 c, const U32 col);
NavMeshTestTool();
virtual ~NavMeshTestTool() {}
void onActivated(const Gui3DMouseEvent& evt) override;
void onDeactivated() override;
void on3DMouseDown(const Gui3DMouseEvent& evt) override;
void on3DMouseMove(const Gui3DMouseEvent& evt) override;
void onRender3D() override;
bool updateGuiInfo() override;
S32 getPlayerId();
void setSpawnClass(String className) { mSpawnClass = className; }
void setSpawnDatablock(String dbName) { mSpawnDatablock = dbName; }
};
#endif // !_NAVMESHTESTTOOL_H_