mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-28 00:29:34 +00:00
Adds off mesh connection tool upgrade functionality to allow setting the direction to be bi-directional added immediate draw to duDebugDrawtorque so we can draw offmesh connections
44 lines
957 B
C++
44 lines
957 B
C++
#ifndef _OFFMESHCONNTOOL_H_
|
|
#define _OFFMESHCONNTOOL_H_
|
|
|
|
|
|
#ifndef _NAVMESH_TOOL_H_
|
|
#include "navigation/navMeshTool.h"
|
|
#endif
|
|
|
|
class OffMeshConnectionTool : public NavMeshTool
|
|
{
|
|
typedef NavMeshTool Parent;
|
|
bool mStartPosSet;
|
|
bool mBiDir;
|
|
S32 mLink;
|
|
S32 mCurLink;
|
|
Point3F mLinkStart;
|
|
LinkData mLinkCache;
|
|
public:
|
|
|
|
DECLARE_CONOBJECT(OffMeshConnectionTool);
|
|
|
|
OffMeshConnectionTool() {
|
|
mStartPosSet = false;
|
|
mBiDir = false;
|
|
mLink = -1;
|
|
mCurLink = -1;
|
|
mLinkStart = Point3F::Max;
|
|
mLinkCache = LinkData(0);
|
|
}
|
|
virtual ~OffMeshConnectionTool() {}
|
|
|
|
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;
|
|
|
|
void setLinkProperties(const LinkData& d, bool biDir);
|
|
};
|
|
|
|
#endif
|